Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5df03e15 authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge changes from topic "taskbar-hotseat" into sc-dev

* changes:
  Update taskbar to add extra hotseat items instead of recent apps
  Add support for having more hotseat icons in the DB than we show
parents 4a4eac8e be282e9b
Loading
Loading
Loading
Loading
+0 −21
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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.
-->

<View
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/taskbar_divider_thickness"
    android:layout_height="@dimen/taskbar_divider_height"
    android:background="@color/taskbar_divider" />
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
@@ -27,5 +27,4 @@

    <!-- Taskbar -->
    <color name="taskbar_background">#101010</color>
    <color name="taskbar_divider">#C0C0C0</color>
</resources>
 No newline at end of file
+0 −2
Original line number Diff line number Diff line
@@ -134,7 +134,5 @@
    <dimen name="taskbar_icon_drag_icon_size">54dp</dimen>
    <!-- Note that this applies to both sides of all icons, so visible space is double this. -->
    <dimen name="taskbar_icon_spacing">8dp</dimen>
    <dimen name="taskbar_divider_thickness">1dp</dimen>
    <dimen name="taskbar_divider_height">32dp</dimen>
    <dimen name="taskbar_folder_margin">16dp</dimen>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ public abstract class BaseQuickstepLauncher extends Launcher
        SysUINavigationMode.INSTANCE.get(this).removeModeChangeListener(this);
        if (mTaskbarController != null) {
            mTaskbarController.cleanup();
            mTaskbarController = null;
        }

        super.onDestroy();
+3 −3
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ public class HotseatEduController {
        ArrayList<WorkspaceItemInfo> putIntoFolder = new ArrayList<>();

        //separate folders and items that can get in folders
        for (int i = 0; i < mLauncher.getDeviceProfile().inv.numHotseatIcons; i++) {
        for (int i = 0; i < mLauncher.getDeviceProfile().numShownHotseatIcons; i++) {
            View view = mHotseat.getChildAt(i, 0);
            if (view == null) continue;
            ItemInfo info = (ItemInfo) view.getTag();
@@ -188,7 +188,7 @@ public class HotseatEduController {
                    .getInt(LauncherSettings.Settings.EXTRA_VALUE);
            mNewScreens = IntArray.wrap(pageId);
        }
        for (int i = 0; i < mLauncher.getDeviceProfile().inv.numHotseatIcons; i++) {
        for (int i = 0; i < mLauncher.getDeviceProfile().numShownHotseatIcons; i++) {
            View child = mHotseat.getChildAt(i, 0);
            if (child == null || child.getTag() == null) continue;
            ItemInfo tag = (ItemInfo) child.getTag();
@@ -224,7 +224,7 @@ public class HotseatEduController {

    void showDimissTip() {
        if (mHotseat.getShortcutsAndWidgets().getChildCount()
                < mLauncher.getDeviceProfile().inv.numHotseatIcons) {
                < mLauncher.getDeviceProfile().numShownHotseatIcons) {
            Snackbar.show(mLauncher, R.string.hotseat_tip_gaps_filled,
                    R.string.hotseat_prediction_settings, null,
                    () -> mLauncher.startActivity(getSettingsIntent()));
Loading