Allow System to by-pass verifyShortcutInfoPackage
SystemUI needs to be able to modify shortcuts defined by other System Apps. A clear use case is Note Task shortcut which needs to be updated based on the notes role app which is observed from SystemUI. Test: manual Fixes: b/278724068 Change-Id: Iaca0e6a13ecb68f856334fd83947ac721d45ff81
This commit is contained in:
@@ -1716,6 +1716,11 @@ public class ShortcutService extends IShortcutService.Stub {
|
||||
if (si == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isCallerSystem()) {
|
||||
return; // no check
|
||||
}
|
||||
|
||||
if (!Objects.equals(callerPackage, si.getPackage())) {
|
||||
android.util.EventLog.writeEvent(0x534e4554, "109824443", -1, "");
|
||||
throw new SecurityException("Shortcut package name mismatch");
|
||||
|
||||
Reference in New Issue
Block a user