Don't crash system server

Change-Id: I6422017bf85f9751fe9bab3136e357b55e17c429
Fixes: 65374410
Test: make
This commit is contained in:
Julia Reynolds
2017-09-07 13:53:40 -04:00
parent 8c8ae38eac
commit cb507b828a
2 changed files with 4 additions and 1 deletions

View File

@@ -494,7 +494,7 @@ abstract public class ManagedServices {
return info;
}
throw new SecurityException("Disallowed call from unknown " + getCaption() + ": "
+ service);
+ service + " " + service.getClass());
}
public void unregisterService(IInterface service, int userid) {

View File

@@ -737,6 +737,9 @@ public class ZenModeHelper {
mConfig = config;
mHandler.postApplyConfig(config, reason, setRingerMode);
return true;
} catch (SecurityException e) {
Log.wtf(TAG, "Invalid rule in config", e);
return false;
} finally {
Binder.restoreCallingIdentity(identity);
}