summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/provider
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-12-29 13:31:43 -0800
committerSunny Goyal <sunnygoyal@google.com>2016-12-29 15:12:14 -0800
commit8ad02b8f3f3512cdb8eafba6da4483641bf24efc (patch)
tree4b9863de5afdfb14ceb46900b5cfe81daec98f6c /src/com/android/launcher3/provider
parentc6b833dcbbbcfbca577705f69cfad1259c88b6e2 (diff)
downloadpackages_apps_Trebuchet-8ad02b8f3f3512cdb8eafba6da4483641bf24efc.tar.gz
packages_apps_Trebuchet-8ad02b8f3f3512cdb8eafba6da4483641bf24efc.tar.bz2
packages_apps_Trebuchet-8ad02b8f3f3512cdb8eafba6da4483641bf24efc.zip
Removing static access to Context through LauncherAppState
Bug: 33032833 Change-Id: I09baaa6d79187b3096a2ab3a89d7dcaeaf9eee68
Diffstat (limited to 'src/com/android/launcher3/provider')
-rw-r--r--src/com/android/launcher3/provider/LauncherDbUtils.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/launcher3/provider/LauncherDbUtils.java b/src/com/android/launcher3/provider/LauncherDbUtils.java
index 2f8241907..89fd99b23 100644
--- a/src/com/android/launcher3/provider/LauncherDbUtils.java
+++ b/src/com/android/launcher3/provider/LauncherDbUtils.java
@@ -17,6 +17,7 @@
package com.android.launcher3.provider;
import android.content.ContentValues;
+import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
@@ -42,7 +43,7 @@ public class LauncherDbUtils {
* the first row. The items in the first screen are moved and resized but the carry-forward
* items are simply deleted.
*/
- public static boolean prepareScreenZeroToHostQsb(SQLiteDatabase db) {
+ public static boolean prepareScreenZeroToHostQsb(Context context, SQLiteDatabase db) {
db.beginTransaction();
try {
// Get the existing screens
@@ -75,8 +76,8 @@ public class LauncherDbUtils {
}
}
- LauncherAppState app = LauncherAppState.getInstance();
- new LossyScreenMigrationTask(app.getContext(), app.getInvariantDeviceProfile(), db)
+ new LossyScreenMigrationTask(
+ context, LauncherAppState.getInstance().getInvariantDeviceProfile(), db)
.migrateScreen0();
db.setTransactionSuccessful();
return true;