Loading android/app/jni/IUserManager.cc +19 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,25 @@ class BpUserManager : public BpInterface<IUserManager> { return reply.readInt32(); } virtual int32_t getProfileParentId(int32_t user_handle) { Parcel data, reply; data.writeInterfaceToken(IUserManager::getInterfaceDescriptor()); data.writeInt32(user_handle); status_t rc = remote()->transact(GET_PROFILE_PARENT_ID, data, &reply, 0); if (rc != NO_ERROR) { ALOGE("%s: failed (%d)\n", __func__, rc); return -1; } int32_t exception = reply.readExceptionCode(); if (exception != 0) { ALOGE("%s: got exception (%d)\n", __func__, exception); return -1; } return reply.readInt32(); } }; IMPLEMENT_META_INTERFACE(UserManager, "android.os.IUserManager"); Loading android/app/jni/IUserManager.h +2 −0 Original line number Diff line number Diff line Loading @@ -33,9 +33,11 @@ class IUserManager : public IInterface { // must be kept in sync with IUserManager.aidl enum { GET_CREDENTIAL_OWNER_PROFILE = IBinder::FIRST_CALL_TRANSACTION + 0, GET_PROFILE_PARENT_ID, }; virtual int32_t getCredentialOwnerProfile(int32_t user_id) = 0; virtual int32_t getProfileParentId(int32_t user_handle) = 0; DECLARE_META_INTERFACE(UserManager); }; Loading android/app/jni/permission_helpers.cc +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ bool isCallerActiveUserOrManagedProfile() { if (um != NULL) { // Must use Bluetooth process identity when making call to get parent user int64_t ident = ipcState->clearCallingIdentity(); parentUser = um->getCredentialOwnerProfile(callingUser); parentUser = um->getProfileParentId(callingUser); ipcState->restoreCallingIdentity(ident); } Loading Loading
android/app/jni/IUserManager.cc +19 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,25 @@ class BpUserManager : public BpInterface<IUserManager> { return reply.readInt32(); } virtual int32_t getProfileParentId(int32_t user_handle) { Parcel data, reply; data.writeInterfaceToken(IUserManager::getInterfaceDescriptor()); data.writeInt32(user_handle); status_t rc = remote()->transact(GET_PROFILE_PARENT_ID, data, &reply, 0); if (rc != NO_ERROR) { ALOGE("%s: failed (%d)\n", __func__, rc); return -1; } int32_t exception = reply.readExceptionCode(); if (exception != 0) { ALOGE("%s: got exception (%d)\n", __func__, exception); return -1; } return reply.readInt32(); } }; IMPLEMENT_META_INTERFACE(UserManager, "android.os.IUserManager"); Loading
android/app/jni/IUserManager.h +2 −0 Original line number Diff line number Diff line Loading @@ -33,9 +33,11 @@ class IUserManager : public IInterface { // must be kept in sync with IUserManager.aidl enum { GET_CREDENTIAL_OWNER_PROFILE = IBinder::FIRST_CALL_TRANSACTION + 0, GET_PROFILE_PARENT_ID, }; virtual int32_t getCredentialOwnerProfile(int32_t user_id) = 0; virtual int32_t getProfileParentId(int32_t user_handle) = 0; DECLARE_META_INTERFACE(UserManager); }; Loading
android/app/jni/permission_helpers.cc +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ bool isCallerActiveUserOrManagedProfile() { if (um != NULL) { // Must use Bluetooth process identity when making call to get parent user int64_t ident = ipcState->clearCallingIdentity(); parentUser = um->getCredentialOwnerProfile(callingUser); parentUser = um->getProfileParentId(callingUser); ipcState->restoreCallingIdentity(ident); } Loading