Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1a2c91b authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Gerrit Code Review
Browse files

Merge "Remove phone information for a secondary user"

parents 1cfc2fc4 05fb069d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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" />
+8 −0
Original line number Diff line number Diff line
@@ -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);
        }
    }

}