OSDN Git Service

Only add widgets system shortcut if widgets exist
authorTony Wickham <twickham@google.com>
Thu, 13 Apr 2017 23:24:38 +0000 (16:24 -0700)
committerTony Wickham <twickham@google.com>
Thu, 20 Apr 2017 22:10:38 +0000 (15:10 -0700)
commita7e1c1c08854930ddb4366698d5bf079ae0536f3
tree7ca715956276ac891cd4f5eced4db8c84a15633f
parent343a77e609382bcb9b1d69ea235a9e6d779b719e
Only add widgets system shortcut if widgets exist

Before we were adding it in a disabled state, and then enabling it once
widgets were bound (if widgets existed for that app). Now we load all
widgets when launcher starts so that we can use the values for the
purpose of animating the popup container. Then, as the container opens,
we reload widgets/shortcuts for that particular app and add/remove the
widgets shortcut if necessary.

Bug: 34940468
Change-Id: I64bd009442d10d3d1f9a977bdedfdb639a7dd193
src/com/android/launcher3/LauncherModel.java
src/com/android/launcher3/model/PackageUpdatedTask.java
src/com/android/launcher3/popup/PopupContainerWithArrow.java
src/com/android/launcher3/popup/PopupDataProvider.java
src/com/android/launcher3/popup/PopupPopulator.java
src/com/android/launcher3/popup/SystemShortcut.java
src/com/android/launcher3/shortcuts/ShortcutsItemView.java