Refactoring getPreferenceKey method
This method was returnning a constant and getting inlined by proguard. Change-Id: I87348e25b21483adc1b27d16f99dec4b73205701
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user