Loading quickstep/res/values/override.xml +2 −0 Original line number Diff line number Diff line Loading @@ -29,4 +29,6 @@ <string name="secondary_display_predictions_class" translatable="false">com.android.launcher3.secondarydisplay.SecondaryDisplayPredictionsImpl</string> <string name="taskbar_model_callbacks_factory_class" translatable="false">com.android.launcher3.taskbar.TaskbarModelCallbacksFactory</string> </resources> quickstep/src/com/android/launcher3/taskbar/TaskbarModelCallbacks.java +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ public class TaskbarModelCallbacks implements private final TaskbarView mContainer; // Initialized in init. private TaskbarControllers mControllers; protected TaskbarControllers mControllers; // Used to defer any UI updates during the SUW unstash animation. private boolean mDeferUpdatesForSUW; Loading quickstep/src/com/android/launcher3/taskbar/TaskbarModelCallbacksFactory.kt 0 → 100644 +42 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.launcher3.taskbar import android.content.Context import com.android.launcher3.R import com.android.launcher3.util.ResourceBasedOverride import com.android.launcher3.util.ResourceBasedOverride.Overrides /** Creates [TaskbarModelCallbacks] instances. */ open class TaskbarModelCallbacksFactory : ResourceBasedOverride { open fun create( activityContext: TaskbarActivityContext, container: TaskbarView, ): TaskbarModelCallbacks = TaskbarModelCallbacks(activityContext, container) companion object { @JvmStatic fun newInstance(context: Context): TaskbarModelCallbacksFactory { return Overrides.getObject( TaskbarModelCallbacksFactory::class.java, context, R.string.taskbar_model_callbacks_factory_class, ) } } } quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java +2 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,8 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar mTaskbarView = taskbarView; mTaskbarIconAlpha = new MultiValueAlpha(mTaskbarView, NUM_ALPHA_CHANNELS); mTaskbarIconAlpha.setUpdateVisibility(true); mModelCallbacks = new TaskbarModelCallbacks(activity, mTaskbarView); mModelCallbacks = TaskbarModelCallbacksFactory.newInstance(mActivity) .create(mActivity, mTaskbarView); mTaskbarBottomMargin = activity.getDeviceProfile().taskbarBottomMargin; mStashedHandleHeight = activity.getResources() .getDimensionPixelSize(R.dimen.taskbar_stashed_handle_height); Loading quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +12 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ public final class TaskbarAllAppsController { private AppInfo[] mApps; private int mAppsModelFlags; private List<ItemInfo> mPredictedApps; private @Nullable List<ItemInfo> mZeroStateSearchSuggestions; private boolean mDisallowGlobalDrag; private boolean mDisallowLongClick; Loading Loading @@ -108,6 +109,14 @@ public final class TaskbarAllAppsController { } } /** Updates the current search suggestions. */ public void setZeroStateSearchSuggestions(List<ItemInfo> zeroStateSearchSuggestions) { mZeroStateSearchSuggestions = zeroStateSearchSuggestions; if (mSearchSessionController != null) { mSearchSessionController.setZeroStateSearchSuggestions(zeroStateSearchSuggestions); } } /** Updates the current notification dots. */ public void updateNotificationDots(Predicate<PackageUserKey> updatedDots) { if (mAppsView != null) { Loading Loading @@ -143,6 +152,9 @@ public final class TaskbarAllAppsController { mSearchSessionController = TaskbarSearchSessionController.newInstance(mOverlayContext); mOverlayContext.setSearchSessionController(mSearchSessionController); mSearchSessionController.setZeroStatePredictedItems(mPredictedApps); if (mZeroStateSearchSuggestions != null) { mSearchSessionController.setZeroStateSearchSuggestions(mZeroStateSearchSuggestions); } mSearchSessionController.startLifecycle(); mSlideInView = (TaskbarAllAppsSlideInView) mOverlayContext.getLayoutInflater().inflate( Loading Loading
quickstep/res/values/override.xml +2 −0 Original line number Diff line number Diff line Loading @@ -29,4 +29,6 @@ <string name="secondary_display_predictions_class" translatable="false">com.android.launcher3.secondarydisplay.SecondaryDisplayPredictionsImpl</string> <string name="taskbar_model_callbacks_factory_class" translatable="false">com.android.launcher3.taskbar.TaskbarModelCallbacksFactory</string> </resources>
quickstep/src/com/android/launcher3/taskbar/TaskbarModelCallbacks.java +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ public class TaskbarModelCallbacks implements private final TaskbarView mContainer; // Initialized in init. private TaskbarControllers mControllers; protected TaskbarControllers mControllers; // Used to defer any UI updates during the SUW unstash animation. private boolean mDeferUpdatesForSUW; Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarModelCallbacksFactory.kt 0 → 100644 +42 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.launcher3.taskbar import android.content.Context import com.android.launcher3.R import com.android.launcher3.util.ResourceBasedOverride import com.android.launcher3.util.ResourceBasedOverride.Overrides /** Creates [TaskbarModelCallbacks] instances. */ open class TaskbarModelCallbacksFactory : ResourceBasedOverride { open fun create( activityContext: TaskbarActivityContext, container: TaskbarView, ): TaskbarModelCallbacks = TaskbarModelCallbacks(activityContext, container) companion object { @JvmStatic fun newInstance(context: Context): TaskbarModelCallbacksFactory { return Overrides.getObject( TaskbarModelCallbacksFactory::class.java, context, R.string.taskbar_model_callbacks_factory_class, ) } } }
quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java +2 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,8 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar mTaskbarView = taskbarView; mTaskbarIconAlpha = new MultiValueAlpha(mTaskbarView, NUM_ALPHA_CHANNELS); mTaskbarIconAlpha.setUpdateVisibility(true); mModelCallbacks = new TaskbarModelCallbacks(activity, mTaskbarView); mModelCallbacks = TaskbarModelCallbacksFactory.newInstance(mActivity) .create(mActivity, mTaskbarView); mTaskbarBottomMargin = activity.getDeviceProfile().taskbarBottomMargin; mStashedHandleHeight = activity.getResources() .getDimensionPixelSize(R.dimen.taskbar_stashed_handle_height); Loading
quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +12 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ public final class TaskbarAllAppsController { private AppInfo[] mApps; private int mAppsModelFlags; private List<ItemInfo> mPredictedApps; private @Nullable List<ItemInfo> mZeroStateSearchSuggestions; private boolean mDisallowGlobalDrag; private boolean mDisallowLongClick; Loading Loading @@ -108,6 +109,14 @@ public final class TaskbarAllAppsController { } } /** Updates the current search suggestions. */ public void setZeroStateSearchSuggestions(List<ItemInfo> zeroStateSearchSuggestions) { mZeroStateSearchSuggestions = zeroStateSearchSuggestions; if (mSearchSessionController != null) { mSearchSessionController.setZeroStateSearchSuggestions(zeroStateSearchSuggestions); } } /** Updates the current notification dots. */ public void updateNotificationDots(Predicate<PackageUserKey> updatedDots) { if (mAppsView != null) { Loading Loading @@ -143,6 +152,9 @@ public final class TaskbarAllAppsController { mSearchSessionController = TaskbarSearchSessionController.newInstance(mOverlayContext); mOverlayContext.setSearchSessionController(mSearchSessionController); mSearchSessionController.setZeroStatePredictedItems(mPredictedApps); if (mZeroStateSearchSuggestions != null) { mSearchSessionController.setZeroStateSearchSuggestions(mZeroStateSearchSuggestions); } mSearchSessionController.startLifecycle(); mSlideInView = (TaskbarAllAppsSlideInView) mOverlayContext.getLayoutInflater().inflate( Loading