Loading services/core/java/com/android/server/am/ActiveServices.java +14 −9 Original line number Original line Diff line number Diff line Loading @@ -1094,8 +1094,10 @@ public final class ActiveServices { } } r = smap.mServicesByName.get(name); r = smap.mServicesByName.get(name); if (r == null && createIfNeeded) { if (r == null && createIfNeeded) { // Before going further -- if this app is not allowed to run in the background, final long token = Binder.clearCallingIdentity(); // then at this point we aren't going to let it period. try { // Before going further -- if this app is not allowed to run in the // background, then at this point we aren't going to let it period. if (!mAm.checkAllowBackgroundLocked(sInfo.applicationInfo.uid, if (!mAm.checkAllowBackgroundLocked(sInfo.applicationInfo.uid, sInfo.packageName, callingPid)) { sInfo.packageName, callingPid)) { Slog.w(TAG, "Background execution not allowed: service " Slog.w(TAG, "Background execution not allowed: service " Loading @@ -1104,6 +1106,9 @@ public final class ActiveServices { + " pkg=" + callingPackage); + " pkg=" + callingPackage); return null; return null; } } } finally { Binder.restoreCallingIdentity(token); } Intent.FilterComparison filter Intent.FilterComparison filter = new Intent.FilterComparison(service.cloneFilter()); = new Intent.FilterComparison(service.cloneFilter()); Loading Loading
services/core/java/com/android/server/am/ActiveServices.java +14 −9 Original line number Original line Diff line number Diff line Loading @@ -1094,8 +1094,10 @@ public final class ActiveServices { } } r = smap.mServicesByName.get(name); r = smap.mServicesByName.get(name); if (r == null && createIfNeeded) { if (r == null && createIfNeeded) { // Before going further -- if this app is not allowed to run in the background, final long token = Binder.clearCallingIdentity(); // then at this point we aren't going to let it period. try { // Before going further -- if this app is not allowed to run in the // background, then at this point we aren't going to let it period. if (!mAm.checkAllowBackgroundLocked(sInfo.applicationInfo.uid, if (!mAm.checkAllowBackgroundLocked(sInfo.applicationInfo.uid, sInfo.packageName, callingPid)) { sInfo.packageName, callingPid)) { Slog.w(TAG, "Background execution not allowed: service " Slog.w(TAG, "Background execution not allowed: service " Loading @@ -1104,6 +1106,9 @@ public final class ActiveServices { + " pkg=" + callingPackage); + " pkg=" + callingPackage); return null; return null; } } } finally { Binder.restoreCallingIdentity(token); } Intent.FilterComparison filter Intent.FilterComparison filter = new Intent.FilterComparison(service.cloneFilter()); = new Intent.FilterComparison(service.cloneFilter()); Loading