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

Commit 128b6ba9 authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 3280187 - ActionMode menu content not getting cleared properly when finishing

Fix bug 3279956 - FastScroller resource loading errors

Change-Id: I224b2b820636f88b09740a511aa0a9c480e54a2f
parent f8127603
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -4215,7 +4215,7 @@
 type="int"
 transient="false"
 volatile="false"
 value="16843592"
 value="16843593"
 static="true"
 final="true"
 deprecated="not deprecated"
@@ -4233,6 +4233,17 @@
 visibility="public"
>
</field>
<field name="fastScrollPreviewBackgroundRight"
 type="int"
 transient="false"
 volatile="false"
 value="16843591"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="fastScrollThumbDrawable"
 type="int"
 transient="false"
@@ -4248,7 +4259,7 @@
 type="int"
 transient="false"
 volatile="false"
 value="16843591"
 value="16843592"
 static="true"
 final="true"
 deprecated="not deprecated"
@@ -251058,7 +251069,7 @@
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="t" type="T">
<parameter name="arg0" type="T">
</parameter>
</method>
</interface>
+11 −12
Original line number Diff line number Diff line
@@ -58,11 +58,11 @@ class FastScroller {

    private static final int[] ATTRS = new int[] {
        android.R.attr.textColorPrimary,
        com.android.internal.R.attr.fastScrollThumbDrawable,
        com.android.internal.R.attr.fastScrollTrackDrawable,
        com.android.internal.R.attr.fastScrollPreviewBackgroundLeft,
        com.android.internal.R.attr.fastScrollPreviewBackgroundRight,
        com.android.internal.R.attr.fastScrollOverlayPosition
        android.R.attr.fastScrollThumbDrawable,
        android.R.attr.fastScrollTrackDrawable,
        android.R.attr.fastScrollPreviewBackgroundLeft,
        android.R.attr.fastScrollPreviewBackgroundRight,
        android.R.attr.fastScrollOverlayPosition
    };

    private static final int PRIMARY_TEXT_COLOR = 0;
@@ -227,14 +227,13 @@ class FastScroller {

    private void init(Context context) {
        // Get both the scrollbar states drawables
        final Resources res = context.getResources();
        TypedArray ta = context.getTheme().obtainStyledAttributes(ATTRS);
        useThumbDrawable(context, ta.getDrawable(ta.getIndex(THUMB_DRAWABLE)));
        mTrackDrawable = ta.getDrawable(ta.getIndex(TRACK_DRAWABLE));
        useThumbDrawable(context, ta.getDrawable(THUMB_DRAWABLE));
        mTrackDrawable = ta.getDrawable(TRACK_DRAWABLE);
        
        mOverlayDrawableLeft = ta.getDrawable(ta.getIndex(PREVIEW_BACKGROUND_LEFT));
        mOverlayDrawableRight = ta.getDrawable(ta.getIndex(PREVIEW_BACKGROUND_RIGHT));
        mOverlayPosition = ta.getInt(ta.getIndex(OVERLAY_POSITION), OVERLAY_FLOATING);
        mOverlayDrawableLeft = ta.getDrawable(PREVIEW_BACKGROUND_LEFT);
        mOverlayDrawableRight = ta.getDrawable(PREVIEW_BACKGROUND_RIGHT);
        mOverlayPosition = ta.getInt(OVERLAY_POSITION, OVERLAY_FLOATING);
        
        mScrollCompleted = true;

@@ -249,7 +248,7 @@ class FastScroller {
        mPaint.setTextAlign(Paint.Align.CENTER);
        mPaint.setTextSize(mOverlaySize / 2);

        ColorStateList textColor = ta.getColorStateList(ta.getIndex(PRIMARY_TEXT_COLOR));
        ColorStateList textColor = ta.getColorStateList(PRIMARY_TEXT_COLOR);
        int textColorNormal = textColor.getDefaultColor();
        mPaint.setColor(textColorNormal);
        mPaint.setStyle(Paint.Style.FILL_AND_STROKE);
+3 −1
Original line number Diff line number Diff line
@@ -159,7 +159,9 @@ public class ActionBarContextView extends ViewGroup implements AnimatorListener
    }

    public void initForMode(final ActionMode mode) {
        finishAnimation();
        if (mAnimationMode == ANIMATE_OUT) {
            killMode();
        }

        if (mClose == null) {
            LayoutInflater inflater = LayoutInflater.from(mContext);
+1 −0
Original line number Diff line number Diff line
@@ -1405,6 +1405,7 @@
  <public type="attr" name="fastScrollAlwaysVisible" />
  <public type="attr" name="fastScrollThumbDrawable" />
  <public type="attr" name="fastScrollPreviewBackgroundLeft" />
  <public type="attr" name="fastScrollPreviewBackgroundRight" />
  <public type="attr" name="fastScrollTrackDrawable" />
  <public type="attr" name="fastScrollOverlayPosition" />

+1 −0
Original line number Diff line number Diff line
@@ -287,6 +287,7 @@
        <item name="dayPickerWeekDayViewStyle">@style/TextAppearance.Small.DayPickerWeekDayView</item>

        <item name="fastScrollThumbDrawable">@android:drawable/scrollbar_handle_accelerated_anim2</item>
        <item name="fastScrollTrackDrawable">@null</item>
        <item name="fastScrollPreviewBackgroundRight">@android:drawable/menu_submenu_background</item>
        <item name="fastScrollPreviewBackgroundLeft">@android:drawable/menu_submenu_background</item>
        <item name="fastScrollOverlayPosition">floating</item>