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

Unverified Commit f0ef0dae authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'android-13.0.0_r8' into staging/lineage-20.0_merge-android-13.0.0_r8

Android 13.0.0 Release 8 (TP1A.221005.003)

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCYzModwAKCRDorT+BmrEO
# eBSVAJwKkWvuSAjrqG1azqcWdNs1H346GACfZIeyc8WH0kL6YuKUtvOnsQKeHlQ=
# =YzoI
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Sep 27 19:44:39 2022 EEST
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [marginal]
# gpg: initial-contribution@android.com: Verified 1317 signatures in the past
#      11 months.  Encrypted 4 messages in the past 8 months.
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 4340 D135 70EF 945E 8381  0964 E8AD 3F81 9AB1 0E78

# By Sunny Goyal
# Via Android Build Coastguard Worker
* tag 'android-13.0.0_r8' of https://android.googlesource.com/platform/packages/apps/Launcher3:
  Removing tabWidth calculation and using DeviceProfile directly
  Fixing tab width and panner not aligned with the all-apps icons

Change-Id: I9679c90198bf9d2698a962a2bd026f8790905f4e
parents 1f071bc7 b6788a67
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import static com.android.launcher3.util.OnboardingPrefs.ALL_APPS_VISITED_COUNT;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.os.Build;
import android.text.Layout;
@@ -33,7 +32,6 @@ import android.view.View;
import androidx.annotation.ColorInt;
import androidx.core.content.ContextCompat;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.allapps.FloatingHeaderRow;
import com.android.launcher3.allapps.FloatingHeaderView;
@@ -238,12 +236,6 @@ public class AppsDividerView extends View implements FloatingHeaderRow {
                getPaddingBottom() + getPaddingTop());
    }

    @Override
    public void setInsets(Rect insets, DeviceProfile grid) {
        int leftRightPadding = grid.allAppsLeftRightPadding;
        setPadding(leftRightPadding, getPaddingTop(), leftRightPadding, getPaddingBottom());
    }

    @Override
    public void setVerticalScroll(int scroll, boolean isScrolledOut) {
        setTranslationY(scroll);
+0 −7
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.launcher3.appprediction;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.os.Build;
import android.util.AttributeSet;
import android.view.LayoutInflater;
@@ -251,12 +250,6 @@ public class PredictionRowView<T extends Context & ActivityContext & DeviceProfi
        }
    }

    @Override
    public void setInsets(Rect insets, DeviceProfile grid) {
        int leftRightPadding = grid.allAppsLeftRightPadding;
        setPadding(leftRightPadding, getPaddingTop(), leftRightPadding, getPaddingBottom());
    }

    @Override
    public Class<PredictionRowView> getTypeClass() {
        return PredictionRowView.class;
+0 −5
Original line number Diff line number Diff line
@@ -15,11 +15,8 @@
 */
package com.android.launcher3.allapps;

import android.graphics.Rect;
import android.view.View;

import com.android.launcher3.DeviceProfile;

/**
 * A abstract representation of a row in all-apps view
 */
@@ -29,8 +26,6 @@ public interface FloatingHeaderRow {

    void setup(FloatingHeaderView parent, FloatingHeaderRow[] allRows, boolean tabsHidden);

    void setInsets(Rect insets, DeviceProfile grid);

    int getExpectedHeight();

    /**
+3 −30
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Insettable;
import com.android.launcher3.R;
import com.android.launcher3.allapps.BaseAllAppsContainerView.AdapterHolder;
@@ -158,22 +157,6 @@ public class FloatingHeaderView extends LinearLayout implements
        PluginManagerWrapper.INSTANCE.get(getContext()).removePluginListener(this);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        mTabLayout.getLayoutParams().width = getTabWidth();
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }

    /**
     * Returns distance between left and right app icons
     */
    public int getTabWidth() {
        DeviceProfile grid = ActivityContext.lookupContext(getContext()).getDeviceProfile();
        int totalWidth = getMeasuredWidth() - getPaddingLeft() - getPaddingRight();
        int iconPadding = totalWidth / grid.numShownAllAppsColumns - grid.allAppsIconSizePx;
        return totalWidth - iconPadding - grid.allAppsIconDrawablePaddingPx;
    }

    private void recreateAllRowsArray() {
        int pluginCount = mPluginRows.size();
        if (pluginCount == 0) {
@@ -423,15 +406,6 @@ public class FloatingHeaderView extends LinearLayout implements
        p.y = getTop() - mCurrentRV.getTop() - ((ViewGroup) mCurrentRV.getParent()).getTop();
    }

    public boolean hasVisibleContent() {
        for (FloatingHeaderRow row : mAllRows) {
            if (row.hasVisibleContent()) {
                return true;
            }
        }
        return false;
    }

    public boolean isHeaderProtectionSupported() {
        return mHeaderProtectionSupported;
    }
@@ -443,10 +417,9 @@ public class FloatingHeaderView extends LinearLayout implements

    @Override
    public void setInsets(Rect insets) {
        DeviceProfile grid = ActivityContext.lookupContext(getContext()).getDeviceProfile();
        for (FloatingHeaderRow row : mAllRows) {
            row.setInsets(insets, grid);
        }
        int leftRightPadding = ActivityContext.lookupContext(getContext())
                .getDeviceProfile().allAppsLeftRightPadding;
        setPadding(leftRightPadding, getPaddingTop(), leftRightPadding, getPaddingBottom());
    }

    public <T extends FloatingHeaderRow> T findFixedRowByType(Class<T> type) {
+0 −5
Original line number Diff line number Diff line
@@ -18,10 +18,8 @@ package com.android.launcher3.allapps;
import static android.view.View.INVISIBLE;
import static android.view.View.VISIBLE;

import android.graphics.Rect;
import android.view.View;

import com.android.launcher3.DeviceProfile;
import com.android.systemui.plugins.AllAppsRow;

/**
@@ -42,9 +40,6 @@ public class PluginHeaderRow implements FloatingHeaderRow {
    public void setup(FloatingHeaderView parent, FloatingHeaderRow[] allRows,
            boolean tabsHidden) { }

    @Override
    public void setInsets(Rect insets, DeviceProfile grid) { }

    @Override
    public int getExpectedHeight() {
        return mPlugin.getExpectedHeight();
Loading