Merge "Add new method "checkRestrictionEnforced" to RestrictedPreferenceHelper." into sc-dev
This commit is contained in:
@@ -48,7 +48,6 @@
|
|||||||
android:layout_width="@dimen/settingslib_restricted_icon_size"
|
android:layout_width="@dimen/settingslib_restricted_icon_size"
|
||||||
android:layout_height="@dimen/settingslib_restricted_icon_size"
|
android:layout_height="@dimen/settingslib_restricted_icon_size"
|
||||||
android:tint="?android:attr/colorAccent"
|
android:tint="?android:attr/colorAccent"
|
||||||
android:theme="@android:style/Theme.Material"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginEnd="@dimen/settingslib_restricted_icon_margin_end"
|
android:layout_marginEnd="@dimen/settingslib_restricted_icon_margin_end"
|
||||||
android:src="@*android:drawable/ic_info"
|
android:src="@*android:drawable/ic_info"
|
||||||
|
|||||||
@@ -138,6 +138,17 @@ public class RestrictedPreferenceHelper {
|
|||||||
setDisabledByAdmin(admin);
|
setDisabledByAdmin(admin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return EnforcedAdmin if we have been passed the restriction in the xml.
|
||||||
|
*/
|
||||||
|
public EnforcedAdmin checkRestrictionEnforced() {
|
||||||
|
if (mAttrUserRestriction == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return RestrictedLockUtilsInternal.checkIfRestrictionEnforced(mContext,
|
||||||
|
mAttrUserRestriction, UserHandle.myUserId());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disable this preference based on the enforce admin.
|
* Disable this preference based on the enforce admin.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user