Catch Illegal argument exception
This is probably a sign that something is calling startOp() on an app that isn't even running, but the service shouldn't take out the system server when this happens. Test: Presubmit tests Fixes: 192557017 Change-Id: I7aae3f37d08303fb17aa8d0af3c9a56bd25b36af
This commit is contained in:
@@ -440,7 +440,14 @@ public final class SensorPrivacyService extends SystemService {
|
||||
inputMethodPackageName = ComponentName.unflattenFromString(
|
||||
inputMethodComponent).getPackageName();
|
||||
}
|
||||
int capability = mActivityManagerInternal.getUidCapability(uid);
|
||||
|
||||
int capability;
|
||||
try {
|
||||
capability = mActivityManagerInternal.getUidCapability(uid);
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log.w(TAG, e);
|
||||
return;
|
||||
}
|
||||
|
||||
if (sensor == MICROPHONE) {
|
||||
VoiceInteractionManagerInternal voiceInteractionManagerInternal =
|
||||
|
||||
Reference in New Issue
Block a user