Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -6390,6 +6390,7 @@ package android.app.admin { method public deprecated boolean isCallerApplicationRestrictionsManagingPackage(); method public boolean isDeviceOwnerApp(java.lang.String); method public boolean isLockTaskPermitted(java.lang.String); method public boolean isLogoutButtonEnabled(); method public boolean isManagedProfile(android.content.ComponentName); method public boolean isMasterVolumeMuted(android.content.ComponentName); method public boolean isNetworkLoggingEnabled(android.content.ComponentName); Loading Loading @@ -6432,6 +6433,7 @@ package android.app.admin { method public void setKeyguardDisabledFeatures(android.content.ComponentName, int); method public void setLockTaskFeatures(android.content.ComponentName, int); method public void setLockTaskPackages(android.content.ComponentName, java.lang.String[]) throws java.lang.SecurityException; method public void setLogoutButtonEnabled(android.content.ComponentName, boolean); method public void setLongSupportMessage(android.content.ComponentName, java.lang.CharSequence); method public void setMasterVolumeMuted(android.content.ComponentName, boolean); method public void setMaximumFailedPasswordsForWipe(android.content.ComponentName, int); core/java/android/app/admin/DevicePolicyManager.java +32 −0 Original line number Diff line number Diff line Loading @@ -8474,6 +8474,38 @@ public class DevicePolicyManager { } } /** * Called by a device owner to specify whether a logout button is enabled for all secondary * users. The system may show a logout button that stops the user and switches back to the * primary user. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param enabled whether logout button should be enabled or not. * @throws SecurityException if {@code admin} is not a device owner. */ public void setLogoutButtonEnabled(@NonNull ComponentName admin, boolean enabled) { throwIfParentInstance("setLogoutButtonEnabled"); try { mService.setLogoutButtonEnabled(admin, enabled); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } /** * Returns whether logout button is enabled by a device owner. * * @return {@code true} if logout button is enabled by device owner, {@code false} otherwise. */ public boolean isLogoutButtonEnabled() { throwIfParentInstance("isLogoutButtonEnabled"); try { return mService.isLogoutButtonEnabled(); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } /** * Callback used in {@link #clearApplicationUserData} * to indicate that the clearing of an application's user data is done. Loading core/java/android/app/admin/IDevicePolicyManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -366,4 +366,7 @@ interface IDevicePolicyManager { StringParceledListSlice getOwnerInstalledCaCerts(in UserHandle user); boolean clearApplicationUserData(in ComponentName admin, in String packageName, in IPackageDataObserver callback); void setLogoutButtonEnabled(in ComponentName admin, boolean enabled); boolean isLogoutButtonEnabled(); } core/res/res/drawable/ic_logout.xml 0 → 100644 +15 −0 Original line number Diff line number Diff line <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <group> <clip-path android:pathData="M0,0h24v24H0V0z M 0,0" /> <path android:fillColor="#FF000000" android:pathData="M17.0,7.0l-1.4099998,1.4099998l2.58,2.5900002l-10.17,0.0l0.0,2.0l10.17,0.0l-2.58,2.58l1.4099998,1.4200001l5.0,-5.0z"/> <path android:fillColor="#FF000000" android:pathData="M4,5h8V3H4C2.9,3,2,3.9,2,5v14c0,1.1,0.9,2,2,2h8v-2H4V5z"/> </group> </vector> core/res/res/values/config.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2441,10 +2441,12 @@ "users" = list of users "restart" = restart device "lockdown" = Lock down device until the user authenticates "logout" = Logout the current user --> <string-array translatable="false" name="config_globalActionsList"> <item>power</item> <item>restart</item> <item>logout</item> <item>bugreport</item> <item>users</item> <item>lockdown</item> Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -6390,6 +6390,7 @@ package android.app.admin { method public deprecated boolean isCallerApplicationRestrictionsManagingPackage(); method public boolean isDeviceOwnerApp(java.lang.String); method public boolean isLockTaskPermitted(java.lang.String); method public boolean isLogoutButtonEnabled(); method public boolean isManagedProfile(android.content.ComponentName); method public boolean isMasterVolumeMuted(android.content.ComponentName); method public boolean isNetworkLoggingEnabled(android.content.ComponentName); Loading Loading @@ -6432,6 +6433,7 @@ package android.app.admin { method public void setKeyguardDisabledFeatures(android.content.ComponentName, int); method public void setLockTaskFeatures(android.content.ComponentName, int); method public void setLockTaskPackages(android.content.ComponentName, java.lang.String[]) throws java.lang.SecurityException; method public void setLogoutButtonEnabled(android.content.ComponentName, boolean); method public void setLongSupportMessage(android.content.ComponentName, java.lang.CharSequence); method public void setMasterVolumeMuted(android.content.ComponentName, boolean); method public void setMaximumFailedPasswordsForWipe(android.content.ComponentName, int);
core/java/android/app/admin/DevicePolicyManager.java +32 −0 Original line number Diff line number Diff line Loading @@ -8474,6 +8474,38 @@ public class DevicePolicyManager { } } /** * Called by a device owner to specify whether a logout button is enabled for all secondary * users. The system may show a logout button that stops the user and switches back to the * primary user. * * @param admin Which {@link DeviceAdminReceiver} this request is associated with. * @param enabled whether logout button should be enabled or not. * @throws SecurityException if {@code admin} is not a device owner. */ public void setLogoutButtonEnabled(@NonNull ComponentName admin, boolean enabled) { throwIfParentInstance("setLogoutButtonEnabled"); try { mService.setLogoutButtonEnabled(admin, enabled); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } /** * Returns whether logout button is enabled by a device owner. * * @return {@code true} if logout button is enabled by device owner, {@code false} otherwise. */ public boolean isLogoutButtonEnabled() { throwIfParentInstance("isLogoutButtonEnabled"); try { return mService.isLogoutButtonEnabled(); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } /** * Callback used in {@link #clearApplicationUserData} * to indicate that the clearing of an application's user data is done. Loading
core/java/android/app/admin/IDevicePolicyManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -366,4 +366,7 @@ interface IDevicePolicyManager { StringParceledListSlice getOwnerInstalledCaCerts(in UserHandle user); boolean clearApplicationUserData(in ComponentName admin, in String packageName, in IPackageDataObserver callback); void setLogoutButtonEnabled(in ComponentName admin, boolean enabled); boolean isLogoutButtonEnabled(); }
core/res/res/drawable/ic_logout.xml 0 → 100644 +15 −0 Original line number Diff line number Diff line <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <group> <clip-path android:pathData="M0,0h24v24H0V0z M 0,0" /> <path android:fillColor="#FF000000" android:pathData="M17.0,7.0l-1.4099998,1.4099998l2.58,2.5900002l-10.17,0.0l0.0,2.0l10.17,0.0l-2.58,2.58l1.4099998,1.4200001l5.0,-5.0z"/> <path android:fillColor="#FF000000" android:pathData="M4,5h8V3H4C2.9,3,2,3.9,2,5v14c0,1.1,0.9,2,2,2h8v-2H4V5z"/> </group> </vector>
core/res/res/values/config.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2441,10 +2441,12 @@ "users" = list of users "restart" = restart device "lockdown" = Lock down device until the user authenticates "logout" = Logout the current user --> <string-array translatable="false" name="config_globalActionsList"> <item>power</item> <item>restart</item> <item>logout</item> <item>bugreport</item> <item>users</item> <item>lockdown</item> Loading