Making launcher use new widget binding APIs

Change-Id: I9cd6716e1dc0c53b5c846371ea109ced4cd3d40a
This commit is contained in:
Adam Cohen
2012-09-10 15:53:09 -07:00
parent 671a3a227c
commit 9e05a5ea95
5 changed files with 71 additions and 8 deletions

View File

@@ -19,6 +19,7 @@ package com.android.launcher2;
import android.appwidget.AppWidgetHostView;
import android.content.ComponentName;
import android.content.ContentValues;
import android.os.Build;
/**
* Represents a widget (either instantiated or about to be) in the Launcher.
@@ -72,7 +73,8 @@ class LauncherAppWidgetInfo extends ItemInfo {
* done so already (only really for default workspace widgets).
*/
void onBindAppWidget(Launcher launcher) {
if (!mHasNotifiedInitialWidgetSizeChanged) {
if (!mHasNotifiedInitialWidgetSizeChanged &&
Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
notifyWidgetSizeChanged(launcher);
}
}