diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-01-15 12:00:14 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-01-22 10:54:50 -0800 |
commit | bb3b02f562bef4de063099c085d3199a77d06cfd (patch) | |
tree | 2f6406ed5a6ab27e7fc038e5ab993a398c8f51ac /src/com/android/launcher3/AutoInstallsLayout.java | |
parent | 3862e4d88bf7c8673ed6bc129d21417eaf77a4b9 (diff) | |
download | android_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/AutoInstallsLayout.java')
-rw-r--r-- | src/com/android/launcher3/AutoInstallsLayout.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/launcher3/AutoInstallsLayout.java b/src/com/android/launcher3/AutoInstallsLayout.java index a5d22286d..0fa4cbb75 100644 --- a/src/com/android/launcher3/AutoInstallsLayout.java +++ b/src/com/android/launcher3/AutoInstallsLayout.java @@ -112,7 +112,7 @@ public class AutoInstallsLayout { private final Context mContext; private final AppWidgetHost mAppWidgetHost; - private final LayoutParserCallback mCallback; + protected final LayoutParserCallback mCallback; protected final PackageManager mPackageManager; protected final Resources mSourceRes; @@ -122,13 +122,20 @@ public class AutoInstallsLayout { private final long[] mTemp = new long[2]; private final ContentValues mValues; - private final String mRootTag; + protected final String mRootTag; protected SQLiteDatabase mDb; public AutoInstallsLayout(Context context, AppWidgetHost appWidgetHost, LayoutParserCallback callback, Resources res, int layoutId, String rootTag) { + this(context, appWidgetHost, callback, res, layoutId, rootTag, + LauncherAppState.getInstance().getDynamicGrid().getDeviceProfile().hotseatAllAppsRank); + } + + public AutoInstallsLayout(Context context, AppWidgetHost appWidgetHost, + LayoutParserCallback callback, Resources res, + int layoutId, String rootTag, int hotseatAllAppsRank) { mContext = context; mAppWidgetHost = appWidgetHost; mCallback = callback; @@ -139,8 +146,7 @@ public class AutoInstallsLayout { mSourceRes = res; mLayoutId = layoutId; - mHotseatAllAppsRank = LauncherAppState.getInstance() - .getDynamicGrid().getDeviceProfile().hotseatAllAppsRank; + mHotseatAllAppsRank = hotseatAllAppsRank; } /** |