mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Lazily instantiate LauncherAppState.
The application context for LauncherAppState is supplied by the application whenever it starts; don't ask for an instance before that. Change-Id: I1ca8ea04238a357a682f79250f08813ead7ae532
This commit is contained in:
@@ -45,7 +45,7 @@ public class BubbleTextView extends TextView {
|
||||
|
||||
private int mPrevAlpha = -1;
|
||||
|
||||
private final HolographicOutlineHelper mOutlineHelper = HolographicOutlineHelper.obtain();
|
||||
private HolographicOutlineHelper mOutlineHelper;
|
||||
private final Canvas mTempCanvas = new Canvas();
|
||||
private final Rect mTempRect = new Rect();
|
||||
private boolean mDidInvalidateForPressedState;
|
||||
@@ -80,6 +80,8 @@ public class BubbleTextView extends TextView {
|
||||
mLongPressHelper = new CheckLongPressHelper(this);
|
||||
mBackground = getBackground();
|
||||
|
||||
mOutlineHelper = HolographicOutlineHelper.obtain(getContext());
|
||||
|
||||
final Resources res = getContext().getResources();
|
||||
mFocusedOutlineColor = mFocusedGlowColor = mPressedOutlineColor = mPressedGlowColor =
|
||||
res.getColor(android.R.color.holo_blue_light);
|
||||
@@ -189,7 +191,7 @@ public class BubbleTextView extends TextView {
|
||||
* Responsibility for the bitmap is transferred to the caller.
|
||||
*/
|
||||
private Bitmap createGlowingOutline(Canvas canvas, int outlineColor, int glowColor) {
|
||||
final int padding = HolographicOutlineHelper.MAX_OUTER_BLUR_RADIUS;
|
||||
final int padding = mOutlineHelper.mMaxOuterBlurRadius;
|
||||
final Bitmap b = Bitmap.createBitmap(
|
||||
getWidth() + padding, getHeight() + padding, Bitmap.Config.ARGB_8888);
|
||||
|
||||
@@ -269,7 +271,7 @@ public class BubbleTextView extends TextView {
|
||||
}
|
||||
|
||||
int getPressedOrFocusedBackgroundPadding() {
|
||||
return HolographicOutlineHelper.MAX_OUTER_BLUR_RADIUS / 2;
|
||||
return mOutlineHelper.mMaxOuterBlurRadius / 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user