File tree Expand file tree Collapse file tree 8 files changed +56
-9
lines changed
go/quickstep/src/com/android/launcher3/uioverrides
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides
src/com/android/launcher3 Expand file tree Collapse file tree 8 files changed +56
-9
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public static TouchController[] createTouchControllers(Launcher launcher) {
5151 .getMode ().hasGestures ;
5252 list .add (new PortraitStatesTouchController (launcher , allowDragToOverview ));
5353 }
54- if (FeatureFlags . PULL_DOWN_STATUS_BAR && Utilities .IS_DEBUG_DEVICE
54+ if (Utilities . togglePullDownStatusBar ( launcher ) && Utilities .IS_DEBUG_DEVICE
5555 && !launcher .getDeviceProfile ().isMultiWindowMode
5656 && !launcher .getDeviceProfile ().isVerticalBarLayout ()) {
5757 list .add (new StatusBarTouchController (launcher ));
Original file line number Diff line number Diff line change 4444import com .android .launcher3 .util .TouchController ;
4545import com .android .launcher3 .util .UiThreadHelper ;
4646import com .android .launcher3 .util .UiThreadHelper .AsyncCommand ;
47+ import com .android .launcher3 .Utilities ;
4748import com .android .quickstep .SysUINavigationMode ;
4849import com .android .quickstep .SysUINavigationMode .Mode ;
4950import com .android .quickstep .TouchInteractionService ;
@@ -164,7 +165,7 @@ public static TouchController[] createTouchControllers(Launcher launcher) {
164165 }
165166 }
166167
167- if (FeatureFlags . PULL_DOWN_STATUS_BAR
168+ if (Utilities . togglePullDownStatusBar ( launcher )
168169 && !launcher .getDeviceProfile ().isMultiWindowMode ) {
169170 list .add (new StatusBarTouchController (launcher ));
170171 }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <!--
3+ /* Copyright 2017, The Android Open Source Project
4+ **
5+ ** Licensed under the Apache License, Version 2.0 (the "License");
6+ ** you may not use this file except in compliance with the License.
7+ ** You may obtain a copy of the License at
8+ **
9+ ** http://www.apache.org/licenses/LICENSE-2.0
10+ **
11+ ** Unless required by applicable law or agreed to in writing, software
12+ ** distributed under the License is distributed on an "AS IS" BASIS,
13+ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ ** See the License for the specific language governing permissions and
15+ ** limitations under the License.
16+ */
17+ -->
18+
19+ <resources >
20+ <bool name =" toggle_pull_down_status_bar" >true</bool >
21+ </resources >
Original file line number Diff line number Diff line change 7676 <string name =" app_info_last_update" translatable =" false" >Last update</string >
7777 <string name =" app_info_version" translatable =" false" >Version</string >
7878 <string name =" app_info_more" translatable =" false" >More</string >
79+
80+ <string name =" toggle_pull_down_status_bar_title" >Pull Down Status Bar</string >
81+ <string name =" toggle_pull_down_status_bar_desc" >toggle the options for opening the status bar with swipe down gesture from the home screen like on iOS/iPad OS do for global search</string >
7982</resources >
Original file line number Diff line number Diff line change 4242 android : summaryOn =" @string/settings_edit_allow_summary_on"
4343 android : summaryOff =" @string/settings_edit_allow_summary_off" />
4444
45- <SwitchPreference
46- android : key =" pref_sleep_gesture"
47- android : title =" @string/pref_sleep_gesture_title"
48- android : summary =" @string/pref_sleep_gesture_summary"
49- android : defaultValue =" true"
50- android : persistent =" true" />
45+ <SwitchPreference
46+ android : key =" pref_togglePullDownStatusBar"
47+ android : title =" @string/toggle_pull_down_status_bar_title"
48+ android : summary =" @string/toggle_pull_down_status_bar_desc"
49+ android : defaultValue =" @bool/toggle_pull_down_status_bar"
50+ android : persistent =" true" />
51+
52+ <SwitchPreference
53+ android : key =" pref_sleep_gesture"
54+ android : title =" @string/pref_sleep_gesture_title"
55+ android : summary =" @string/pref_sleep_gesture_summary"
56+ android : defaultValue =" true"
57+ android : persistent =" true" />
5158 </PreferenceCategory >
5259
5360 <PreferenceCategory
Original file line number Diff line number Diff line change @@ -135,6 +135,12 @@ public static void enableRunningInTestHarnessForTests() {
135135 IS_RUNNING_IN_TEST_HARNESS = true ;
136136 }
137137
138+ public static final String TOGGLE_PULL_DOWN_STATUS_BAR = "pref_togglePullDownStatusBar" ;
139+
140+ public static boolean togglePullDownStatusBar (Context context ) {
141+ return getPrefs (context ).getBoolean (TOGGLE_PULL_DOWN_STATUS_BAR , FeatureFlags .PULL_DOWN_STATUS_BAR );
142+ }
143+
138144 public static boolean isPropertyEnabled (String propertyName ) {
139145 return Log .isLoggable (propertyName , Log .VERBOSE );
140146 }
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ public static boolean showFlagTogglerUi(Context context) {
120120 "Adds localized title and keyword search and ranking" );
121121
122122 public static final TogglableFlag ENABLE_PREDICTION_DISMISS = new TogglableFlag (
123- "ENABLE_PREDICTION_DISMISS" , false , "Allow option to dimiss apps from predicted list" );
123+ "ENABLE_PREDICTION_DISMISS" , true , "Allow option to dimiss apps from predicted list" );
124124
125125 public static final TogglableFlag ASSISTANT_GIVES_LAUNCHER_FOCUS = new TogglableFlag (
126126 "ASSISTANT_GIVES_LAUNCHER_FOCUS" , false ,
Original file line number Diff line number Diff line change @@ -188,6 +188,15 @@ private void updatePreferences() {
188188 }
189189 }
190190 }
191+
192+ Preference togglePullDownStatusBar = findPreference (Utilities .TOGGLE_PULL_DOWN_STATUS_BAR );
193+ togglePullDownStatusBar .setOnPreferenceChangeListener (new Preference .OnPreferenceChangeListener () {
194+ public boolean onPreferenceChange (Preference preference , Object newValue ) {
195+ LauncherAppState .getInstanceNoCreate ().setNeedsRestart ();
196+ //Utilities.restart(getActivity());
197+ return true ;
198+ }
199+ });
191200 }
192201
193202 @ Override
You can’t perform that action at this time.
0 commit comments