Loading AndroidManifest.xml +2 −19 Original line number Diff line number Diff line Loading @@ -1920,7 +1920,8 @@ android:label="@string/development_settings_title" android:icon="@drawable/ic_settings_development" android:taskAffinity="com.android.settings" android:parentActivityName="Settings"> android:parentActivityName="Settings" android:enabled="false"> <intent-filter android:priority="1"> <action android:name="android.settings.APPLICATION_DEVELOPMENT_SETTINGS" /> <action android:name="com.android.settings.APPLICATION_DEVELOPMENT_SETTINGS" /> Loading Loading @@ -1989,15 +1990,6 @@ android:value="com.android.settings.print.PrintJobSettingsFragment" /> </activity> <!-- Keep compatibility with old shortcuts. --> <activity-alias android:name="DevelopmentSettings" android:exported="true" android:label="@string/development_settings_title" android:targetActivity="Settings$DevelopmentSettingsDashboardActivity"> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.development.DevelopmentSettingsDashboardFragment" /> </activity-alias> <activity android:name=".development.AppPicker" android:label="@string/select_application" android:theme="@android:style/Theme.DeviceDefault.Light.Dialog" /> Loading @@ -2006,15 +1998,6 @@ android:label="@string/select_webview_provider_dialog_title"> </activity> <!-- Keep compatibility with old shortcuts. --> <activity-alias android:name="UsbSettings" android:exported="true" android:label="@string/storage_title_usb" android:targetActivity="Settings$DevelopmentSettingsDashboardActivity"> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.deviceinfo.UsbSettings" /> </activity-alias> <!-- Bluetooth stuff --> <activity android:name=".bluetooth.BluetoothPairingDialog" Loading src/com/android/settings/SettingsActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -835,7 +835,8 @@ public class SettingsActivity extends SettingsDrawerActivity || somethingChanged; final boolean showDev = DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(this) && !um.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES); && !um.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES) && !Utils.isMonkeyRunning(); somethingChanged = setTileEnabled(new ComponentName(packageName, Settings.DevelopmentSettingsDashboardActivity.class.getName()), Loading src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java +11 −2 Original line number Diff line number Diff line Loading @@ -298,12 +298,15 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra @Override protected int getPreferenceScreenResId() { Log.d(TAG, "Creating pref screen"); return R.xml.development_settings; return Utils.isMonkeyRunning()? R.xml.placeholder_prefs : R.xml.development_settings; } @Override protected List<AbstractPreferenceController> getPreferenceControllers(Context context) { if (Utils.isMonkeyRunning()) { mPreferenceControllers = new ArrayList<>(); return null; } mPreferenceControllers = buildPreferenceControllers(context, getActivity(), getLifecycle(), this /* devOptionsDashboardFragment */, new BluetoothA2dpConfigStore()); Loading @@ -326,6 +329,9 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra } private void enableDeveloperOptions() { if (Utils.isMonkeyRunning()) { return; } DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(getContext(), true); for (AbstractPreferenceController controller : mPreferenceControllers) { if (controller instanceof DeveloperOptionsPreferenceController) { Loading @@ -335,6 +341,9 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra } private void disableDeveloperOptions() { if (Utils.isMonkeyRunning()) { return; } DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(getContext(), false); final SystemPropPoker poker = SystemPropPoker.getInstance(); poker.blockPokes(); Loading tests/robotests/src/com/android/settings/widget/ActionBarShadowControllerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; @RunWith(SettingsRobolectricTestRunner.class) @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION) @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O) public class ActionBarShadowControllerTest { @Mock Loading tests/robotests/src/com/android/settings/widget/ActionButtonPreferenceTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; @RunWith(SettingsRobolectricTestRunner.class) @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION) @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O) public class ActionButtonPreferenceTest { private Context mContext; Loading Loading
AndroidManifest.xml +2 −19 Original line number Diff line number Diff line Loading @@ -1920,7 +1920,8 @@ android:label="@string/development_settings_title" android:icon="@drawable/ic_settings_development" android:taskAffinity="com.android.settings" android:parentActivityName="Settings"> android:parentActivityName="Settings" android:enabled="false"> <intent-filter android:priority="1"> <action android:name="android.settings.APPLICATION_DEVELOPMENT_SETTINGS" /> <action android:name="com.android.settings.APPLICATION_DEVELOPMENT_SETTINGS" /> Loading Loading @@ -1989,15 +1990,6 @@ android:value="com.android.settings.print.PrintJobSettingsFragment" /> </activity> <!-- Keep compatibility with old shortcuts. --> <activity-alias android:name="DevelopmentSettings" android:exported="true" android:label="@string/development_settings_title" android:targetActivity="Settings$DevelopmentSettingsDashboardActivity"> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.development.DevelopmentSettingsDashboardFragment" /> </activity-alias> <activity android:name=".development.AppPicker" android:label="@string/select_application" android:theme="@android:style/Theme.DeviceDefault.Light.Dialog" /> Loading @@ -2006,15 +1998,6 @@ android:label="@string/select_webview_provider_dialog_title"> </activity> <!-- Keep compatibility with old shortcuts. --> <activity-alias android:name="UsbSettings" android:exported="true" android:label="@string/storage_title_usb" android:targetActivity="Settings$DevelopmentSettingsDashboardActivity"> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.deviceinfo.UsbSettings" /> </activity-alias> <!-- Bluetooth stuff --> <activity android:name=".bluetooth.BluetoothPairingDialog" Loading
src/com/android/settings/SettingsActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -835,7 +835,8 @@ public class SettingsActivity extends SettingsDrawerActivity || somethingChanged; final boolean showDev = DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(this) && !um.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES); && !um.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES) && !Utils.isMonkeyRunning(); somethingChanged = setTileEnabled(new ComponentName(packageName, Settings.DevelopmentSettingsDashboardActivity.class.getName()), Loading
src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java +11 −2 Original line number Diff line number Diff line Loading @@ -298,12 +298,15 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra @Override protected int getPreferenceScreenResId() { Log.d(TAG, "Creating pref screen"); return R.xml.development_settings; return Utils.isMonkeyRunning()? R.xml.placeholder_prefs : R.xml.development_settings; } @Override protected List<AbstractPreferenceController> getPreferenceControllers(Context context) { if (Utils.isMonkeyRunning()) { mPreferenceControllers = new ArrayList<>(); return null; } mPreferenceControllers = buildPreferenceControllers(context, getActivity(), getLifecycle(), this /* devOptionsDashboardFragment */, new BluetoothA2dpConfigStore()); Loading @@ -326,6 +329,9 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra } private void enableDeveloperOptions() { if (Utils.isMonkeyRunning()) { return; } DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(getContext(), true); for (AbstractPreferenceController controller : mPreferenceControllers) { if (controller instanceof DeveloperOptionsPreferenceController) { Loading @@ -335,6 +341,9 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra } private void disableDeveloperOptions() { if (Utils.isMonkeyRunning()) { return; } DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(getContext(), false); final SystemPropPoker poker = SystemPropPoker.getInstance(); poker.blockPokes(); Loading
tests/robotests/src/com/android/settings/widget/ActionBarShadowControllerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; @RunWith(SettingsRobolectricTestRunner.class) @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION) @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O) public class ActionBarShadowControllerTest { @Mock Loading
tests/robotests/src/com/android/settings/widget/ActionButtonPreferenceTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; @RunWith(SettingsRobolectricTestRunner.class) @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION) @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION_O) public class ActionButtonPreferenceTest { private Context mContext; Loading