summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/util
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-08-16 04:59:08 -0700
committerSunny Goyal <sunnygoyal@google.com>2017-09-13 14:04:35 -0700
commit952e63d0065d79d2bd9557ed7f28e96adb39ca9a (patch)
tree3f07803d9731a9c56ee7c0d707385b0272966e6b /src/com/android/launcher3/util
parentbe213def874f580a58b2ee4a94ba503a6d7e3f15 (diff)
downloadandroid_packages_apps_Trebuchet-952e63d0065d79d2bd9557ed7f28e96adb39ca9a.tar.gz
android_packages_apps_Trebuchet-952e63d0065d79d2bd9557ed7f28e96adb39ca9a.tar.bz2
android_packages_apps_Trebuchet-952e63d0065d79d2bd9557ed7f28e96adb39ca9a.zip
Fixing custom widgets support:
> Moving the definitions to xml so that it is easier to override in derivative projects > Fixing verious bind and save logic for custom widgets > Adding feature flag to easily disable custom widgets Change-Id: I0e278bc7dd415713029364060ef10842da990be9
Diffstat (limited to 'src/com/android/launcher3/util')
-rw-r--r--src/com/android/launcher3/util/TestingUtils.java19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/com/android/launcher3/util/TestingUtils.java b/src/com/android/launcher3/util/TestingUtils.java
index a7cc42b5f..d927dc335 100644
--- a/src/com/android/launcher3/util/TestingUtils.java
+++ b/src/com/android/launcher3/util/TestingUtils.java
@@ -3,18 +3,14 @@ package com.android.launcher3.util;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
-import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.widget.FrameLayout;
-import com.android.launcher3.CustomAppWidget;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
-import java.util.HashMap;
-
public class TestingUtils {
public static final String MEMORY_TRACKER = "com.android.launcher3.testing.MemoryTracker";
@@ -23,9 +19,6 @@ public class TestingUtils {
public static final boolean MEMORY_DUMP_ENABLED = false;
public static final String SHOW_WEIGHT_WATCHER = "debug.show_mem";
- public static final boolean ENABLE_CUSTOM_WIDGET_TEST = false;
- public static final String DUMMY_WIDGET = "com.android.launcher3.testing.DummyWidget";
-
public static void startTrackingMemory(Context context) {
if (MEMORY_DUMP_ENABLED) {
context.startService(new Intent()
@@ -55,16 +48,4 @@ public class TestingUtils {
launcher.mWeightWatcher = watcher;
}
}
-
- public static void addDummyWidget(HashMap<String, CustomAppWidget> set) {
- if (ENABLE_CUSTOM_WIDGET_TEST) {
- try {
- Class<?> clazz = Class.forName(DUMMY_WIDGET);
- CustomAppWidget widget = (CustomAppWidget) clazz.newInstance();
- set.put(widget.getClass().getName(), widget);
- } catch (Exception e) {
- Log.e("TestingUtils", "Error adding dummy widget", e);
- }
- }
- }
}