OSDN Git Service

Change EndCallBehavior while in UTS test mode.
authorWink Saville <wink@google.com>
Fri, 12 Feb 2010 20:12:06 +0000 (12:12 -0800)
committerWink Saville <wink@google.com>
Fri, 12 Feb 2010 20:12:06 +0000 (12:12 -0800)
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

phone/com/android/internal/policy/impl/PhoneWindowManager.java

index 7be15e2..7970987 100755 (executable)
@@ -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()