summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
diff options
context:
space:
mode:
authorHelena Josol <helenajosol@google.com>2014-10-06 16:06:46 +0100
committerHelena Josol <helenajosol@google.com>2014-10-06 17:08:10 +0100
commit4fbbb3e3e0e135bc5b304bc63637bbc8b54fb5d8 (patch)
tree4383aa322228344f9ce6318d5d4c0d462730575e /src/com/android/launcher3/Launcher.java
parentebb2a66b79b2761ed29f2f8a3140217c126e448b (diff)
downloadandroid_packages_apps_Trebuchet-4fbbb3e3e0e135bc5b304bc63637bbc8b54fb5d8.tar.gz
android_packages_apps_Trebuchet-4fbbb3e3e0e135bc5b304bc63637bbc8b54fb5d8.tar.bz2
android_packages_apps_Trebuchet-4fbbb3e3e0e135bc5b304bc63637bbc8b54fb5d8.zip
Create a central list of files the Launcher writes to the app directory
Replace hardcoded Launcher filenames with the defined constants. Bug: 12753154 Change-Id: I072f202d9388a703b9e6851bde64ea7fafe4b10a
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r--src/com/android/launcher3/Launcher.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 678081286..4a39e0ae5 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -168,7 +168,6 @@ public class Launcher extends Activity
static final int SCREEN_COUNT = 5;
static final int DEFAULT_SCREEN = 2;
- private static final String PREFERENCES = "launcher.preferences";
// To turn on these properties, type
// adb shell setprop log.tag.PROPERTY_NAME [VERBOSE | SUPPRESS]
static final String FORCE_ENABLE_ROTATION_PROPERTY = "launcher_force_rotate";
@@ -620,7 +619,7 @@ public class Launcher extends Activity
private static void readConfiguration(Context context, LocaleConfiguration configuration) {
DataInputStream in = null;
try {
- in = new DataInputStream(context.openFileInput(PREFERENCES));
+ in = new DataInputStream(context.openFileInput(LauncherFiles.LAUNCHER_PREFS));
configuration.locale = in.readUTF();
configuration.mcc = in.readInt();
configuration.mnc = in.readInt();
@@ -642,7 +641,8 @@ public class Launcher extends Activity
private static void writeConfiguration(Context context, LocaleConfiguration configuration) {
DataOutputStream out = null;
try {
- out = new DataOutputStream(context.openFileOutput(PREFERENCES, MODE_PRIVATE));
+ out = new DataOutputStream(context.openFileOutput(
+ LauncherFiles.LAUNCHER_PREFS, MODE_PRIVATE));
out.writeUTF(configuration.locale);
out.writeInt(configuration.mcc);
out.writeInt(configuration.mnc);
@@ -651,7 +651,7 @@ public class Launcher extends Activity
// Ignore
} catch (IOException e) {
//noinspection ResultOfMethodCallIgnored
- context.getFileStreamPath(PREFERENCES).delete();
+ context.getFileStreamPath(LauncherFiles.LAUNCHER_PREFS).delete();
} finally {
if (out != null) {
try {