Refactoring getPreferenceKey method

This method was returnning a constant and getting inlined by proguard.

Change-Id: I87348e25b21483adc1b27d16f99dec4b73205701
This commit is contained in:
Sunny Goyal
2015-10-19 16:59:07 -07:00
parent 705b4abd57
commit f725824fa2
11 changed files with 33 additions and 65 deletions
@@ -13,6 +13,7 @@ import com.android.launcher3.CustomAppWidget;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import java.util.HashMap;
@@ -39,9 +40,7 @@ public class TestingUtils {
public static void addWeightWatcher(Launcher launcher) {
if (MEMORY_DUMP_ENABLED) {
String spKey = LauncherAppState.getSharedPreferencesKey();
SharedPreferences sp = launcher.getSharedPreferences(spKey, Context.MODE_PRIVATE);
boolean show = sp.getBoolean(SHOW_WEIGHT_WATCHER, true);
boolean show = Utilities.getPrefs(launcher).getBoolean(SHOW_WEIGHT_WATCHER, true);
int id = launcher.getResources().getIdentifier("zzz_weight_watcher", "layout",
launcher.getPackageName());