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

Commit 739dcca3 authored by Hyunyoung Song's avatar Hyunyoung Song Committed by Automerger Merge Worker
Browse files

Merge "Icon should not disappear on drag and drop" into tm-qpr-dev am: 7eae6a4c

parents 55c85ef2 7eae6a4c
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -268,8 +268,10 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
        mDotParams.scale = 0f;
        mDotParams.scale = 0f;
        mForceHideDot = false;
        mForceHideDot = false;
        setBackground(null);
        setBackground(null);
        setSingleLine(true);
        if (FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get()
                || FeatureFlags.ENABLE_TWOLINE_DEVICESEARCH.get()) {
            setMaxLines(1);
            setMaxLines(1);
        }


        setTag(null);
        setTag(null);
        if (mIconLoadRequest != null) {
        if (mIconLoadRequest != null) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@ import static androidx.test.core.app.ApplicationProvider.getApplicationContext;
import static com.android.launcher3.config.FeatureFlags.ENABLE_TWOLINE_ALLAPPS;
import static com.android.launcher3.config.FeatureFlags.ENABLE_TWOLINE_ALLAPPS;


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;


import android.content.Context;
import android.content.Context;
import android.graphics.Typeface;
import android.graphics.Typeface;
@@ -79,7 +80,6 @@ public class BubbleTextViewTest {
        mBubbleTextView = new BubbleTextView(mContext);
        mBubbleTextView = new BubbleTextView(mContext);
        mBubbleTextView.reset();
        mBubbleTextView.reset();
        mBubbleTextView.setDisplayAllApps();
        mBubbleTextView.setDisplayAllApps();
        assertEquals(ONE_LINE, mBubbleTextView.getMaxLines());


        BubbleTextView testView = new BubbleTextView(mContext);
        BubbleTextView testView = new BubbleTextView(mContext);
        testView.setTypeface(Typeface.MONOSPACE);
        testView.setTypeface(Typeface.MONOSPACE);
@@ -108,7 +108,7 @@ public class BubbleTextViewTest {
            mBubbleTextView.setTypeface(Typeface.MONOSPACE);
            mBubbleTextView.setTypeface(Typeface.MONOSPACE);
            mBubbleTextView.measure(mLimitedWidth, 0);
            mBubbleTextView.measure(mLimitedWidth, 0);
            mBubbleTextView.onPreDraw();
            mBubbleTextView.onPreDraw();
            assertEquals(ONE_LINE, mBubbleTextView.getMaxLines());
            assertNotEquals(TWO_LINE, mBubbleTextView.getMaxLines());
        } catch (Exception e) {
        } catch (Exception e) {
            throw new RuntimeException(e);
            throw new RuntimeException(e);
        }
        }