fixup: access Android_id only on push

This commit is contained in:
Daniel Gultsch 2024-02-14 12:09:08 +01:00
parent 59c23f5558
commit 33c63fb562
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2

View file

@ -18,7 +18,8 @@ public class PhoneHelper {
}
public static Uri getProfilePictureUri(final Context context) {
if (context.checkSelfPermission(Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
&& context.checkSelfPermission(Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {
return null;
}
final String[] projection = new String[] {Profile._ID, Profile.PHOTO_URI};