Merge "1. Get rid of few unnecessary boxing in BgDataModel class. 2. Get rid of an unnecessary return statment from BgDataModel 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/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;