am ea53bfcd: am d9bd96b3: Add setting to disable screenshot separately (2/2)

* commit 'ea53bfcddf8c8b37a154bcbdcbbec2ee71b109d9':
  Add setting to disable screenshot separately (2/2)
diff --git a/res/xml/testing_settings.xml b/res/xml/testing_settings.xml
index d8d7705..4e5c5dd 100644
--- a/res/xml/testing_settings.xml
+++ b/res/xml/testing_settings.xml
@@ -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" />
diff --git a/src/com/android/settings/TestingSettings.java b/src/com/android/settings/TestingSettings.java
index 3994560..b20d327 100644
--- a/src/com/android/settings/TestingSettings.java
+++ b/src/com/android/settings/TestingSettings.java
@@ -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 @@
         super.onCreate(savedInstanceState);
         
         addPreferencesFromResource(R.xml.testing_settings);
+
+        if (UserHandle.myUserId() != UserHandle.USER_OWNER) {
+            PreferenceScreen preferenceScreen = (PreferenceScreen)
+                    findPreference("radio_info_settings");
+            getPreferenceScreen().removePreference(preferenceScreen);
+        }
     }
 
 }