am a1a2c91b
: Merge "Remove phone information for a secondary user"
* commit 'a1a2c91b7d1ad950a8636aaa029077b9e6e81aed': Remove phone information for a secondary user
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
android:title="@string/testing" >
|
||||
|
||||
<PreferenceScreen
|
||||
android:title="@string/testing_phone_info">
|
||||
android:title="@string/testing_phone_info"
|
||||
android:key="radio_info_settings">
|
||||
<intent android:action="android.intent.action.MAIN"
|
||||
android:targetPackage="com.android.settings"
|
||||
android:targetClass="com.android.settings.RadioInfo" />
|
||||
|
@@ -17,7 +17,9 @@
|
||||
package com.android.settings;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.preference.PreferenceScreen;
|
||||
|
||||
public class TestingSettings extends PreferenceActivity {
|
||||
|
||||
@@ -26,6 +28,12 @@ public class TestingSettings extends PreferenceActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
addPreferencesFromResource(R.xml.testing_settings);
|
||||
|
||||
if (UserHandle.myUserId() != UserHandle.USER_OWNER) {
|
||||
PreferenceScreen preferenceScreen = (PreferenceScreen)
|
||||
findPreference("radio_info_settings");
|
||||
getPreferenceScreen().removePreference(preferenceScreen);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user