summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/widget/BaseWidgetSheet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/widget/BaseWidgetSheet.java')
-rw-r--r--src/com/android/launcher3/widget/BaseWidgetSheet.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/com/android/launcher3/widget/BaseWidgetSheet.java b/src/com/android/launcher3/widget/BaseWidgetSheet.java
index 10708d600..20c8876d2 100644
--- a/src/com/android/launcher3/widget/BaseWidgetSheet.java
+++ b/src/com/android/launcher3/widget/BaseWidgetSheet.java
@@ -71,7 +71,7 @@ abstract class BaseWidgetSheet extends AbstractSlideInView
}
@Override
- public final boolean onLongClick(View v) {
+ public boolean onLongClick(View v) {
if (!ItemLongClickListener.canStartDrag(mLauncher)) return false;
if (v instanceof WidgetCell) {
@@ -96,7 +96,7 @@ abstract class BaseWidgetSheet extends AbstractSlideInView
}
int[] loc = new int[2];
- mLauncher.getDragLayer().getLocationInDragLayer(image, loc);
+ getPopupContainer().getLocationInDragLayer(image, loc);
new PendingItemDragHelper(v).startDrag(
image.getBitmapBounds(), image.getBitmap().getWidth(), image.getWidth(),
@@ -119,13 +119,13 @@ abstract class BaseWidgetSheet extends AbstractSlideInView
}
protected void clearNavBarColor() {
- mLauncher.getSystemUiController().updateUiState(
+ getSystemUiController().updateUiState(
SystemUiController.UI_STATE_WIDGET_BOTTOM_SHEET, 0);
}
protected void setupNavBarColor() {
- boolean isSheetDark = Themes.getAttrBoolean(mLauncher, R.attr.isMainColorDark);
- mLauncher.getSystemUiController().updateUiState(
+ boolean isSheetDark = Themes.getAttrBoolean(getContext(), R.attr.isMainColorDark);
+ getSystemUiController().updateUiState(
SystemUiController.UI_STATE_WIDGET_BOTTOM_SHEET,
isSheetDark ? SystemUiController.FLAG_DARK_NAV : SystemUiController.FLAG_LIGHT_NAV);
}
@@ -145,4 +145,7 @@ abstract class BaseWidgetSheet extends AbstractSlideInView
protected abstract int getElementsRowCount();
+ protected SystemUiController getSystemUiController() {
+ return mLauncher.getSystemUiController();
+ }
}