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) {
51
51
.getMode ().hasGestures ;
52
52
list .add (new PortraitStatesTouchController (launcher , allowDragToOverview ));
53
53
}
54
- if (FeatureFlags . PULL_DOWN_STATUS_BAR && Utilities .IS_DEBUG_DEVICE
54
+ if (Utilities . togglePullDownStatusBar ( launcher ) && Utilities .IS_DEBUG_DEVICE
55
55
&& !launcher .getDeviceProfile ().isMultiWindowMode
56
56
&& !launcher .getDeviceProfile ().isVerticalBarLayout ()) {
57
57
list .add (new StatusBarTouchController (launcher ));
Original file line number Diff line number Diff line change 44
44
import com .android .launcher3 .util .TouchController ;
45
45
import com .android .launcher3 .util .UiThreadHelper ;
46
46
import com .android .launcher3 .util .UiThreadHelper .AsyncCommand ;
47
+ import com .android .launcher3 .Utilities ;
47
48
import com .android .quickstep .SysUINavigationMode ;
48
49
import com .android .quickstep .SysUINavigationMode .Mode ;
49
50
import com .android .quickstep .TouchInteractionService ;
@@ -164,7 +165,7 @@ public static TouchController[] createTouchControllers(Launcher launcher) {
164
165
}
165
166
}
166
167
167
- if (FeatureFlags . PULL_DOWN_STATUS_BAR
168
+ if (Utilities . togglePullDownStatusBar ( launcher )
168
169
&& !launcher .getDeviceProfile ().isMultiWindowMode ) {
169
170
list .add (new StatusBarTouchController (launcher ));
170
171
}
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 76
76
<string name =" app_info_last_update" translatable =" false" >Last update</string >
77
77
<string name =" app_info_version" translatable =" false" >Version</string >
78
78
<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 >
79
82
</resources >
Original file line number Diff line number Diff line change 42
42
android : summaryOn =" @string/settings_edit_allow_summary_on"
43
43
android : summaryOff =" @string/settings_edit_allow_summary_off" />
44
44
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" />
51
58
</PreferenceCategory >
52
59
53
60
<PreferenceCategory
Original file line number Diff line number Diff line change @@ -135,6 +135,12 @@ public static void enableRunningInTestHarnessForTests() {
135
135
IS_RUNNING_IN_TEST_HARNESS = true ;
136
136
}
137
137
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
+
138
144
public static boolean isPropertyEnabled (String propertyName ) {
139
145
return Log .isLoggable (propertyName , Log .VERBOSE );
140
146
}
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ public static boolean showFlagTogglerUi(Context context) {
120
120
"Adds localized title and keyword search and ranking" );
121
121
122
122
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" );
124
124
125
125
public static final TogglableFlag ASSISTANT_GIVES_LAUNCHER_FOCUS = new TogglableFlag (
126
126
"ASSISTANT_GIVES_LAUNCHER_FOCUS" , false ,
Original file line number Diff line number Diff line change @@ -188,6 +188,15 @@ private void updatePreferences() {
188
188
}
189
189
}
190
190
}
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
+ });
191
200
}
192
201
193
202
@ Override
You can’t perform that action at this time.
0 commit comments