Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 570002ff authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Add a hidden API to expose cross profile caller id check

To be used by telephony/contacts.

Change-Id: If8e06c20a708ce5e8f7d717d8758c19a78efa46d
parent 7bf379c8
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -2313,6 +2313,23 @@ public class DevicePolicyManager {
        return false;
    }

    /**
     * Determine whether or not caller-Id information has been disabled.
     *
     * @param userHandle The user for whom to check the caller-id permission
     * @hide
     */
    public boolean getCrossProfileCallerIdDisabled(UserHandle userHandle) {
        if (mService != null) {
            try {
                return mService.getCrossProfileCallerIdDisabledForUser(userHandle.getIdentifier());
            } catch (RemoteException e) {
                Log.w(TAG, "Failed talking with device policy service", e);
            }
        }
        return false;
    }

    /**
     * Called by the profile owner so that some intents sent in the managed profile can also be
     * resolved in the parent, or vice versa.