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

Commit 067e5e01 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Removing some dead code in paged view" into ub-launcher3-burnaby

parents 8a8f03d1 8e2133b2
Loading
Loading
Loading
Loading
+0 −71
Original line number Diff line number Diff line
/*
 * Copyright (C) 2010 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.launcher3;

import android.content.Context;
import android.view.View;

public class AppsCustomizeCellLayout extends CellLayout implements Page {

    final FocusIndicatorView mFocusHandlerView;

    public AppsCustomizeCellLayout(Context context) {
        super(context);

        mFocusHandlerView = new FocusIndicatorView(context);
        addView(mFocusHandlerView, 0);
        mFocusHandlerView.getLayoutParams().width = FocusIndicatorView.DEFAULT_LAYOUT_SIZE;
        mFocusHandlerView.getLayoutParams().height = FocusIndicatorView.DEFAULT_LAYOUT_SIZE;
    }

    @Override
    public void removeAllViewsOnPage() {
        removeAllViews();
        setLayerType(LAYER_TYPE_NONE, null);
    }

    @Override
    public void removeViewOnPageAt(int index) {
        removeViewAt(index);
    }

    @Override
    public int getPageChildCount() {
        return getChildCount();
    }

    @Override
    public View getChildOnPageAt(int i) {
        return getChildAt(i);
    }

    @Override
    public int indexOfChildOnPage(View v) {
        return indexOfChild(v);
    }

    /**
     * Clears all the key listeners for the individual icons.
     */
    public void resetChildrenOnKeyListeners() {
        ShortcutAndWidgetContainer children = getShortcutsAndWidgets();
        int childCount = children.getChildCount();
        for (int j = 0; j < childCount; ++j) {
            children.getChildAt(j).setOnKeyListener(null);
        }
    }
}
+0 −10
Original line number Diff line number Diff line
@@ -78,7 +78,6 @@ public class FolderPagedView extends PagedView {
    public FolderPagedView(Context context, AttributeSet attrs) {
        super(context, attrs);
        LauncherAppState app = LauncherAppState.getInstance();
        setDataIsReady();

        DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
        if (ALLOW_FOLDER_SCROLL) {
@@ -346,15 +345,6 @@ public class FolderPagedView extends PagedView {
        }
    }

    @Override
    protected void loadAssociatedPages(int page, boolean immediateAndOnly) { }

    @Override
    public void syncPages() { }

    @Override
    public void syncPageItems(int page, boolean immediate) { }

    public int getDesiredWidth() {
        return getPageCount() > 0 ? getPageAt(0).getDesiredWidth() : 0;
    }
+1 −2
Original line number Diff line number Diff line
@@ -3231,8 +3231,7 @@ public class Launcher extends Activity
        // The hotseat touch handling does not go through Workspace, and we always allow long press
        // on hotseat items.
        final boolean inHotseat = isHotseatLayout(v);
        boolean allowLongPress = inHotseat || mWorkspace.allowLongPress();
        if (allowLongPress && !mDragController.isDragging()) {
        if (!mDragController.isDragging()) {
            if (itemUnderLongClick == null) {
                // User long pressed on empty space
                mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
+67 −614

File changed.

Preview size limit exceeded, changes collapsed.

+0 −12
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ public class Workspace extends SmoothPagedView
    protected static final int FADE_EMPTY_SCREEN_DURATION = 150;

    private static final int ADJACENT_SCREEN_DROP_DURATION = 300;
    private static final int FLING_THRESHOLD_VELOCITY = 500;

    static final boolean MAP_NO_RECURSE = false;
    static final boolean MAP_RECURSE = true;
@@ -306,13 +305,11 @@ public class Workspace extends SmoothPagedView
     */
    public Workspace(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        mContentIsRefreshable = false;

        mOutlineHelper = HolographicOutlineHelper.obtain(context);

        mDragEnforcer = new DropTarget.DragEnforcer(context);
        // With workspace, data is available straight from the get-go
        setDataIsReady();

        mLauncher = (Launcher) context;
        mStateTransitionAnimation = new WorkspaceStateTransitionAnimation(mLauncher, this);
@@ -448,7 +445,6 @@ public class Workspace extends SmoothPagedView
        display.getSize(mDisplaySize);

        mMaxDistanceForFolderCreation = (0.55f * grid.iconSizePx);
        mFlingThresholdVelocity = (int) (FLING_THRESHOLD_VELOCITY * mDensity);

        // Set the wallpaper dimensions when Launcher starts up
        setWallpaperDimension();
@@ -4483,14 +4479,6 @@ public class Workspace extends SmoothPagedView
        return super.getPageIndicatorMarker(pageIndex);
    }

    @Override
    public void syncPages() {
    }

    @Override
    public void syncPageItems(int page, boolean immediate) {
    }

    protected String getPageIndicatorDescription() {
        String settings = getResources().getString(R.string.settings_button_text);
        return getCurrentPageDescription() + ", " + settings;