* commit 'a26765c461168f745913d505d6e993181e896a19': Check new user restriction.
This commit is contained in:
@@ -183,6 +183,12 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
|
|||||||
System.arraycopy(mHits, 1, mHits, 0, mHits.length-1);
|
System.arraycopy(mHits, 1, mHits, 0, mHits.length-1);
|
||||||
mHits[mHits.length-1] = SystemClock.uptimeMillis();
|
mHits[mHits.length-1] = SystemClock.uptimeMillis();
|
||||||
if (mHits[0] >= (SystemClock.uptimeMillis()-500)) {
|
if (mHits[0] >= (SystemClock.uptimeMillis()-500)) {
|
||||||
|
UserManager um = (UserManager) getActivity().getSystemService(Context.USER_SERVICE);
|
||||||
|
if (um.hasUserRestriction(UserManager.DISALLOW_FUN)) {
|
||||||
|
Log.d(LOG_TAG, "Sorry, no fun for you!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||||
intent.setClassName("android",
|
intent.setClassName("android",
|
||||||
com.android.internal.app.PlatLogoActivity.class.getName());
|
com.android.internal.app.PlatLogoActivity.class.getName());
|
||||||
|
Reference in New Issue
Block a user