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

Commit 488d8ade authored by Jon Miranda's avatar Jon Miranda
Browse files

Use ContextCompat.getColor to support API levels below 23.

Found while debugging on Lollipop.

Change-Id: Ibe97fd30c4ee8cd0c1735a41802b859345f9e931
parent 9784572c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import android.support.v4.graphics.ColorUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
@@ -69,7 +70,7 @@ public class Hotseat extends FrameLayout
        mLauncher = (Launcher) context;
        mHasVerticalHotseat = mLauncher.getDeviceProfile().isVerticalBarLayout();
        mBackgroundColor = ColorUtils.setAlphaComponent(
                context.getColor(R.color.all_apps_container_color), 0);
                ContextCompat.getColor(context, R.color.all_apps_container_color), 0);
        mBackground = new ColorDrawable(mBackgroundColor);
        setBackground(mBackground);
    }
+2 −1
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.animation.FastOutSlowInInterpolator;
import android.util.Log;
import android.view.MotionEvent;
@@ -101,7 +102,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
                R.dimen.all_apps_bezel_swipe_height);

        mEvaluator = new ArgbEvaluator();
        mAllAppsBackgroundColor = l.getColor(R.color.all_apps_container_color);
        mAllAppsBackgroundColor = ContextCompat.getColor(l, R.color.all_apps_container_color);
    }

    @Override