blob: b3de6fa262fa9141b082e089628e81bd1379551f [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;
Fabrice Di Meglio76820132014-02-10 16:22:28 -080021import android.preference.PreferenceActivity;
Raju Yadav05fb0692015-04-29 11:04:49 +020022import android.preference.PreferenceScreen;
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -080023
Fabrice Di Meglio76820132014-02-10 16:22:28 -080024public class TestingSettings extends PreferenceActivity {
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -080025
26 @Override
Fabrice Di Meglio76820132014-02-10 16:22:28 -080027 protected void onCreate(Bundle savedInstanceState) {
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -080028 super.onCreate(savedInstanceState);
29
30 addPreferencesFromResource(R.xml.testing_settings);
Raju Yadav05fb0692015-04-29 11:04:49 +020031
Xiaohui Chen44879a32015-07-22 13:53:22 -070032 final UserManager um = UserManager.get(this);
33 if (!um.isAdminUser()) {
Raju Yadav05fb0692015-04-29 11:04:49 +020034 PreferenceScreen preferenceScreen = (PreferenceScreen)
35 findPreference("radio_info_settings");
36 getPreferenceScreen().removePreference(preferenceScreen);
37 }
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -080038 }
Fabrice Di Meglio76820132014-02-10 16:22:28 -080039
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -080040}