Restrict Printing Settings

- Don't show Printing Settings if the user is restricted by UserManager.DISALLOW_PRINTING

Bug: 269122009
Test: manual test
atest -c PrintSettingsFragmentTest

Change-Id: I15db778ebc4de3c8a76505043fab1ee02db3f290
This commit is contained in:
Weng Su
2023-05-18 04:07:05 +08:00
parent efe3ce5660
commit 4c1dd91695
3 changed files with 159 additions and 16 deletions

View File

@@ -27,13 +27,17 @@ import android.widget.AdapterView;
import android.widget.Spinner;
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.dashboard.RestrictedDashboardFragment;
import com.android.settings.dashboard.profileselector.UserAdapter;
/**
* Base fragment class for per profile settings.
*/
public abstract class ProfileSettingsPreferenceFragment extends SettingsPreferenceFragment {
public abstract class ProfileSettingsPreferenceFragment extends RestrictedDashboardFragment {
public ProfileSettingsPreferenceFragment(String restrictionKey) {
super(restrictionKey);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {