mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Refactoring getPreferenceKey method
This method was returnning a constant and getting inlined by proguard. Change-Id: I87348e25b21483adc1b27d16f99dec4b73205701
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
package com.android.launcher3.testing;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.util.TestingUtils;
|
||||
|
||||
public class ToggleWeightWatcher extends Activity {
|
||||
@@ -16,8 +16,7 @@ public class ToggleWeightWatcher extends Activity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
String spKey = LauncherAppState.getSharedPreferencesKey();
|
||||
SharedPreferences sp = getSharedPreferences(spKey, Context.MODE_PRIVATE);
|
||||
SharedPreferences sp = Utilities.getPrefs(this);
|
||||
boolean show = sp.getBoolean(TestingUtils.SHOW_WEIGHT_WATCHER, true);
|
||||
|
||||
show = !show;
|
||||
|
||||
Reference in New Issue
Block a user