Fix PendingWidgetHostView overlapping UI
* Only show launcher set up UI if a pending widget has not finished
set up.
* Update configuration string
Test: manual inspection
Bug: 190037003
Change-Id: I3b9fb39da21ea557f97e9ca7b05a3b52f3ec3452
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 9cfe69a..9ecf237 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -190,11 +190,11 @@
<!-- Widgets: -->
<skip />
- <!-- Text to show user in place of a gadget when we can't display it properly -->
- <string name="gadget_error_text">Problem loading widget</string>
+ <!-- Error text that lets a user know that the widget can't load. -->
+ <string name="gadget_error_text">Can\'t load widget</string>
- <!-- Text to show user in place of a gadget when it is not yet initialized. -->
- <string name="gadget_setup_text">Setup</string>
+ <!-- Instructional text to encourage a user to finish setting up the widget. -->
+ <string name="gadget_setup_text">Tap to finish setup</string>
<!-- Text to inform the user that they can't uninstall a system application -->
<string name="uninstall_system_app_text">This is a system app and can\'t be uninstalled.</string>
diff --git a/src/com/android/launcher3/widget/PendingAppWidgetHostView.java b/src/com/android/launcher3/widget/PendingAppWidgetHostView.java
index 3308eec..47a8914 100644
--- a/src/com/android/launcher3/widget/PendingAppWidgetHostView.java
+++ b/src/com/android/launcher3/widget/PendingAppWidgetHostView.java
@@ -97,9 +97,9 @@
@Override
public void updateAppWidget(RemoteViews remoteViews) {
- super.updateAppWidget(remoteViews);
WidgetManagerHelper widgetManagerHelper = new WidgetManagerHelper(getContext());
if (widgetManagerHelper.isAppWidgetRestored(mInfo.appWidgetId)) {
+ super.updateAppWidget(remoteViews);
reInflate();
}
}
@@ -149,7 +149,7 @@
// The view displays three modes,
// 1) App icon in the center
// 2) Preload icon in the center
- // 3) Setup icon in the center and app icon in the top right corner.
+ // 3) App icon in the center with a setup icon on the top left corner.
if (mDisabledForSafeMode) {
FastBitmapDrawable disabledIcon = info.newIcon(getContext());
disabledIcon.setIsDisabled(true);