diff options
author | Helena Josol <helenajosol@google.com> | 2014-10-06 16:06:46 +0100 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2015-09-27 14:59:01 -0700 |
commit | a8f7b6a9f33fcedd6f1e429606e1241d7ed7e54b (patch) | |
tree | 3c68a489fe263eb2f70833b6dbb0be5f44c73cbb /src/com/android/launcher3/Launcher.java | |
parent | 0e6e432422c5c685f8878086c2c5b891cd44cf4f (diff) | |
download | android_packages_apps_Trebuchet-a8f7b6a9f33fcedd6f1e429606e1241d7ed7e54b.tar.gz android_packages_apps_Trebuchet-a8f7b6a9f33fcedd6f1e429606e1241d7ed7e54b.tar.bz2 android_packages_apps_Trebuchet-a8f7b6a9f33fcedd6f1e429606e1241d7ed7e54b.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.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index d9f1985fe..d3be726e6 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -198,7 +198,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"; @@ -790,7 +789,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(); @@ -812,7 +811,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); @@ -821,7 +821,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 { |