From cb013c173ac8c21fa48bf42f0ecd09349bed4955 Mon Sep 17 00:00:00 2001 From: Raj Mamadgi Date: Wed, 13 Nov 2019 11:06:31 -0800 Subject: Adding additional instructions in default ringtone b/143127364 Change-Id: I5e5aaa68efcc0889dc2b554fd8fc3c180db9aefc Signed-off-by: Raj Mamadgi --- apps/CtsVerifier/res/values/strings.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml index a71f19a96c0..7e42e9a07d0 100755 --- a/apps/CtsVerifier/res/values/strings.xml +++ b/apps/CtsVerifier/res/values/strings.xml @@ -2921,8 +2921,9 @@ You should be prompted to select credentials; choose the ones you just installed This test verifies that personal ringtones can be changed independently of work profile ringtones.\n 1. Press the go button to go to the sound settings page. Under \"Work profile sounds\" turn off the \"use personal profile sounds\" switch.\n - 2. Change the personal \"Phone ringtone\", \"Default notification sound\", and \"Default alarm sound\" settings to different values.\n - 3. Read the values displayed under \"Work phone ringtone\", \"Default work notification sound\", and \"Default work alarm sound\".\n + 2. Change the personal \"Phone ringtone\", \"Default notification sound\", and \"Default alarm sound\" settings to different values. Skip any of these settings that do not exist.\n + 3. Read the values displayed under \"Work phone ringtone\", \"Default work notification sound\", and \"Default work alarm sound\". If any of the settings in #2 did not exist, skip the\n + corresponding work profile setting."\n 4. Verify that the work sounds are different to the personal values just set.\n 5. Go back to the cts-verifier tests using the back button, then mark the test accordingly.\n -- cgit v1.2.3 From 1a275e56f4a8c6e8aaaffcaaea25ee0a8712350a Mon Sep 17 00:00:00 2001 From: Jayant Chowdhary Date: Wed, 23 Oct 2019 10:17:46 -0700 Subject: Make testImageCaptureWithInadequeteLocationPermissions check ACTION_IMAGE_CAPTURE_SECURE also. Bug: 142412890 Test: atest MediaStoreUiTest.java#testImageCaptureWithInadequeteLocationPermissions Merged-In: I21f3d910d58a17c4db6f048f0eefc10fe63b6c6a Change-Id: I21f3d910d58a17c4db6f048f0eefc10fe63b6c6a Signed-off-by: Jayant Chowdhary (cherry picked from commit 53a52c3d805d93b4807421fb3480548212afa48e) --- tests/providerui/src/android/providerui/cts/MediaStoreUiTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/providerui/src/android/providerui/cts/MediaStoreUiTest.java b/tests/providerui/src/android/providerui/cts/MediaStoreUiTest.java index 2185ffbec5e..4c6abcdfdcb 100644 --- a/tests/providerui/src/android/providerui/cts/MediaStoreUiTest.java +++ b/tests/providerui/src/android/providerui/cts/MediaStoreUiTest.java @@ -243,14 +243,15 @@ public class MediaStoreUiTest { perms.add(ACCESS_COARSE_LOCATION); perms.add(ACCESS_BACKGROUND_LOCATION); perms.add(ACCESS_MEDIA_LOCATION); - testImageCaptureWithoutLocation(perms); + testImageCaptureWithoutLocation(perms, MediaStore.ACTION_IMAGE_CAPTURE); + testImageCaptureWithoutLocation(perms, MediaStore.ACTION_IMAGE_CAPTURE_SECURE); } /** * Helper function to verify that whoever handles {@link MediaStore#ACTION_IMAGE_CAPTURE} can * correctly write the contents into a passed {@code content://} Uri, without location * information, necessarily, when ACCESS_FINE_LOCATION permissions aren't given. */ - private void testImageCaptureWithoutLocation(Set locationPermissions) + private void testImageCaptureWithoutLocation(Set locationPermissions, String intentStr) throws Exception { assertFalse("testImageCaptureWithoutLocation should not be passed ACCESS_FINE_LOCATION", locationPermissions.contains(ACCESS_FINE_LOCATION)); @@ -267,7 +268,7 @@ public class MediaStoreUiTest { targetDir.mkdirs(); assertFalse(target.exists()); - final Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); + final Intent intent = new Intent(intentStr); intent.putExtra(MediaStore.EXTRA_OUTPUT, FileProvider.getUriForFile(mContext, "android.providerui.cts.fileprovider", target)); -- cgit v1.2.3 From f25ad72df51ef5798721a0aa13ef282a9073e2b7 Mon Sep 17 00:00:00 2001 From: Xuelin Xu Date: Sun, 5 May 2019 14:46:56 +0800 Subject: Scale down the minInodes when data partition size is less than 4GB Bug: 130371614 in cts_r7, the android.os.cts.EnvironmentTest#testSaneInodes case is failed on our watch, because cts test code assumes the smallest data partition would be 4GB while our watch data partition size is less than 4GB. Now scale down minInodes based on 4GB, android.os.cts.EnvironmentTest#testSaneInodes is passed. Change-Id: I8ea083dc5c151619b3f93f2bf413ba75f356c981 Signed-off-by: Xuelin Xu (cherry picked from commit a56ebf67b42abb25c0d52087e1a47a2287568409) --- tests/tests/os/src/android/os/cts/EnvironmentTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/tests/os/src/android/os/cts/EnvironmentTest.java b/tests/tests/os/src/android/os/cts/EnvironmentTest.java index 0f2ac62f166..622d35a01d5 100644 --- a/tests/tests/os/src/android/os/cts/EnvironmentTest.java +++ b/tests/tests/os/src/android/os/cts/EnvironmentTest.java @@ -83,7 +83,12 @@ public class EnvironmentTest extends TestCase { final long maxInodes = maxsize / 4096; // Assuming the smallest storage would be 4GB, min # of free inodes // in EXT4/F2FS must be larger than 128k for Android to work properly. - final long minInodes = 128 * 1024; + long minInodes = 128 * 1024; + final long size4GB = 4294967296l; + //If the storage size is smaller than 4GB, let's consider 32k for 1GB. + if (maxsize < size4GB) { + minInodes = 32 * 1024; + } if (stat.f_ffree >= minInodes && stat.f_ffree <= maxInodes && stat.f_favail <= stat.f_ffree) { -- cgit v1.2.3 From 628a235700194105aa6d681a8ddc75a1603b470f Mon Sep 17 00:00:00 2001 From: shla Date: Thu, 2 Jan 2020 10:01:24 -0800 Subject: fix crash issue when run ctsv case camera its test When run cts verifier case "camera its test", system will crash as below log. To fix this issue, onCreate() should call "super.onCreate()" earlier to avoid TestListAdapter to be NULL. ------------------------------ E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.android.cts.verifier.TestListAdapter.getCount()' on a null object reference E AndroidRuntime: at com.android.cts.verifier.PassFailButtons$TestListActivity.getHistoryCollection(PassFailButtons.java:294) E AndroidRuntime: at com.android.cts.verifier.PassFailButtons$TestListActivity.setTestResultAndFinish(PassFailButtons.java:282) E AndroidRuntime: at com.android.cts.verifier.camera.its.ItsTestActivity.onCreate(ItsTestActivity.java:357) Bug: 147079033 --- .../src/com/android/cts/verifier/camera/its/ItsTestActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsTestActivity.java index 7d2f25d9517..27b9b793f20 100644 --- a/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsTestActivity.java +++ b/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsTestActivity.java @@ -349,6 +349,7 @@ public class ItsTestActivity extends DialogTestListActivity { + e, Toast.LENGTH_SHORT).show(); } + super.onCreate(savedInstanceState); if (mToBeTestedCameraIds.size() == 0) { showToast(R.string.all_exempted_devices); ItsTestActivity.this.getReportLog().setSummary( @@ -356,7 +357,6 @@ public class ItsTestActivity extends DialogTestListActivity { , 1.0, ResultType.NEUTRAL, ResultUnit.NONE); setTestResultAndFinish(true); } - super.onCreate(savedInstanceState); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); } -- cgit v1.2.3 From fd5bcabf39c0aebd39a6e2f7c8bba9ced9d0f778 Mon Sep 17 00:00:00 2001 From: jinchao wang Date: Mon, 6 Jan 2020 21:20:09 +0800 Subject: Wait for app transition became idle when tap on display center When tapping on default display center, it may click app icon in launcher and open a new appplication. the app switch may effect the cts test. we can also wait for app transition became idle and assert sanity to make sure the thing has done, and then doing the next test step. Bug: 146992888 Test: run cts -m CtsWindowManagerDeviceTestCases -t android.server.wm.MultiDisplaySystemDecorationTests#testImeWindowCanShownWhenActivityMovedToDisplay --- .../src/android/server/wm/MultiDisplaySystemDecorationTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/framework/base/windowmanager/src/android/server/wm/MultiDisplaySystemDecorationTests.java b/tests/framework/base/windowmanager/src/android/server/wm/MultiDisplaySystemDecorationTests.java index 3e3d1554512..9a88210d8d7 100644 --- a/tests/framework/base/windowmanager/src/android/server/wm/MultiDisplaySystemDecorationTests.java +++ b/tests/framework/base/windowmanager/src/android/server/wm/MultiDisplaySystemDecorationTests.java @@ -611,6 +611,8 @@ public class MultiDisplaySystemDecorationTests extends MultiDisplayTestBase { // display. final Display defDisplay = mAmWmState.getWmState().getDisplay(DEFAULT_DISPLAY); tapOnDisplayCenter(defDisplay.getDisplayId()); + mAmWmState.waitForAppTransitionIdleOnDisplay(DEFAULT_DISPLAY); + mAmWmState.assertSanity(); // Reparent ImeTestActivity from virtual display to default display. getLaunchActivityBuilder() -- cgit v1.2.3 From e19bbd639e184fc333cdface058fe21a60b61a25 Mon Sep 17 00:00:00 2001 From: Hu Wang Date: Wed, 13 Nov 2019 15:38:52 +0800 Subject: Fix testKeyguardShowHide testcase This case fail because of timing issue. After the device get sleep, the FirstActivity at top will get handleSleeping message in it's main thread, this is asynchronous operation, if the device is wake up quickly and keyguard not show immediately, FirstActivity maybe think it's visible, so it might get restart-start-resume again. Bug: 144661713 Test: run cts -m CtsWindowManagerDeviceTestCases -t android.server.wm.lifecycle.ActivityLifecycleKeyguardTests#testKeyguardShowHide Change-Id: I93dbe5d82800f096dfd916df7df4a96bc9101ae7 --- .../util/src/android/server/wm/ActivityManagerTestBase.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/framework/base/windowmanager/util/src/android/server/wm/ActivityManagerTestBase.java b/tests/framework/base/windowmanager/util/src/android/server/wm/ActivityManagerTestBase.java index eb3594d046e..ba9cb7b59df 100644 --- a/tests/framework/base/windowmanager/util/src/android/server/wm/ActivityManagerTestBase.java +++ b/tests/framework/base/windowmanager/util/src/android/server/wm/ActivityManagerTestBase.java @@ -1123,6 +1123,8 @@ public abstract class ActivityManagerTestBase { logE("LockScreenSession.gotoKeyguard() is called without lock enabled."); } sleepDevice(); + mAmWmState.waitForWithAmState( + state -> state.getKeyguardControllerState().keyguardShowing, "Keyguard showing"); wakeUpDevice(); if (showWhenLockedActivities.length == 0) { mAmWmState.waitForKeyguardShowingAndNotOccluded(); -- cgit v1.2.3 From 617c4907f792dfe0135da1bdcdcde228964e80d0 Mon Sep 17 00:00:00 2001 From: Rubin Xu Date: Wed, 18 Dec 2019 15:49:43 +0000 Subject: [DO NOT MERGE] Skip SystemUpdatePolicy Tests They have a side effect of causing the device to be upgraded during test, which is not desirable. Disable the tests for now until we figure out another way to test. Bug: 145932189 Test: atest DeviceOwnerTest#testSystemUpdatePolicy Test: atest DeviceOwnerTest#testSystemUpdatePolicyLogged Test: atest MixedDeviceOwnerHostSideTransferTest Change-Id: I91d84d1418069a8242f75aeb4a6c4b0091d7bcd8 Merged-In: I91d84d1418069a8242f75aeb4a6c4b0091d7bcd8 --- .../devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java index 9b6662d2f1d..487bb8ced1e 100644 --- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java +++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java @@ -456,7 +456,8 @@ public class DeviceOwnerTest extends BaseDevicePolicyTest { if (!mHasFeature) { return; } - executeDeviceOwnerTest("SystemUpdatePolicyTest"); + // Disabled due to 145932189 + // executeDeviceOwnerTest("SystemUpdatePolicyTest"); } public void testWifiConfigLockdown() throws Exception { -- cgit v1.2.3 From 586ebccf27ed7251d038c5fa510c9f266336d918 Mon Sep 17 00:00:00 2001 From: Rubin Xu Date: Wed, 18 Dec 2019 15:49:43 +0000 Subject: [DO NOT MERGE] Skip SystemUpdatePolicy Tests They have a side effect of causing the device to be upgraded during test, which is not desirable. Disable the tests for now until we figure out another way to test. Bug: 145932189 Test: atest DeviceOwnerTest#testSystemUpdatePolicy Test: atest DeviceOwnerTest#testSystemUpdatePolicyLogged Test: atest MixedDeviceOwnerHostSideTransferTest Change-Id: I91d84d1418069a8242f75aeb4a6c4b0091d7bcd8 Merged-In: I91d84d1418069a8242f75aeb4a6c4b0091d7bcd8 --- .../devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java index 827db714c81..5be8c27b96d 100644 --- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java +++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java @@ -424,7 +424,8 @@ public class DeviceOwnerTest extends BaseDevicePolicyTest { if (!mHasFeature) { return; } - executeDeviceOwnerTest("SystemUpdatePolicyTest"); + // Disabled due to 145932189 + // executeDeviceOwnerTest("SystemUpdatePolicyTest"); } public void testWifiConfigLockdown() throws Exception { -- cgit v1.2.3