From d2e6a33cb1b6213bde5a1d62c7c415e954317ef9 Mon Sep 17 00:00:00 2001 From: Wink Saville Date: Fri, 12 Feb 2010 12:12:06 -0800 Subject: [PATCH] Change EndCallBehavior while in UTS test mode. When in UTS test mode this reverts the behavior of the end key as it was in cupcake. When not in UTS test mode the behavior is as before the change. The UTS test mode is enabled when presist.sys.uts-test-mode is 1. Bug: 2402366 Change-Id: I81359f3870a1e4da513f76c32aecdb7dfdf3bacf --- .../policy/impl/PhoneWindowManager.java | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/policy/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/com/android/internal/policy/impl/PhoneWindowManager.java index 7be15e2f0c0de..7970987c6dd8f 100755 --- a/policy/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/com/android/internal/policy/impl/PhoneWindowManager.java @@ -2162,16 +2162,21 @@ public class PhoneWindowManager implements WindowManagerPolicy { // This code brings home to the front or, if it is already // at the front, puts the device to sleep. try { - ActivityManagerNative.getDefault().stopAppSwitches(); - sendCloseSystemWindows(); - Intent dock = createHomeDockIntent(); - if (dock != null) { - int result = ActivityManagerNative.getDefault() - .startActivity(null, dock, - dock.resolveTypeIfNeeded(mContext.getContentResolver()), - null, 0, null, null, 0, true /* onlyIfNeeded*/, false); - if (result == IActivityManager.START_RETURN_INTENT_TO_CALLER) { - return false; + if (SystemProperties.getInt("persist.sys.uts-test-mode", 0) == 1) { + /// Roll back EndcallBehavior as the cupcake design to pass P1 lab entry. + Log.d(TAG, "UTS-TEST-MODE"); + } else { + ActivityManagerNative.getDefault().stopAppSwitches(); + sendCloseSystemWindows(); + Intent dock = createHomeDockIntent(); + if (dock != null) { + int result = ActivityManagerNative.getDefault() + .startActivity(null, dock, + dock.resolveTypeIfNeeded(mContext.getContentResolver()), + null, 0, null, null, 0, true /* onlyIfNeeded*/, false); + if (result == IActivityManager.START_RETURN_INTENT_TO_CALLER) { + return false; + } } } int result = ActivityManagerNative.getDefault()