Merge "Add clip-reveal animation to Launcher" into ub-launcher3-master
diff --git a/src/com/android/launcher3/LauncherAppWidgetHostView.java b/src/com/android/launcher3/LauncherAppWidgetHostView.java
index 2d04df2..954d2d7 100644
--- a/src/com/android/launcher3/LauncherAppWidgetHostView.java
+++ b/src/com/android/launcher3/LauncherAppWidgetHostView.java
@@ -145,9 +145,9 @@
@Override
public AppWidgetProviderInfo getAppWidgetInfo() {
AppWidgetProviderInfo info = super.getAppWidgetInfo();
- if (!(info instanceof LauncherAppWidgetProviderInfo)) {
+ if (info != null && !(info instanceof LauncherAppWidgetProviderInfo)) {
throw new IllegalStateException("Launcher widget must have"
- + "LauncherAppWidgetProviderInfo");
+ + " LauncherAppWidgetProviderInfo");
}
return info;
}
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 661c3ce..1a4afe8 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -3151,9 +3151,8 @@
// in its final location
final LauncherAppWidgetHostView hostView = (LauncherAppWidgetHostView) cell;
- LauncherAppWidgetProviderInfo pInfo = (LauncherAppWidgetProviderInfo)
- hostView.getAppWidgetInfo();
- if (pInfo.resizeMode != AppWidgetProviderInfo.RESIZE_NONE) {
+ AppWidgetProviderInfo pInfo = hostView.getAppWidgetInfo();
+ if (pInfo != null && pInfo.resizeMode != AppWidgetProviderInfo.RESIZE_NONE) {
final Runnable addResizeFrame = new Runnable() {
public void run() {
DragLayer dragLayer = mLauncher.getDragLayer();