fix: Allow disabling the smartspace feature
This commit is contained in:
1 parent
cd5655eaa9
commit
1bed5c06c6
13 files changed
+55
-22
No files matched your search
@@ -656,13 +656,12 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
* Initializes and binds the first page
|
||||
*/
|
||||
public void bindAndInitFirstWorkspaceScreen() {
|
||||
if (!BuildConfigs.QSB_ON_FIRST_SCREEN) {
|
||||
// Add the first page
|
||||
CellLayout firstPage = insertNewWorkspaceScreen(Workspace.FIRST_SCREEN_ID, getChildCount());
|
||||
if (!PreferenceExtensionsKt.firstBlocking(mPreferenceManager2.getEnableSmartspace())) {
|
||||
mFirstPagePinnedItem = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// Add the first page
|
||||
CellLayout firstPage = insertNewWorkspaceScreen(Workspace.FIRST_SCREEN_ID, getChildCount());
|
||||
if (mFirstPagePinnedItem == null) {
|
||||
SmartspaceMode smartspaceMode = PreferenceExtensionsKt
|
||||
.firstBlocking(mPreferenceManager2.getSmartspaceMode());
|
||||
@@ -1094,7 +1093,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
int id = mWorkspaceScreens.keyAt(i);
|
||||
CellLayout cl = mWorkspaceScreens.valueAt(i);
|
||||
// FIRST_SCREEN_ID can never be removed.
|
||||
if ((!BuildConfigs.QSB_ON_FIRST_SCREEN || id > FIRST_SCREEN_ID)
|
||||
if ((!PreferenceExtensionsKt.firstBlocking(PreferenceManager2.INSTANCE.get(getContext()).getEnableSmartspace()) || id > FIRST_SCREEN_ID)
|
||||
&& cl.getShortcutsAndWidgets().getChildCount() == 0) {
|
||||
removeScreens.add(id);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user