summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DefaultLayoutParser.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-01-15 12:00:14 -0800
committerSunny Goyal <sunnygoyal@google.com>2015-01-22 10:54:50 -0800
commitbb3b02f562bef4de063099c085d3199a77d06cfd (patch)
tree2f6406ed5a6ab27e7fc038e5ab993a398c8f51ac /src/com/android/launcher3/DefaultLayoutParser.java
parent3862e4d88bf7c8673ed6bc129d21417eaf77a4b9 (diff)
downloadandroid_packages_apps_Trebuchet-bb3b02f562bef4de063099c085d3199a77d06cfd.tar.gz
android_packages_apps_Trebuchet-bb3b02f562bef4de063099c085d3199a77d06cfd.tar.bz2
android_packages_apps_Trebuchet-bb3b02f562bef4de063099c085d3199a77d06cfd.zip
Replacing hotseat icon to an appropriate system app
> During backupi, store the hotseat target app type, based on some predefined common system apps > During restore, save this app type in the restore flag, if it is a hotseat app > During first launcher load, if an app is not being restored, try to replace it with an appropriate replacement for that type, otherwise delete it. Bug: 18764649 Change-Id: Ic49e40bd707bd8d7de18bbab8b1e58a0a36426a2
Diffstat (limited to 'src/com/android/launcher3/DefaultLayoutParser.java')
-rw-r--r--src/com/android/launcher3/DefaultLayoutParser.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/android/launcher3/DefaultLayoutParser.java b/src/com/android/launcher3/DefaultLayoutParser.java
index e3ea40ebb..48372388a 100644
--- a/src/com/android/launcher3/DefaultLayoutParser.java
+++ b/src/com/android/launcher3/DefaultLayoutParser.java
@@ -29,16 +29,16 @@ import java.util.List;
public class DefaultLayoutParser extends AutoInstallsLayout {
private static final String TAG = "DefaultLayoutParser";
- private static final String TAG_RESOLVE = "resolve";
+ protected static final String TAG_RESOLVE = "resolve";
private static final String TAG_FAVORITES = "favorites";
- private static final String TAG_FAVORITE = "favorite";
+ protected static final String TAG_FAVORITE = "favorite";
private static final String TAG_APPWIDGET = "appwidget";
private static final String TAG_SHORTCUT = "shortcut";
private static final String TAG_FOLDER = "folder";
private static final String TAG_PARTNER_FOLDER = "partner-folder";
private static final String TAG_INCLUDE = "include";
- private static final String ATTR_URI = "uri";
+ protected static final String ATTR_URI = "uri";
private static final String ATTR_WORKSPACE = "workspace";
private static final String ATTR_CONTAINER = "container";
private static final String ATTR_SCREEN = "screen";
@@ -47,7 +47,12 @@ public class DefaultLayoutParser extends AutoInstallsLayout {
public DefaultLayoutParser(Context context, AppWidgetHost appWidgetHost,
LayoutParserCallback callback, Resources sourceRes, int layoutId) {
super(context, appWidgetHost, callback, sourceRes, layoutId, TAG_FAVORITES);
- Log.e(TAG, "Default layout parser initialized");
+ }
+
+ public DefaultLayoutParser(Context context, AppWidgetHost appWidgetHost,
+ LayoutParserCallback callback, Resources sourceRes, int layoutId, String rootTag,
+ int hotseatAllAppsRank) {
+ super(context, appWidgetHost, callback, sourceRes, layoutId, rootTag, hotseatAllAppsRank);
}
@Override
@@ -218,7 +223,7 @@ public class DefaultLayoutParser extends AutoInstallsLayout {
/**
* Contains a list of <favorite> nodes, and accepts the first successfully parsed node.
*/
- private class ResolveParser implements TagParser {
+ protected class ResolveParser implements TagParser {
private final AppShortcutWithUriParser mChildParser = new AppShortcutWithUriParser();