Adding app widget restore support in Launcher3 for android L

When the app is restored, it displays placeholders for all pending widgets.
These placeholders can be moved and removed similar to a widget (size is fixed
to what defined in backup). Once the system notifies the launcher of the new
widget ids, the place holders are replaced with actual widgets.

issue: 10779035

Change-Id: I68cbe4da01e9ca2978cb4471a7c645d2aa592055
diff --git a/src/com/android/launcher3/DeleteDropTarget.java b/src/com/android/launcher3/DeleteDropTarget.java
index 3d45432..4c3388e 100644
--- a/src/com/android/launcher3/DeleteDropTarget.java
+++ b/src/com/android/launcher3/DeleteDropTarget.java
@@ -326,7 +326,7 @@
 
             final LauncherAppWidgetInfo launcherAppWidgetInfo = (LauncherAppWidgetInfo) item;
             final LauncherAppWidgetHost appWidgetHost = mLauncher.getAppWidgetHost();
-            if (appWidgetHost != null) {
+            if ((appWidgetHost != null) && launcherAppWidgetInfo.isWidgetIdValid()) {
                 // Deleting an app widget ID is a void call but writes to disk before returning
                 // to the caller...
                 new AsyncTask<Void, Void, Void>() {