Adding a utility method for getting device prefs
Change-Id: I1e3c7df0a3f4e847b40d722d44890e441cc73509
This commit is contained in:
1 parent
54ba601a99
commit
9d887a2c45
4 files changed
+16
-23
No files matched your search
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.launcher3.provider;
|
||||
|
||||
import static com.android.launcher3.Utilities.getDevicePrefs;
|
||||
|
||||
import android.content.ContentProviderOperation;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
@@ -36,7 +38,6 @@ import com.android.launcher3.AutoInstallsLayout.LayoutParserCallback;
|
||||
import com.android.launcher3.DefaultLayoutParser;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherAppWidgetInfo;
|
||||
import com.android.launcher3.LauncherFiles;
|
||||
import com.android.launcher3.LauncherProvider;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
@@ -377,10 +378,6 @@ public class ImportDataTask {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static SharedPreferences getDevicePrefs(Context c) {
|
||||
return c.getSharedPreferences(LauncherFiles.DEVICE_PREFERENCES_KEY, Context.MODE_PRIVATE);
|
||||
}
|
||||
|
||||
private static final int getMyHotseatLayoutId(Context context) {
|
||||
return LauncherAppState.getIDP(context).numHotseatIcons <= 5
|
||||
? R.xml.dw_phone_hotseat
|
||||
|
||||
Reference in new issue
Block a user