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

Commit cf619526 authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Use Launcher.getLauncher(Context) instead of type-casting." into ub-launcher3-calgary-polish

parents 3f886406 2fd02086
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ public class AppWidgetResizeFrame extends FrameLayout implements View.OnKeyListe
            LauncherAppWidgetHostView widgetView, CellLayout cellLayout, DragLayer dragLayer) {

        super(context);
        mLauncher = (Launcher) context;
        mLauncher = Launcher.getLauncher(context);
        mCellLayout = cellLayout;
        mWidgetView = widgetView;
        LauncherAppWidgetProviderInfo info = (LauncherAppWidgetProviderInfo)
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ public abstract class ButtonDropTarget extends TextView

    public ButtonDropTarget(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        mLauncher = (Launcher) context;
        mLauncher = Launcher.getLauncher(context);

        Resources resources = getResources();
        mBottomDragPadding = resources.getDimensionPixelSize(R.dimen.drop_target_drag_padding);
+1 −1
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
        // the user where a dragged item will land when dropped.
        setWillNotDraw(false);
        setClipToPadding(false);
        mLauncher = (Launcher) context;
        mLauncher = Launcher.getLauncher(context);

        DeviceProfile grid = mLauncher.getDeviceProfile();

+2 −2
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ public class FocusHelper {
            return consume;
        }

        final Launcher launcher = (Launcher) v.getContext();
        final Launcher launcher = Launcher.getLauncher(v.getContext());
        final DeviceProfile profile = launcher.getDeviceProfile();

        if (DEBUG) {
@@ -341,7 +341,7 @@ public class FocusHelper {
            return consume;
        }

        Launcher launcher = (Launcher) v.getContext();
        Launcher launcher = Launcher.getLauncher(v.getContext());
        DeviceProfile profile = launcher.getDeviceProfile();

        if (DEBUG) {
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ public class Hotseat extends FrameLayout

    public Hotseat(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        mLauncher = (Launcher) context;
        mLauncher = Launcher.getLauncher(context);
        mHasVerticalHotseat = mLauncher.getDeviceProfile().isVerticalBarLayout();
        mBackgroundColor = ColorUtils.setAlphaComponent(
                ContextCompat.getColor(context, R.color.all_apps_container_color), 0);
Loading