Loading android/app/jni/permission_helpers.cc +5 −3 Original line number Original line Diff line number Diff line Loading @@ -63,6 +63,10 @@ bool isCallerActiveUserOrManagedProfile() { uid_t callingUser = callingUid / PER_USER_RANGE; uid_t callingUser = callingUid / PER_USER_RANGE; // if (!callingUid) return true; // It's a local call // if (!callingUid) return true; // It's a local call if ((foregroundUserId == callingUser) || (systemUiUid == callingUid) || (SYSTEM_UID == callingUid)) return true; uid_t parentUser = callingUser; uid_t parentUser = callingUser; sp<IServiceManager> sm = defaultServiceManager(); sp<IServiceManager> sm = defaultServiceManager(); Loading @@ -75,9 +79,7 @@ bool isCallerActiveUserOrManagedProfile() { ipcState->restoreCallingIdentity(ident); ipcState->restoreCallingIdentity(ident); } } return (foregroundUserId == callingUser) || return foregroundUserId == parentUser; (foregroundUserId == parentUser) || (systemUiUid == callingUid) || (SYSTEM_UID == callingUid); } } } // namespace bluetooth } // namespace bluetooth Loading Loading
android/app/jni/permission_helpers.cc +5 −3 Original line number Original line Diff line number Diff line Loading @@ -63,6 +63,10 @@ bool isCallerActiveUserOrManagedProfile() { uid_t callingUser = callingUid / PER_USER_RANGE; uid_t callingUser = callingUid / PER_USER_RANGE; // if (!callingUid) return true; // It's a local call // if (!callingUid) return true; // It's a local call if ((foregroundUserId == callingUser) || (systemUiUid == callingUid) || (SYSTEM_UID == callingUid)) return true; uid_t parentUser = callingUser; uid_t parentUser = callingUser; sp<IServiceManager> sm = defaultServiceManager(); sp<IServiceManager> sm = defaultServiceManager(); Loading @@ -75,9 +79,7 @@ bool isCallerActiveUserOrManagedProfile() { ipcState->restoreCallingIdentity(ident); ipcState->restoreCallingIdentity(ident); } } return (foregroundUserId == callingUser) || return foregroundUserId == parentUser; (foregroundUserId == parentUser) || (systemUiUid == callingUid) || (SYSTEM_UID == callingUid); } } } // namespace bluetooth } // namespace bluetooth Loading