OSDN Git Service

Build fix.
authorSunny Goyal <sunnygoyal@google.com>
Sat, 9 Jul 2016 22:42:36 +0000 (15:42 -0700)
committerSunny Goyal <sunnygoyal@google.com>
Sat, 9 Jul 2016 22:43:07 +0000 (15:43 -0700)
Missed some traces of key-value backup

Change-Id: Ifda94aa27aa53625bfb7ca173c6750c1b2433669

src/com/android/launcher3/CommonAppTypeParser.java
src/com/android/launcher3/model/GridSizeMigrationTask.java
tests/src/com/android/launcher3/model/GridSizeMigrationTaskTest.java

index a4a92b6..c2bd883 100644 (file)
@@ -25,7 +25,6 @@ import android.util.Log;
 
 import com.android.launcher3.AutoInstallsLayout.LayoutParserCallback;
 import com.android.launcher3.LauncherSettings.Favorites;
-import com.android.launcher3.backup.nano.BackupProtos.Favorite;
 import com.android.launcher3.util.Thunk;
 
 import org.xmlpull.v1.XmlPullParserException;
@@ -43,6 +42,12 @@ public class CommonAppTypeParser implements LayoutParserCallback {
 
     private static final int RESTORE_FLAG_BIT_SHIFT = 4;
 
+    public static final int TARGET_PHONE = 1;
+    public static final int TARGET_MESSENGER = 2;
+    public static final int TARGET_EMAIL = 3;
+    public static final int TARGET_BROWSER = 4;
+    public static final int TARGET_GALLERY = 5;
+    public static final int TARGET_CAMERA = 6;
 
     private final long mItemId;
     @Thunk final int mResId;
@@ -118,22 +123,22 @@ public class CommonAppTypeParser implements LayoutParserCallback {
 
     public static int getResourceForItemType(int type) {
         switch (type) {
-            case Favorite.TARGET_PHONE:
+            case TARGET_PHONE:
                 return R.xml.app_target_phone;
 
-            case Favorite.TARGET_MESSENGER:
+            case TARGET_MESSENGER:
                 return R.xml.app_target_messenger;
 
-            case Favorite.TARGET_EMAIL:
+            case TARGET_EMAIL:
                 return R.xml.app_target_email;
 
-            case Favorite.TARGET_BROWSER:
+            case TARGET_BROWSER:
                 return R.xml.app_target_browser;
 
-            case Favorite.TARGET_GALLERY:
+            case TARGET_GALLERY:
                 return R.xml.app_target_gallery;
 
-            case Favorite.TARGET_CAMERA:
+            case TARGET_CAMERA:
                 return R.xml.app_target_camera;
 
             default:
index 5941af8..7287ced 100644 (file)
@@ -24,7 +24,6 @@ import com.android.launcher3.LauncherSettings;
 import com.android.launcher3.LauncherSettings.Favorites;
 import com.android.launcher3.Utilities;
 import com.android.launcher3.Workspace;
-import com.android.launcher3.backup.nano.BackupProtos;
 import com.android.launcher3.compat.AppWidgetManagerCompat;
 import com.android.launcher3.compat.PackageInstallerCompat;
 import com.android.launcher3.config.FeatureFlags;
index 3cef9e0..4dae42f 100644 (file)
@@ -15,7 +15,6 @@ import com.android.launcher3.config.ProviderConfig;
 import com.android.launcher3.util.TestLauncherProvider;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.HashSet;
 
 /**
@@ -231,7 +230,7 @@ public class GridSizeMigrationTaskTest extends ProviderTestCase2<TestLauncherPro
                 {  5,  2,  7, -1},
         }}, 0);
 
-        new GridSizeMigrationTask(getMockContext(), mIdp, mValidPackages, new HashMap<String, Point>(),
+        new GridSizeMigrationTask(getMockContext(), mIdp, mValidPackages,
                 new Point(4, 4), new Point(3, 4)).migrateWorkspace();
 
         // Items in the second column of the first screen should get placed on a new screen.
@@ -254,7 +253,7 @@ public class GridSizeMigrationTaskTest extends ProviderTestCase2<TestLauncherPro
                 {  5,  6,  7, -1},
         }}, 0);
 
-        new GridSizeMigrationTask(getMockContext(), mIdp, mValidPackages, new HashMap<String, Point>(),
+        new GridSizeMigrationTask(getMockContext(), mIdp, mValidPackages,
                 new Point(4, 4), new Point(3, 3)).migrateWorkspace();
 
         // Items in the second column of the first screen should get placed on a new screen.