Loading services/core/java/com/android/server/am/ActiveServices.java +2 −1 Original line number Diff line number Diff line Loading @@ -6191,7 +6191,8 @@ public final class ActiveServices { r.mFgsNotificationDeferred, r.mFgsNotificationShown, durationMs, r.mStartForegroundCount); r.mStartForegroundCount, ActivityManagerUtils.hashComponentNameForAtom(r.shortInstanceName)); } boolean canAllowWhileInUsePermissionInFgsLocked(int callingPid, int callingUid, Loading services/core/java/com/android/server/am/ActivityManagerUtils.java +8 −0 Original line number Diff line number Diff line Loading @@ -121,4 +121,12 @@ public class ActivityManagerUtils { return (((double) hash) / Integer.MAX_VALUE) <= rate; } /** * @param shortInstanceName {@link ServiceRecord#shortInstanceName}. * @return hash of the ServiceRecord's shortInstanceName, combined with ANDROID_ID. */ public static int hashComponentNameForAtom(String shortInstanceName) { return getUnsignedHashUnCached(shortInstanceName) ^ getAndroidIdHash(); } } Loading
services/core/java/com/android/server/am/ActiveServices.java +2 −1 Original line number Diff line number Diff line Loading @@ -6191,7 +6191,8 @@ public final class ActiveServices { r.mFgsNotificationDeferred, r.mFgsNotificationShown, durationMs, r.mStartForegroundCount); r.mStartForegroundCount, ActivityManagerUtils.hashComponentNameForAtom(r.shortInstanceName)); } boolean canAllowWhileInUsePermissionInFgsLocked(int callingPid, int callingUid, Loading
services/core/java/com/android/server/am/ActivityManagerUtils.java +8 −0 Original line number Diff line number Diff line Loading @@ -121,4 +121,12 @@ public class ActivityManagerUtils { return (((double) hash) / Integer.MAX_VALUE) <= rate; } /** * @param shortInstanceName {@link ServiceRecord#shortInstanceName}. * @return hash of the ServiceRecord's shortInstanceName, combined with ANDROID_ID. */ public static int hashComponentNameForAtom(String shortInstanceName) { return getUnsignedHashUnCached(shortInstanceName) ^ getAndroidIdHash(); } }