OSDN Git Service

Merge "Moving a few testing classes to a separate package" into ub-launcher3-master
authorSunny Goyal <sunnygoyal@google.com>
Mon, 21 Sep 2015 20:35:29 +0000 (20:35 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Mon, 21 Sep 2015 20:35:29 +0000 (20:35 +0000)
1  2 
AndroidManifest.xml
res/values/config.xml
src/com/android/launcher3/Launcher.java

Simple merge
Simple merge
@@@ -71,9 -70,9 +71,8 @@@ import android.text.TextUtils
  import android.text.method.TextKeyListener;
  import android.util.Log;
  import android.view.Display;
- import android.view.Gravity;
  import android.view.HapticFeedbackConstants;
  import android.view.KeyEvent;
 -import android.view.LayoutInflater;
  import android.view.Menu;
  import android.view.MotionEvent;
  import android.view.Surface;
@@@ -109,8 -104,8 +107,9 @@@ import com.android.launcher3.dragndrop.
  import com.android.launcher3.model.WidgetsModel;
  import com.android.launcher3.util.ComponentKey;
  import com.android.launcher3.util.LongArrayMap;
+ import com.android.launcher3.util.TestingUtils;
  import com.android.launcher3.util.Thunk;
 +import com.android.launcher3.util.ViewOnDrawExecutor;
  import com.android.launcher3.widget.PendingAddWidgetInfo;
  import com.android.launcher3.widget.WidgetHostViewLoader;
  import com.android.launcher3.widget.WidgetsContainerView;
@@@ -1399,23 -1418,9 +1395,12 @@@ public class Launcher extends Activit
              mSearchDropTargetBar.setup(this, dragController);
              mSearchDropTargetBar.setQsbSearchBar(getOrCreateQsbBar());
          }
 +        if (mAppInfoDropTargetBar != null) {
 +            mAppInfoDropTargetBar.setup(this, dragController);
 +        }
  
-         if (getResources().getBoolean(R.bool.debug_memory_enabled)) {
-             Log.v(TAG, "adding WeightWatcher");
-             mWeightWatcher = new WeightWatcher(this);
-             mWeightWatcher.setAlpha(0.5f);
-             ((FrameLayout) mLauncherView).addView(mWeightWatcher,
-                     new FrameLayout.LayoutParams(
-                             FrameLayout.LayoutParams.MATCH_PARENT,
-                             FrameLayout.LayoutParams.WRAP_CONTENT,
-                             Gravity.BOTTOM)
-             );
-             boolean show = shouldShowWeightWatcher();
-             mWeightWatcher.setVisibility(show ? View.VISIBLE : View.GONE);
+         if (TestingUtils.MEMORY_DUMP_ENABLED) {
+             TestingUtils.addWeightWatcher(this);
          }
      }