Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5748,6 +5748,7 @@ package android.app.admin { method public boolean getCameraDisabled(android.content.ComponentName); method public java.lang.String getCertInstallerPackage(android.content.ComponentName) throws java.lang.SecurityException; method public boolean getCrossProfileCallerIdDisabled(android.content.ComponentName); method public boolean getCrossProfileContactsSearchDisabled(android.content.ComponentName); method public java.util.List<java.lang.String> getCrossProfileWidgetProviders(android.content.ComponentName); method public int getCurrentFailedPasswordAttempts(); method public java.lang.String getDeviceOwnerLockScreenInfo(); Loading Loading @@ -5809,6 +5810,7 @@ package android.app.admin { method public void setCameraDisabled(android.content.ComponentName, boolean); method public void setCertInstallerPackage(android.content.ComponentName, java.lang.String) throws java.lang.SecurityException; method public void setCrossProfileCallerIdDisabled(android.content.ComponentName, boolean); method public void setCrossProfileContactsSearchDisabled(android.content.ComponentName, boolean); method public boolean setDeviceOwnerLockScreenInfo(android.content.ComponentName, java.lang.String); method public void setGlobalSetting(android.content.ComponentName, java.lang.String, java.lang.String); method public boolean setKeyguardDisabled(android.content.ComponentName, boolean); api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5873,6 +5873,7 @@ package android.app.admin { method public boolean getCameraDisabled(android.content.ComponentName); method public java.lang.String getCertInstallerPackage(android.content.ComponentName) throws java.lang.SecurityException; method public boolean getCrossProfileCallerIdDisabled(android.content.ComponentName); method public boolean getCrossProfileContactsSearchDisabled(android.content.ComponentName); method public java.util.List<java.lang.String> getCrossProfileWidgetProviders(android.content.ComponentName); method public int getCurrentFailedPasswordAttempts(); method public deprecated java.lang.String getDeviceInitializerApp(); Loading Loading @@ -5943,6 +5944,7 @@ package android.app.admin { method public void setCameraDisabled(android.content.ComponentName, boolean); method public void setCertInstallerPackage(android.content.ComponentName, java.lang.String) throws java.lang.SecurityException; method public void setCrossProfileCallerIdDisabled(android.content.ComponentName, boolean); method public void setCrossProfileContactsSearchDisabled(android.content.ComponentName, boolean); method public boolean setDeviceOwnerLockScreenInfo(android.content.ComponentName, java.lang.String); method public void setGlobalSetting(android.content.ComponentName, java.lang.String, java.lang.String); method public boolean setKeyguardDisabled(android.content.ComponentName, boolean); api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5748,6 +5748,7 @@ package android.app.admin { method public boolean getCameraDisabled(android.content.ComponentName); method public java.lang.String getCertInstallerPackage(android.content.ComponentName) throws java.lang.SecurityException; method public boolean getCrossProfileCallerIdDisabled(android.content.ComponentName); method public boolean getCrossProfileContactsSearchDisabled(android.content.ComponentName); method public java.util.List<java.lang.String> getCrossProfileWidgetProviders(android.content.ComponentName); method public int getCurrentFailedPasswordAttempts(); method public java.lang.String getDeviceOwnerLockScreenInfo(); Loading Loading @@ -5809,6 +5810,7 @@ package android.app.admin { method public void setCameraDisabled(android.content.ComponentName, boolean); method public void setCertInstallerPackage(android.content.ComponentName, java.lang.String) throws java.lang.SecurityException; method public void setCrossProfileCallerIdDisabled(android.content.ComponentName, boolean); method public void setCrossProfileContactsSearchDisabled(android.content.ComponentName, boolean); method public boolean setDeviceOwnerLockScreenInfo(android.content.ComponentName, java.lang.String); method public void setGlobalSetting(android.content.ComponentName, java.lang.String, java.lang.String); method public boolean setKeyguardDisabled(android.content.ComponentName, boolean); core/java/android/app/admin/DevicePolicyManager.java +60 −0 Original line number Diff line number Diff line Loading @@ -3532,6 +3532,66 @@ public class DevicePolicyManager { return false; } /** * Called by a profile owner of a managed profile to set whether contacts search from * the managed profile will be shown in the parent profile, for incoming calls. * * <p>The calling device admin must be a profile owner. If it is not, a * security exception will be thrown. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param disabled If true contacts search in the managed profile is not displayed. */ public void setCrossProfileContactsSearchDisabled(@NonNull ComponentName admin, boolean disabled) { if (mService != null) { try { mService.setCrossProfileContactsSearchDisabled(admin, disabled); } catch (RemoteException e) { Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, e); } } } /** * Called by a profile owner of a managed profile to determine whether or not contacts search * has been disabled. * * <p>The calling device admin must be a profile owner. If it is not, a * security exception will be thrown. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. */ public boolean getCrossProfileContactsSearchDisabled(@NonNull ComponentName admin) { if (mService != null) { try { return mService.getCrossProfileContactsSearchDisabled(admin); } catch (RemoteException e) { Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, e); } } return false; } /** * Determine whether or not contacts search has been disabled. * * @param userHandle The user for whom to check the contacts search permission * @hide */ public boolean getCrossProfileContactsSearchDisabled(@NonNull UserHandle userHandle) { if (mService != null) { try { return mService .getCrossProfileContactsSearchDisabledForUser(userHandle.getIdentifier()); } catch (RemoteException e) { Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, e); } } return false; } /** * Start Quick Contact on the managed profile for the user, if the policy allows. * @hide Loading core/java/android/app/admin/IDevicePolicyManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -202,6 +202,9 @@ interface IDevicePolicyManager { void setCrossProfileCallerIdDisabled(in ComponentName who, boolean disabled); boolean getCrossProfileCallerIdDisabled(in ComponentName who); boolean getCrossProfileCallerIdDisabledForUser(int userId); void setCrossProfileContactsSearchDisabled(in ComponentName who, boolean disabled); boolean getCrossProfileContactsSearchDisabled(in ComponentName who); boolean getCrossProfileContactsSearchDisabledForUser(int userId); void startManagedQuickContact(String lookupKey, long contactId, long directoryId, in Intent originalIntent); void setBluetoothContactSharingDisabled(in ComponentName who, boolean disabled); Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5748,6 +5748,7 @@ package android.app.admin { method public boolean getCameraDisabled(android.content.ComponentName); method public java.lang.String getCertInstallerPackage(android.content.ComponentName) throws java.lang.SecurityException; method public boolean getCrossProfileCallerIdDisabled(android.content.ComponentName); method public boolean getCrossProfileContactsSearchDisabled(android.content.ComponentName); method public java.util.List<java.lang.String> getCrossProfileWidgetProviders(android.content.ComponentName); method public int getCurrentFailedPasswordAttempts(); method public java.lang.String getDeviceOwnerLockScreenInfo(); Loading Loading @@ -5809,6 +5810,7 @@ package android.app.admin { method public void setCameraDisabled(android.content.ComponentName, boolean); method public void setCertInstallerPackage(android.content.ComponentName, java.lang.String) throws java.lang.SecurityException; method public void setCrossProfileCallerIdDisabled(android.content.ComponentName, boolean); method public void setCrossProfileContactsSearchDisabled(android.content.ComponentName, boolean); method public boolean setDeviceOwnerLockScreenInfo(android.content.ComponentName, java.lang.String); method public void setGlobalSetting(android.content.ComponentName, java.lang.String, java.lang.String); method public boolean setKeyguardDisabled(android.content.ComponentName, boolean);
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5873,6 +5873,7 @@ package android.app.admin { method public boolean getCameraDisabled(android.content.ComponentName); method public java.lang.String getCertInstallerPackage(android.content.ComponentName) throws java.lang.SecurityException; method public boolean getCrossProfileCallerIdDisabled(android.content.ComponentName); method public boolean getCrossProfileContactsSearchDisabled(android.content.ComponentName); method public java.util.List<java.lang.String> getCrossProfileWidgetProviders(android.content.ComponentName); method public int getCurrentFailedPasswordAttempts(); method public deprecated java.lang.String getDeviceInitializerApp(); Loading Loading @@ -5943,6 +5944,7 @@ package android.app.admin { method public void setCameraDisabled(android.content.ComponentName, boolean); method public void setCertInstallerPackage(android.content.ComponentName, java.lang.String) throws java.lang.SecurityException; method public void setCrossProfileCallerIdDisabled(android.content.ComponentName, boolean); method public void setCrossProfileContactsSearchDisabled(android.content.ComponentName, boolean); method public boolean setDeviceOwnerLockScreenInfo(android.content.ComponentName, java.lang.String); method public void setGlobalSetting(android.content.ComponentName, java.lang.String, java.lang.String); method public boolean setKeyguardDisabled(android.content.ComponentName, boolean);
api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5748,6 +5748,7 @@ package android.app.admin { method public boolean getCameraDisabled(android.content.ComponentName); method public java.lang.String getCertInstallerPackage(android.content.ComponentName) throws java.lang.SecurityException; method public boolean getCrossProfileCallerIdDisabled(android.content.ComponentName); method public boolean getCrossProfileContactsSearchDisabled(android.content.ComponentName); method public java.util.List<java.lang.String> getCrossProfileWidgetProviders(android.content.ComponentName); method public int getCurrentFailedPasswordAttempts(); method public java.lang.String getDeviceOwnerLockScreenInfo(); Loading Loading @@ -5809,6 +5810,7 @@ package android.app.admin { method public void setCameraDisabled(android.content.ComponentName, boolean); method public void setCertInstallerPackage(android.content.ComponentName, java.lang.String) throws java.lang.SecurityException; method public void setCrossProfileCallerIdDisabled(android.content.ComponentName, boolean); method public void setCrossProfileContactsSearchDisabled(android.content.ComponentName, boolean); method public boolean setDeviceOwnerLockScreenInfo(android.content.ComponentName, java.lang.String); method public void setGlobalSetting(android.content.ComponentName, java.lang.String, java.lang.String); method public boolean setKeyguardDisabled(android.content.ComponentName, boolean);
core/java/android/app/admin/DevicePolicyManager.java +60 −0 Original line number Diff line number Diff line Loading @@ -3532,6 +3532,66 @@ public class DevicePolicyManager { return false; } /** * Called by a profile owner of a managed profile to set whether contacts search from * the managed profile will be shown in the parent profile, for incoming calls. * * <p>The calling device admin must be a profile owner. If it is not, a * security exception will be thrown. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param disabled If true contacts search in the managed profile is not displayed. */ public void setCrossProfileContactsSearchDisabled(@NonNull ComponentName admin, boolean disabled) { if (mService != null) { try { mService.setCrossProfileContactsSearchDisabled(admin, disabled); } catch (RemoteException e) { Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, e); } } } /** * Called by a profile owner of a managed profile to determine whether or not contacts search * has been disabled. * * <p>The calling device admin must be a profile owner. If it is not, a * security exception will be thrown. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. */ public boolean getCrossProfileContactsSearchDisabled(@NonNull ComponentName admin) { if (mService != null) { try { return mService.getCrossProfileContactsSearchDisabled(admin); } catch (RemoteException e) { Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, e); } } return false; } /** * Determine whether or not contacts search has been disabled. * * @param userHandle The user for whom to check the contacts search permission * @hide */ public boolean getCrossProfileContactsSearchDisabled(@NonNull UserHandle userHandle) { if (mService != null) { try { return mService .getCrossProfileContactsSearchDisabledForUser(userHandle.getIdentifier()); } catch (RemoteException e) { Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, e); } } return false; } /** * Start Quick Contact on the managed profile for the user, if the policy allows. * @hide Loading
core/java/android/app/admin/IDevicePolicyManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -202,6 +202,9 @@ interface IDevicePolicyManager { void setCrossProfileCallerIdDisabled(in ComponentName who, boolean disabled); boolean getCrossProfileCallerIdDisabled(in ComponentName who); boolean getCrossProfileCallerIdDisabledForUser(int userId); void setCrossProfileContactsSearchDisabled(in ComponentName who, boolean disabled); boolean getCrossProfileContactsSearchDisabled(in ComponentName who); boolean getCrossProfileContactsSearchDisabledForUser(int userId); void startManagedQuickContact(String lookupKey, long contactId, long directoryId, in Intent originalIntent); void setBluetoothContactSharingDisabled(in ComponentName who, boolean disabled); Loading