fix WRITE_EXTERNAL_STORAGE in scoped storage & remove LegacyExternalStorage
This commit is contained in:
parent
a5393e9e9d
commit
50f2b934c5
@ -121,9 +121,7 @@
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:supportsRtl="false"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:hasFragileUserData="true"
|
||||
android:preserveLegacyExternalStorage="true"
|
||||
android:allowAudioPlaybackCapture="true"
|
||||
tools:replace="android:supportsRtl">
|
||||
|
||||
|
@ -30200,7 +30200,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
builder.setTitle(LocaleController.getString("DeleteDownloadedFile"));
|
||||
builder.setMessage(LocaleController.getString("DeleteDownloadedFileConfirm"));
|
||||
builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), (dialogInterface, i) -> {
|
||||
if (Build.VERSION.SDK_INT >= 23 && getParentActivity().checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
if (Build.VERSION.SDK_INT >= 23 && (Build.VERSION.SDK_INT <= 28 || BuildVars.NO_SCOPED_STORAGE) && getParentActivity().checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
getParentActivity().requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 4);
|
||||
return;
|
||||
}
|
||||
@ -30306,7 +30306,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
break;
|
||||
}
|
||||
case nkbtn_stickerdl: {
|
||||
if (Build.VERSION.SDK_INT >= 23 && getParentActivity().checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
if (Build.VERSION.SDK_INT >= 23 && (Build.VERSION.SDK_INT <= 28 || BuildVars.NO_SCOPED_STORAGE) && getParentActivity().checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
getParentActivity().requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 4);
|
||||
selectedObject = null;
|
||||
selectedObjectGroup = null;
|
||||
|
Loading…
Reference in New Issue
Block a user