Merge "Adding overlay interaction support" into ub-launcher3-calgary
diff --git a/build.gradle b/build.gradle
index ca49c13..b5eeeb0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -51,14 +51,14 @@
}
dependencies {
- compile 'com.android.support:support-v4:23.0.1'
- compile 'com.android.support:recyclerview-v7:23.0.1'
+ compile 'com.android.support:support-v4:23.1.1'
+ compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-2'
compile project(":WallpaperPicker-Lib")
testCompile 'junit:junit:4.12'
- androidTestCompile 'com.android.support.test:runner:+'
- androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:+'
+ androidTestCompile 'com.android.support.test:runner:0.5'
+ androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
}
protobuf {
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 68b0dff..70d9820 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1959,13 +1959,11 @@
mWorkspace.removeCallbacks(mBuildLayersRunnable);
// Stop callbacks from LauncherModel
- LauncherAppState app = (LauncherAppState.getInstance());
-
// It's possible to receive onDestroy after a new Launcher activity has
// been created. In this case, don't interfere with the new Launcher.
if (mModel.isCurrentCallbacks(this)) {
mModel.stopLoader();
- app.setLauncher(null);
+ LauncherAppState.getInstance().setLauncher(null);
}
try {
@@ -1981,12 +1979,6 @@
unregisterReceiver(mCloseSystemDialogsReceiver);
- mDragLayer.clearAllResizeFrames();
- ((ViewGroup) mWorkspace.getParent()).removeAllViews();
- mWorkspace.removeAllWorkspaceScreens();
- mWorkspace = null;
- mDragController = null;
-
LauncherAnimUtils.onDestroyActivity();
if (mLauncherCallbacks != null) {
diff --git a/tests/src/com/android/launcher3/InvariantDeviceProfileTest.java b/tests/src/com/android/launcher3/InvariantDeviceProfileTest.java
index 21df601..476eb0a 100644
--- a/tests/src/com/android/launcher3/InvariantDeviceProfileTest.java
+++ b/tests/src/com/android/launcher3/InvariantDeviceProfileTest.java
@@ -168,7 +168,9 @@
resources.getDisplayMetrics());
if (portraitProfile.isPhone) {
// This fails on some devices due to http://b/26884580 (portraitHeight is 101, not 100).
- assertEquals(4 + 94 + 2, portraitHeight);
+ // TODO: Remove the comparision against 101 once b/26884580 is fixed
+ // assertEquals(4 + 94 + 2, portraitHeight);
+ assertTrue(portraitHeight == (4 + 94 + 2) || portraitHeight == (4 + 95 + 2));
} else {
assertEquals(8 + 94 + 24, portraitHeight);
}