refactor: permission should not be check on onCreate for some cases

This commit is contained in:
Rohit Verma 2024-08-24 20:49:08 +05:30
parent 81cc53a80d
commit ef1889791e

View file

@ -162,14 +162,17 @@ public class MainActivity extends BaseActivity
* so that location in the EXIF metadata of the images shared by the user * so that location in the EXIF metadata of the images shared by the user
* is retained on devices running Android 10 or above * is retained on devices running Android 10 or above
*/ */
if (VERSION.SDK_INT >= VERSION_CODES.Q) { // if (VERSION.SDK_INT >= VERSION_CODES.Q) {
PermissionUtils.checkPermissionsAndPerformAction( // ActivityCompat.requestPermissions(this,
this, // new String[]{Manifest.permission.ACCESS_MEDIA_LOCATION}, 0);
() -> {}, // PermissionUtils.checkPermissionsAndPerformAction(
R.string.media_location_permission_denied, // this,
R.string.add_location_manually, // () -> {},
permission.ACCESS_MEDIA_LOCATION); // R.string.media_location_permission_denied,
} // R.string.add_location_manually,
// permission.ACCESS_MEDIA_LOCATION);
// }
checkAndResumeStuckUploads(); checkAndResumeStuckUploads();
} }
} }