summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-prod (mdb) <android-build-team-robot@google.com>2020-01-16 21:14:09 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-01-16 21:14:09 +0000
commit9722692c19aba9a155ff14d42ffb56191d0ad20f (patch)
tree5f933135681693847c0eb7557dd08b38055597e8
parent817ed0e96d4989e46fb914ebfc0453aee5bf8e10 (diff)
parented0b7ddb4f4bd3af1b4d856beed56deedb86ae8b (diff)
downloadcts-sparse-6141292-L10200000468443906.tar.gz
Merge "Snap for 6141146 from 0ed088b20b9397ccdc591795a1839221e33cb9fd to android10-tests-release" into android10-tests-releasesparse-6141292-L10200000468443906
-rwxr-xr-xapps/CtsVerifier/res/values/strings.xml5
-rw-r--r--apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ItsTestActivity.java2
-rw-r--r--tests/framework/base/windowmanager/src/android/server/wm/MultiDisplaySystemDecorationTests.java2
-rw-r--r--tests/framework/base/windowmanager/util/src/android/server/wm/ActivityManagerTestBase.java2
-rw-r--r--tests/providerui/src/android/providerui/cts/MediaStoreUiTest.java7
-rw-r--r--tests/tests/os/src/android/os/cts/EnvironmentTest.java7
6 files changed, 18 insertions, 7 deletions
diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml
index 77a85c5b35b..1c10baffd64 100755
--- a/apps/CtsVerifier/res/values/strings.xml
+++ b/apps/CtsVerifier/res/values/strings.xml
@@ -2926,8 +2926,9 @@ You should be prompted to select credentials; choose the ones you just installed
<string name="provisioning_byod_personal_ringtones_instruction">
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
</string>
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);
}
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()
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();
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<String> locationPermissions)
+ private void testImageCaptureWithoutLocation(Set<String> 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));
diff --git a/tests/tests/os/src/android/os/cts/EnvironmentTest.java b/tests/tests/os/src/android/os/cts/EnvironmentTest.java
index dfbef8a768b..b00e1f201c0 100644
--- a/tests/tests/os/src/android/os/cts/EnvironmentTest.java
+++ b/tests/tests/os/src/android/os/cts/EnvironmentTest.java
@@ -110,7 +110,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) {