diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index 9a1ed4d56d..2d6b6c301c 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -993,7 +993,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener mAppWindowScale = widgetBackgroundBounds.width() / windowTargetBounds.width(); // Crop scaled app window to match widget appWindowCrop.set(0 /* left */, 0 /* top */, - Math.round(windowTargetBounds.width()) /* right */, + windowTargetBounds.width() /* right */, Math.round(widgetBackgroundBounds.height() / mAppWindowScale) /* bottom */); matrix.setTranslate(widgetBackgroundBounds.left, widgetBackgroundBounds.top); matrix.postScale(mAppWindowScale, mAppWindowScale, widgetBackgroundBounds.left, diff --git a/quickstep/src/com/android/launcher3/taskbar/DesktopTaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/DesktopTaskbarUIController.java index 9393b0f7ab..633325bf4b 100644 --- a/quickstep/src/com/android/launcher3/taskbar/DesktopTaskbarUIController.java +++ b/quickstep/src/com/android/launcher3/taskbar/DesktopTaskbarUIController.java @@ -30,6 +30,7 @@ public class DesktopTaskbarUIController extends TaskbarUIController { mLauncher = launcher; } + @SuppressWarnings("MissingSuperCall") // TODO: Fix me @Override protected void init(TaskbarControllers taskbarControllers) { super.init(taskbarControllers); @@ -37,6 +38,7 @@ public class DesktopTaskbarUIController extends TaskbarUIController { mControllers.taskbarViewController.updateRunningApps(); } + @SuppressWarnings("MissingSuperCall") // TODO: Fix me @Override protected void onDestroy() { super.onDestroy(); diff --git a/src/com/android/launcher3/LauncherFiles.java b/src/com/android/launcher3/LauncherFiles.java index e59eac8dd2..d730cea804 100644 --- a/src/com/android/launcher3/LauncherFiles.java +++ b/src/com/android/launcher3/LauncherFiles.java @@ -47,9 +47,12 @@ public class LauncherFiles { DEVICE_PREFERENCES_KEY + XML, APP_ICONS_DB)); - public static final List ALL_FILES = Collections.unmodifiableList( - new ArrayList() {{ - addAll(GRID_DB_FILES); - addAll(OTHER_FILES); - }}); + private static List createAllFiles() { + ArrayList result = new ArrayList<>(); + result.addAll(GRID_DB_FILES); + result.addAll(OTHER_FILES); + return Collections.unmodifiableList(result); + } + + public static final List ALL_FILES = createAllFiles(); } diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 68c54c7667..1c77025365 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -1607,7 +1607,7 @@ public abstract class PagedView extends ViewGrou } private int getDisplacementFromScreenCenter(int childIndex, int screenCenter) { - int childSize = Math.round(getChildVisibleSize(childIndex)); + int childSize = getChildVisibleSize(childIndex); int halfChildSize = (childSize / 2); int childCenter = getChildOffset(childIndex) + halfChildSize; return childCenter - screenCenter;