check for long and short component names.

Bug: 14650346
Change-Id: Ic2195a4f60b63f8ec85c42284e0fd58d6f473a9f
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 8af0970..585c238 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -853,10 +853,12 @@
             return false;
         }
         String componentName = component.flattenToString();
+        String shortName = component.flattenToShortString();
         long serialNumber = UserManagerCompat.getInstance(context)
                 .getSerialNumberForUser(user);
-        final String where = "intent glob \"*component=" + componentName + "*\" and restored = 1"
-                + " and profileId = " + serialNumber;
+        final String where = "(intent glob \"*component=" + componentName + "*\" or " +
+                "intent glob \"*component=" + shortName + "*\")" +
+                "and restored = 1 and profileId = " + serialNumber;
         Cursor c = cr.query(LauncherSettings.Favorites.CONTENT_URI,
                 new String[]{"intent", "restored", "profileId"}, where, null, null);
         boolean result = false;