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

Commit 303cc980 authored by Stanley Wang's avatar Stanley Wang Committed by Automerger Merge Worker
Browse files

Merge "Add new method "checkRestrictionEnforced" to...

Merge "Add new method "checkRestrictionEnforced" to RestrictedPreferenceHelper." into sc-dev am: cb3e9c2b am: 30c467c6 am: f3d1e4e4

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14758921

Change-Id: Iecb4c1a53d91ca28d3d259c8886276a6a51e61ff
parents 300059d3 f3d1e4e4
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@
            android:layout_width="@dimen/settingslib_restricted_icon_size"
            android:layout_height="@dimen/settingslib_restricted_icon_size"
            android:tint="?android:attr/colorAccent"
            android:theme="@android:style/Theme.Material"
            android:layout_gravity="center_vertical"
            android:layout_marginEnd="@dimen/settingslib_restricted_icon_margin_end"
            android:src="@*android:drawable/ic_info"
+11 −0
Original line number Diff line number Diff line
@@ -138,6 +138,17 @@ public class RestrictedPreferenceHelper {
        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.
     *