blob: 264db52bf8c3aebd627590dae9ba22415f2f6e73 [file] [log] [blame]
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -08001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.settings;
18
19import android.os.Bundle;
Xiaohui Chen44879a32015-07-22 13:53:22 -070020import android.os.UserManager;
Jason Monk39b46742015-09-10 15:52:51 -040021import android.support.v7.preference.PreferenceScreen;
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -080022
Jason Monkb7e43802016-06-06 16:01:58 -040023import com.android.internal.logging.MetricsProto.MetricsEvent;
24
25public class TestingSettings extends SettingsPreferenceFragment {
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -080026
27 @Override
Jason Monkb7e43802016-06-06 16:01:58 -040028 public void onCreate(Bundle savedInstanceState) {
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -080029 super.onCreate(savedInstanceState);
30
31 addPreferencesFromResource(R.xml.testing_settings);
Raju Yadav05fb0692015-04-29 11:04:49 +020032
Jason Monkb7e43802016-06-06 16:01:58 -040033 final UserManager um = UserManager.get(getContext());
Xiaohui Chen44879a32015-07-22 13:53:22 -070034 if (!um.isAdminUser()) {
Raju Yadav05fb0692015-04-29 11:04:49 +020035 PreferenceScreen preferenceScreen = (PreferenceScreen)
36 findPreference("radio_info_settings");
37 getPreferenceScreen().removePreference(preferenceScreen);
38 }
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -080039 }
Fabrice Di Meglio76820132014-02-10 16:22:28 -080040
Jason Monkb7e43802016-06-06 16:01:58 -040041 @Override
42 protected int getMetricsCategory() {
43 return MetricsEvent.TESTING;
44 }
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -080045}