summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherAppWidgetInfo.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-10-28 23:28:21 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-10-30 10:03:45 -0700
commit25c2e3ef07bda7df1e591cf9cdf9f6512ee2dbf7 (patch)
tree8603020ae74e23e4e70feb1c9951c4b5eaf82a62 /src/com/android/launcher3/LauncherAppWidgetInfo.java
parentc3d76582b656fdabc92a470ebe0d986b58c44751 (diff)
downloadandroid_packages_apps_Trebuchet-25c2e3ef07bda7df1e591cf9cdf9f6512ee2dbf7.tar.gz
android_packages_apps_Trebuchet-25c2e3ef07bda7df1e591cf9cdf9f6512ee2dbf7.tar.bz2
android_packages_apps_Trebuchet-25c2e3ef07bda7df1e591cf9cdf9f6512ee2dbf7.zip
Allowing widgets to be focusable
> Pressing 'enter' enters the focus inside the widget. > If the widget has only one focusable, it directly performs click > Pressing 'esc' brings the focus back to the parent host. Bug: 25199581 Change-Id: Ia7fd5d929f5945d61173abd349660a5efbe74afc
Diffstat (limited to 'src/com/android/launcher3/LauncherAppWidgetInfo.java')
-rw-r--r--src/com/android/launcher3/LauncherAppWidgetInfo.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/com/android/launcher3/LauncherAppWidgetInfo.java b/src/com/android/launcher3/LauncherAppWidgetInfo.java
index 882f7e202..55edf45d2 100644
--- a/src/com/android/launcher3/LauncherAppWidgetInfo.java
+++ b/src/com/android/launcher3/LauncherAppWidgetInfo.java
@@ -123,17 +123,11 @@ public class LauncherAppWidgetInfo extends ItemInfo {
*/
void onBindAppWidget(Launcher launcher) {
if (!mHasNotifiedInitialWidgetSizeChanged) {
- notifyWidgetSizeChanged(launcher);
+ AppWidgetResizeFrame.updateWidgetSizeRanges(hostView, launcher, spanX, spanY);
+ mHasNotifiedInitialWidgetSizeChanged = true;
}
}
- /**
- * Trigger an update callback to the widget to notify it that its size has changed.
- */
- void notifyWidgetSizeChanged(Launcher launcher) {
- AppWidgetResizeFrame.updateWidgetSizeRanges(hostView, launcher, spanX, spanY);
- mHasNotifiedInitialWidgetSizeChanged = true;
- }
@Override
public String toString() {