Revert "Added Developer Options settings for multi-window mode."

This reverts commit 4c9d667bc2.

Bug: 24462906
Bug: 19494313
Change-Id: Iaa698868d8896a09c377b5da03c20b2a0b72d253
This commit is contained in:
Wale Ogunwale
2015-10-06 13:42:57 -07:00
parent f7f92b1a98
commit b4d7efbfa2
3 changed files with 0 additions and 65 deletions

View File

@@ -145,7 +145,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
private static final String TRANSITION_ANIMATION_SCALE_KEY = "transition_animation_scale";
private static final String ANIMATOR_DURATION_SCALE_KEY = "animator_duration_scale";
private static final String OVERLAY_DISPLAY_DEVICES_KEY = "overlay_display_devices";
private static final String ENABLE_MULTI_WINDOW_KEY = "enable_multi_window";
private static final String DEBUG_DEBUGGING_CATEGORY_KEY = "debug_debugging_category";
private static final String SELECT_LOGD_SIZE_KEY = "select_logd_size";
private static final String SELECT_LOGD_SIZE_PROPERTY = "persist.logd.size";
@@ -187,7 +186,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
private static final int[] MOCK_LOCATION_APP_OPS = new int[] {AppOpsManager.OP_MOCK_LOCATION};
private static final String MULTI_WINDOW_SYSTEM_PROPERTY = "persist.sys.debug.multi_window";
private IWindowManager mWindowManager;
private IBackupManager mBackupManager;
private DevicePolicyManager mDpm;
@@ -231,7 +229,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
private SwitchPreference mShowTouches;
private SwitchPreference mShowScreenUpdates;
private SwitchPreference mDisableOverlays;
private SwitchPreference mEnableMultiWindow;
private SwitchPreference mShowCpuUsage;
private SwitchPreference mForceHardwareUi;
private SwitchPreference mForceMsaa;
@@ -384,18 +381,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
mTransitionAnimationScale = addListPreference(TRANSITION_ANIMATION_SCALE_KEY);
mAnimatorDurationScale = addListPreference(ANIMATOR_DURATION_SCALE_KEY);
mOverlayDisplayDevices = addListPreference(OVERLAY_DISPLAY_DEVICES_KEY);
mEnableMultiWindow = findAndInitSwitchPref(ENABLE_MULTI_WINDOW_KEY);
if (!showEnableMultiWindowPreference()) {
final PreferenceGroup drawingGroup =
(PreferenceGroup)findPreference("debug_drawing_category");
if (drawingGroup != null) {
drawingGroup.removePreference(mEnableMultiWindow);
} else {
mEnableMultiWindow.setEnabled(false);
}
removePreference(mEnableMultiWindow);
mEnableMultiWindow = null;
}
mOpenGLTraces = addListPreference(OPENGL_TRACES_KEY);
mSimulateColorSpace = addListPreference(SIMULATE_COLOR_SPACE);
mUSBAudio = findAndInitSwitchPref(USB_AUDIO_KEY);
@@ -636,10 +621,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
updateDebugLayoutOptions();
updateAnimationScaleOptions();
updateOverlayDisplayDevicesOptions();
if (mEnableMultiWindow != null) {
updateSwitchPreference(mEnableMultiWindow,
SystemProperties.getBoolean(MULTI_WINDOW_SYSTEM_PROPERTY, false));
}
updateOpenGLTracesOptions();
updateImmediatelyDestroyActivitiesOptions();
updateAppProcessLimitOptions();
@@ -871,15 +852,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
return !SystemProperties.get(PERSISTENT_DATA_BLOCK_PROP).equals("");
}
private static boolean showEnableMultiWindowPreference() {
return !"user".equals(Build.TYPE);
}
private void setEnableMultiWindow(boolean value) {
SystemProperties.set(MULTI_WINDOW_SYSTEM_PROPERTY, String.valueOf(value));
pokeSystemProperties();
}
private void updateBugreportOptions() {
final ComponentName bugreportStorageProviderComponentName =
new ComponentName("com.android.shell",
@@ -1543,24 +1515,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
.show();
}
private void confirmEnableMultiWindowMode() {
DialogInterface.OnClickListener onConfirmListener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
setEnableMultiWindow((which == DialogInterface.BUTTON_POSITIVE) ? true : false);
updateAllOptions();
}
};
new AlertDialog.Builder(getActivity())
.setTitle(R.string.confirm_enable_multi_window_title)
.setMessage(R.string.confirm_enable_multi_window_text)
.setPositiveButton(R.string.enable_text, onConfirmListener)
.setNegativeButton(android.R.string.cancel, onConfirmListener)
.create()
.show();
}
@Override
public void onSwitchChanged(Switch switchView, boolean isChecked) {
if (switchView != mSwitchBar.getSwitch()) {
@@ -1701,12 +1655,6 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
writeShowUpdatesOption();
} else if (preference == mDisableOverlays) {
writeDisableOverlaysOption();
} else if (preference == mEnableMultiWindow) {
if (mEnableMultiWindow.isChecked()) {
confirmEnableMultiWindowMode();
} else {
setEnableMultiWindow(false);
}
} else if (preference == mShowCpuUsage) {
writeCpuUsageOptions();
} else if (preference == mImmediatelyDestroyActivities) {