Merge "Replace use of java.util.HashMap with android.util.ArrayMap in UserManagerCompatVL class" into ub-launcher3-dorval-polish
diff --git a/build.gradle b/build.gradle
index ef782d9..c23a299 100644
--- a/build.gradle
+++ b/build.gradle
@@ -68,6 +68,7 @@
final String SUPPORT_LIBS_VERSION = '26.0.0-SNAPSHOT'
dependencies {
compile "com.android.support:support-v4:${SUPPORT_LIBS_VERSION}"
+ compile "com.android.support:support-dynamic-animation:${SUPPORT_LIBS_VERSION}"
compile "com.android.support:recyclerview-v7:${SUPPORT_LIBS_VERSION}"
compile "com.android.support:palette-v7:${SUPPORT_LIBS_VERSION}"
compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-2'
diff --git a/res/layout/widgets_list_row_view.xml b/res/layout/widgets_list_row_view.xml
index b6e0a0b..1062269 100644
--- a/res/layout/widgets_list_row_view.xml
+++ b/res/layout/widgets_list_row_view.xml
@@ -41,6 +41,7 @@
android:singleLine="true"
android:textColor="?android:attr/textColorPrimary"
android:textSize="16sp"
+ android:textAlignment="viewStart"
launcher:customShadows="false"
launcher:deferShadowGeneration="true"
launcher:iconDisplay="widget_section"
diff --git a/src/com/android/launcher3/model/BgDataModel.java b/src/com/android/launcher3/model/BgDataModel.java
index d9c5143..816c1d4 100644
--- a/src/com/android/launcher3/model/BgDataModel.java
+++ b/src/com/android/launcher3/model/BgDataModel.java
@@ -152,7 +152,7 @@
for (ArrayList<String> map : deepShortcutMap.values()) {
writer.print(prefix + " ");
for (String str : map) {
- writer.print(str.toString() + ", ");
+ writer.print(str + ", ");
}
writer.println();
}
@@ -166,7 +166,7 @@
DumpTargetWrapper hotseat = new DumpTargetWrapper(ContainerType.HOTSEAT, 0);
LongArrayMap<DumpTargetWrapper> workspaces = new LongArrayMap<>();
for (int i = 0; i < workspaceScreens.size(); i++) {
- workspaces.put(new Long(workspaceScreens.get(i)),
+ workspaces.put(workspaceScreens.get(i),
new DumpTargetWrapper(ContainerType.WORKSPACE, i));
}
DumpTargetWrapper dtw;
@@ -183,7 +183,7 @@
if (fInfo.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
hotseat.add(dtw);
} else if (fInfo.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) {
- workspaces.get(new Long(fInfo.screenId)).add(dtw);
+ workspaces.get(fInfo.screenId).add(dtw);
}
}
// Add leaf nodes (L3): *Info
@@ -197,7 +197,7 @@
if (info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
hotseat.add(dtw);
} else if (info.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) {
- workspaces.get(new Long(info.screenId)).add(dtw);
+ workspaces.get(info.screenId).add(dtw);
}
}
for (int i = 0; i < appWidgets.size(); i++) {
@@ -207,7 +207,7 @@
if (info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
hotseat.add(dtw);
} else if (info.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) {
- workspaces.get(new Long(info.screenId)).add(dtw);
+ workspaces.get(info.screenId).add(dtw);
}
}
diff --git a/src/com/android/launcher3/model/LoaderTask.java b/src/com/android/launcher3/model/LoaderTask.java
index b24d682..bb2d0b6 100644
--- a/src/com/android/launcher3/model/LoaderTask.java
+++ b/src/com/android/launcher3/model/LoaderTask.java
@@ -576,7 +576,8 @@
// available or not available. We do not need to track
// any future restore updates.
int status = c.restoreFlag &
- ~LauncherAppWidgetInfo.FLAG_RESTORE_STARTED;
+ ~LauncherAppWidgetInfo.FLAG_RESTORE_STARTED &
+ ~LauncherAppWidgetInfo.FLAG_PROVIDER_NOT_READY;
if (!wasProviderReady) {
// If provider was not previously ready, update the
// status and UI flag.
@@ -584,9 +585,6 @@
// Id would be valid only if the widget restore broadcast was received.
if (isIdValid) {
status |= LauncherAppWidgetInfo.FLAG_UI_NOT_READY;
- } else {
- status &= ~LauncherAppWidgetInfo
- .FLAG_PROVIDER_NOT_READY;
}
}
appWidgetInfo.restoreStatus = status;
diff --git a/src_flags/com/android/launcher3/config/FeatureFlags.java b/src_flags/com/android/launcher3/config/FeatureFlags.java
index ed169b6..40200c5 100644
--- a/src_flags/com/android/launcher3/config/FeatureFlags.java
+++ b/src_flags/com/android/launcher3/config/FeatureFlags.java
@@ -42,6 +42,8 @@
public static boolean LAUNCHER3_GRADIENT_ALL_APPS = true;
// When enabled allows use of physics based motions in the Launcher.
public static boolean LAUNCHER3_PHYSICS = true;
+ // When enabled allows use of spring motions on the icons.
+ public static boolean LAUNCHER3_SPRING_ICONS = true;
// Feature flag to enable moving the QSB on the 0th screen of the workspace.
public static final boolean QSB_ON_FIRST_SCREEN = true;