Create RestrictedDashboardFragment.

RestrictedDashboardFragment has all the same logic coming from
RestrcitedSettingsFragment but extends from DashboardFragment.
As a result, we could use preferenceController in child class of
RestrictedDashboardFragment.

This cl also make DeviceListPreferenceFragment as child of
RestrictedDashboardFragment, which enfluences the bluetooth page.

Bug: 38041586
Test: Build
Change-Id: I01395d506176c5cc584948478f7ca16c1c7c7045
This commit is contained in:
jackqdyulei
2017-05-05 16:07:48 -07:00
parent 910f69c62a
commit e407e67a3b
6 changed files with 303 additions and 7 deletions

View File

@@ -17,7 +17,6 @@
package com.android.settings;
import android.app.Activity;
import android.app.admin.DevicePolicyManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -27,10 +26,10 @@ import android.os.Bundle;
import android.os.PersistableBundle;
import android.os.UserHandle;
import android.os.UserManager;
import android.view.Gravity;
import android.view.View;
import android.widget.TextView;
import com.android.settings.dashboard.RestrictedDashboardFragment;
import com.android.settingslib.RestrictedLockUtils;
import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
@@ -46,7 +45,10 @@ import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
* If this settings screen should be pin protected whenever
* {@link RestrictionsManager.hasRestrictionsProvider()} returns true, pass in
* {@link RESTRICT_IF_OVERRIDABLE} to the constructor instead of a restrictions key.
*
* @deprecated Use {@link RestrictedDashboardFragment} instead
*/
@Deprecated
public abstract class RestrictedSettingsFragment extends SettingsPreferenceFragment {
protected static final String RESTRICT_IF_OVERRIDABLE = "restrict_if_overridable";