summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrett Chabot <brettchabot@android.com>2011-08-23 15:03:13 -0700
committerBrett Chabot <brettchabot@android.com>2011-08-23 15:04:19 -0700
commit2a9e228e6fd719732639beb880d6df64d48158a1 (patch)
tree9c347a80f5d50e75868af3fbf1ad0ad003cefe5d /src
parentfba22b172db7556c48e704667baecce8ed22d904 (diff)
downloadandroid_packages_apps_Trebuchet-2a9e228e6fd719732639beb880d6df64d48158a1.tar.gz
android_packages_apps_Trebuchet-2a9e228e6fd719732639beb880d6df64d48158a1.tar.bz2
android_packages_apps_Trebuchet-2a9e228e6fd719732639beb880d6df64d48158a1.zip
Don't show cling dialogs when test harness is active.
Bug 5204219 Change-Id: I651b8d8c16a203f0e0fdeed97435a841de15dabf
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/Launcher.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 44dbc1552..2fade8f35 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -24,6 +24,7 @@ import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
import android.app.Activity;
+import android.app.ActivityManager;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.SearchManager;
@@ -2978,6 +2979,9 @@ public final class Launcher extends Activity
// TEMPORARY: DISABLE CLINGS ON LARGE UI
if (LauncherApplication.isScreenLarge()) return;
+ // disable clings when running in a test harness
+ if(ActivityManager.isRunningInTestHarness()) return;
+
// Enable the clings only if they have not been dismissed before
SharedPreferences prefs =
getSharedPreferences("com.android.launcher2.prefs", Context.MODE_PRIVATE);