Special case location provider camera accesses and show them as am: 64c801d344 am: 541749bf7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12404752 Change-Id: I79c1e80efbc791527b8270ab820e6de9d06c98e0
This commit is contained in:
committed by
Automerger Merge Worker
commit
1c40a034f3
@@ -19,6 +19,7 @@ package com.android.systemui.appops;
|
||||
import android.app.AppOpsManager;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.location.LocationManager;
|
||||
import android.media.AudioManager;
|
||||
import android.media.AudioRecordingConfiguration;
|
||||
import android.os.Handler;
|
||||
@@ -66,6 +67,7 @@ public class AppOpsControllerImpl implements AppOpsController,
|
||||
|
||||
private final AppOpsManager mAppOps;
|
||||
private final AudioManager mAudioManager;
|
||||
private final LocationManager mLocationManager;
|
||||
private H mBGHandler;
|
||||
private final List<AppOpsController.Callback> mCallbacks = new ArrayList<>();
|
||||
private final SparseArray<Set<Callback>> mCallbacksByCode = new SparseArray<>();
|
||||
@@ -107,6 +109,7 @@ public class AppOpsControllerImpl implements AppOpsController,
|
||||
mCallbacksByCode.put(OPS[i], new ArraySet<>());
|
||||
}
|
||||
mAudioManager = audioManager;
|
||||
mLocationManager = context.getSystemService(LocationManager.class);
|
||||
dumpManager.registerDumpable(TAG, this);
|
||||
}
|
||||
|
||||
@@ -311,6 +314,11 @@ public class AppOpsControllerImpl implements AppOpsController,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (appOpCode == AppOpsManager.OP_CAMERA && mLocationManager.isProviderPackage(
|
||||
packageName)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return isUserSensitive(appOpCode, uid, packageName);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user