Add support messages to device admin pages.
Add support message to device admin settings pages. Show policy information for device owners and profile owners. Allow a user to remove profile from profile owners admin page. Bug: 26416662 Change-Id: I95424da50067b7c0ba1618a083a31448d406188f
This commit is contained in:
@@ -53,10 +53,7 @@ public class RestrictedPreferenceHelper {
|
||||
mContext = context;
|
||||
mPreference = preference;
|
||||
|
||||
mRestrictedPadlock = mContext.getDrawable(R.drawable.ic_settings_lock_outline);
|
||||
final int iconSize = mContext.getResources().getDimensionPixelSize(
|
||||
R.dimen.restricted_lock_icon_size);
|
||||
mRestrictedPadlock.setBounds(0, 0, iconSize, iconSize);
|
||||
mRestrictedPadlock = getRestrictedPadlock(mContext);
|
||||
mRestrictedPadlockPadding = mContext.getResources().getDimensionPixelSize(
|
||||
R.dimen.restricted_lock_icon_padding);
|
||||
|
||||
@@ -192,4 +189,15 @@ public class RestrictedPreferenceHelper {
|
||||
public boolean isDisabledByAdmin() {
|
||||
return mDisabledByAdmin;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return drawables for displaying with settings that are locked by a device admin.
|
||||
*/
|
||||
public static Drawable getRestrictedPadlock(Context context) {
|
||||
Drawable restrictedPadlock = context.getDrawable(R.drawable.ic_settings_lock_outline);
|
||||
final int iconSize = context.getResources().getDimensionPixelSize(
|
||||
R.dimen.restricted_lock_icon_size);
|
||||
restrictedPadlock.setBounds(0, 0, iconSize, iconSize);
|
||||
return restrictedPadlock;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user