List of usage examples for android.os UserManager KEY_RESTRICTIONS_PENDING
String KEY_RESTRICTIONS_PENDING
To view the source code for android.os UserManager KEY_RESTRICTIONS_PENDING.
Click Source Link
From source file:com.google.codelabs.appauth.MainActivity.java
private void getAppRestrictions() { RestrictionsManager restrictionsManager = (RestrictionsManager) this .getSystemService(Context.RESTRICTIONS_SERVICE); Bundle appRestrictions = restrictionsManager.getApplicationRestrictions(); // Block user if KEY_RESTRICTIONS_PENDING is true, and save login hint if available if (!appRestrictions.isEmpty()) { if (appRestrictions.getBoolean(UserManager.KEY_RESTRICTIONS_PENDING) != true) { mLoginHint = appRestrictions.getString(LOGIN_HINT); } else {/*from ww w. ja va 2s . com*/ Toast.makeText(this, R.string.restrictions_pending_block_user, Toast.LENGTH_LONG).show(); finish(); } } }