summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Hotseat.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/Hotseat.java')
-rw-r--r--src/com/android/launcher3/Hotseat.java19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index 6b5db307b..cbd3fc034 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -20,7 +20,6 @@ import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.Gravity;
-import android.view.MotionEvent;
import android.view.View;
import android.view.ViewDebug;
import android.view.ViewGroup;
@@ -32,8 +31,6 @@ import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
public class Hotseat extends CellLayout implements LogContainerProvider, Insettable {
- private final Launcher mLauncher;
-
@ViewDebug.ExportedProperty(category = "launcher")
private boolean mHasVerticalHotseat;
@@ -47,7 +44,6 @@ public class Hotseat extends CellLayout implements LogContainerProvider, Insetta
public Hotseat(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
- mLauncher = Launcher.getLauncher(context);
}
/* Get the orientation specific coordinates given an invariant order in the hotseat. */
@@ -59,10 +55,10 @@ public class Hotseat extends CellLayout implements LogContainerProvider, Insetta
return mHasVerticalHotseat ? (getCountY() - (rank + 1)) : 0;
}
- void resetLayout(boolean hasVerticalHotseat) {
+ public void resetLayout(boolean hasVerticalHotseat) {
removeAllViewsInLayout();
mHasVerticalHotseat = hasVerticalHotseat;
- InvariantDeviceProfile idp = mLauncher.getDeviceProfile().inv;
+ InvariantDeviceProfile idp = mActivity.getDeviceProfile().inv;
if (hasVerticalHotseat) {
setGridSize(1, idp.numHotseatIcons);
} else {
@@ -71,15 +67,6 @@ public class Hotseat extends CellLayout implements LogContainerProvider, Insetta
}
@Override
- public boolean onInterceptTouchEvent(MotionEvent ev) {
- // We don't want any clicks to go through to the hotseat unless the workspace is in
- // the normal state or an accessible drag is in progress.
- return (!mLauncher.getWorkspace().workspaceIconsCanBeDragged()
- && !mLauncher.getAccessibilityDelegate().isInAccessibleDrag())
- || super.onInterceptTouchEvent(ev);
- }
-
- @Override
public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) {
target.gridX = info.cellX;
target.gridY = info.cellY;
@@ -89,7 +76,7 @@ public class Hotseat extends CellLayout implements LogContainerProvider, Insetta
@Override
public void setInsets(Rect insets) {
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
- DeviceProfile grid = mLauncher.getDeviceProfile();
+ DeviceProfile grid = mActivity.getDeviceProfile();
if (grid.isVerticalBarLayout()) {
lp.height = ViewGroup.LayoutParams.MATCH_PARENT;