Merge "Fix errorprone warnings that should be errors" am: 35157974d4 am: 533b937fd3 am: 14946c1fa3
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/2254242 Change-Id: Id765742b2e4767888137a01116f2bad1bba859a3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -47,9 +47,12 @@ public class LauncherFiles {
|
||||
DEVICE_PREFERENCES_KEY + XML,
|
||||
APP_ICONS_DB));
|
||||
|
||||
public static final List<String> ALL_FILES = Collections.unmodifiableList(
|
||||
new ArrayList<String>() {{
|
||||
addAll(GRID_DB_FILES);
|
||||
addAll(OTHER_FILES);
|
||||
}});
|
||||
private static List<String> createAllFiles() {
|
||||
ArrayList<String> result = new ArrayList<>();
|
||||
result.addAll(GRID_DB_FILES);
|
||||
result.addAll(OTHER_FILES);
|
||||
return Collections.unmodifiableList(result);
|
||||
}
|
||||
|
||||
public static final List<String> ALL_FILES = createAllFiles();
|
||||
}
|
||||
|
||||
@@ -1614,7 +1614,7 @@ public abstract class PagedView<T extends View & PageIndicator> 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;
|
||||
|
||||
Reference in New Issue
Block a user