am ff0c4ab6: am 3b077c29: Merge "CtsVerifier: Camera FOV: cap FOV test to 120 degree" into lollipop-cts-dev
* commit 'ff0c4ab667ca92fed830c98604bfed7884f4f16e':
CtsVerifier: Camera FOV: cap FOV test to 120 degree
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index f014955..83e8b6f 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -17,8 +17,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.cts.verifier"
- android:versionCode="4"
- android:versionName="5.0_r2">
+ android:versionCode="5"
+ android:versionName="5.0_r2.5">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="21"/>
@@ -829,6 +829,10 @@
<meta-data android:name="test_category" android:value="@string/test_category_location" />
<meta-data android:name="test_required_features"
android:value="android.hardware.location.network:android.hardware.location.gps" />
+ <meta-data android:name="test_excluded_features"
+ android:value="android.hardware.type.television" />
+ <meta-data android:name="test_excluded_features"
+ android:value="android.software.leanback" />
</activity>
<activity android:name=".location.LocationModeBatterySavingTestActivity"
android:label="@string/location_mode_battery_saving_test">
@@ -838,6 +842,10 @@
</intent-filter>
<meta-data android:name="test_category" android:value="@string/test_category_location" />
<meta-data android:name="test_required_features" android:value="android.hardware.location.network" />
+ <meta-data android:name="test_excluded_features"
+ android:value="android.hardware.type.television" />
+ <meta-data android:name="test_excluded_features"
+ android:value="android.software.leanback" />
</activity>
<activity android:name=".location.LocationModeDeviceOnlyTestActivity"
android:label="@string/location_mode_device_only_test">
@@ -1381,15 +1389,6 @@
<!-- Used by the SensorTestScreenManipulator to reset the screen timeout after turn off. -->
<activity android:name=".os.TimeoutResetActivity"/>
- <activity android:name=".screenpinning.ScreenPinningTestActivity"
- android:label="@string/screen_pinning_test">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.cts.intent.category.MANUAL_TEST" />
- </intent-filter>
- <meta-data android:name="test_category" android:value="@string/test_category_other" />
- </activity>
-
<activity android:name=".tv.TvInputDiscoveryTestActivity"
android:label="@string/tv_input_discover_test">
<intent-filter>
@@ -1423,6 +1422,15 @@
android:value="android.software.live_tv" />
</activity>
+ <activity android:name=".screenpinning.ScreenPinningTestActivity"
+ android:label="@string/screen_pinning_test">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.cts.intent.category.MANUAL_TEST" />
+ </intent-filter>
+ <meta-data android:name="test_category" android:value="@string/test_category_other" />
+ </activity>
+
<activity android:name=".tv.MockTvInputSettingsActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
diff --git a/tests/tests/os/src/android/os/cts/BuildVersionTest.java b/tests/tests/os/src/android/os/cts/BuildVersionTest.java
index e335901..3002ca3 100644
--- a/tests/tests/os/src/android/os/cts/BuildVersionTest.java
+++ b/tests/tests/os/src/android/os/cts/BuildVersionTest.java
@@ -29,7 +29,7 @@
private static final String LOG_TAG = "BuildVersionTest";
private static final Set<String> EXPECTED_RELEASES =
- new HashSet<String>(Arrays.asList("5.0", "5.0.1", "5.0.2"));
+ new HashSet<String>(Arrays.asList("5.0.1", "5.0.2"));
private static final int EXPECTED_SDK = 21;
private static final String EXPECTED_BUILD_VARIANT = "user";
private static final String EXPECTED_TAG = "release-keys";
diff --git a/tests/tests/security/jni/Android.mk b/tests/tests/security/jni/Android.mk
index 79ba435..1d24213 100644
--- a/tests/tests/security/jni/Android.mk
+++ b/tests/tests/security/jni/Android.mk
@@ -34,7 +34,6 @@
android_security_cts_NetlinkSocket.cpp \
android_security_cts_AudioPolicyBinderTest.cpp \
android_security_cts_AudioflingerBinderTest.cpp \
- android_security_cts_MediaPlayerInfoLeakTest.cpp \
android_security_cts_AudioEffectBinderTest.cpp
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
diff --git a/tests/tests/security/jni/CtsSecurityJniOnLoad.cpp b/tests/tests/security/jni/CtsSecurityJniOnLoad.cpp
index e16f06b..4ce9991 100644
--- a/tests/tests/security/jni/CtsSecurityJniOnLoad.cpp
+++ b/tests/tests/security/jni/CtsSecurityJniOnLoad.cpp
@@ -28,7 +28,6 @@
extern int register_android_security_cts_MMapExecutableTest(JNIEnv* env);
extern int register_android_security_cts_AudioPolicyBinderTest(JNIEnv* env);
extern int register_android_security_cts_AudioFlingerBinderTest(JNIEnv* env);
-extern int register_android_security_cts_MediaPlayerInfoLeakTest(JNIEnv* env);
extern int register_android_security_cts_AudioEffectBinderTest(JNIEnv* env);
jint JNI_OnLoad(JavaVM *vm, void *reserved) {
@@ -82,10 +81,6 @@
return JNI_ERR;
}
- if (register_android_security_cts_MediaPlayerInfoLeakTest(env)) {
- return JNI_ERR;
- }
-
if (register_android_security_cts_AudioEffectBinderTest(env)) {
return JNI_ERR;
}
diff --git a/tests/tests/security/jni/android_security_cts_AudioPolicyBinderTest.cpp b/tests/tests/security/jni/android_security_cts_AudioPolicyBinderTest.cpp
index fd93387..9daa2cb 100644
--- a/tests/tests/security/jni/android_security_cts_AudioPolicyBinderTest.cpp
+++ b/tests/tests/security/jni/android_security_cts_AudioPolicyBinderTest.cpp
@@ -18,7 +18,6 @@
#include <jni.h>
#include <binder/IServiceManager.h>
-#include <binder/Parcel.h>
#include <media/IAudioPolicyService.h>
#include <media/AudioSystem.h>
#include <system/audio.h>
@@ -154,32 +153,6 @@
return true;
}
-jint android_security_cts_AudioPolicy_test_getStreamVolumeLeak(JNIEnv* env __unused,
- jobject thiz __unused)
-{
- sp<IAudioPolicyService> aps;
-
- if (!init(aps, NULL, NULL)) {
- return -1;
- }
-
- // Keep synchronized with IAudioPolicyService.cpp!
- enum {
- GET_STREAM_VOLUME = 17,
- };
-
- Parcel data, reply;
- status_t err;
- data.writeInterfaceToken(aps->getInterfaceDescriptor());
- data.writeInt32(-1); // stream type
- data.writeInt32(-1); // device
- aps->asBinder()->transact(GET_STREAM_VOLUME, data, &reply);
- int index = reply.readInt32();
- err = reply.readInt32();
-
- return index;
-}
-
static JNINativeMethod gMethods[] = {
{ "native_test_startOutput", "()Z",
(void *) android_security_cts_AudioPolicy_test_startOutput },
@@ -187,8 +160,6 @@
(void *) android_security_cts_AudioPolicy_test_stopOutput },
{ "native_test_isStreamActive", "()Z",
(void *) android_security_cts_AudioPolicy_test_isStreamActive },
- { "native_test_getStreamVolumeLeak", "()I",
- (void *) android_security_cts_AudioPolicy_test_getStreamVolumeLeak },
};
int register_android_security_cts_AudioPolicyBinderTest(JNIEnv* env)
diff --git a/tests/tests/security/jni/android_security_cts_MediaPlayerInfoLeakTest.cpp b/tests/tests/security/jni/android_security_cts_MediaPlayerInfoLeakTest.cpp
deleted file mode 100644
index 41262ac..0000000
--- a/tests/tests/security/jni/android_security_cts_MediaPlayerInfoLeakTest.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "MediaPlayerInfoLeakTest-JNI"
-
-#include <jni.h>
-
-#include <binder/Parcel.h>
-#include <binder/IServiceManager.h>
-
-#include <media/IMediaPlayer.h>
-#include <media/IMediaPlayerService.h>
-#include <media/IMediaPlayerClient.h>
-
-#include <sys/stat.h>
-
-using namespace android;
-
-static status_t connectMediaPlayer(sp<IMediaPlayer>& iMP)
-{
- sp<IServiceManager> sm = defaultServiceManager();
- sp<IBinder> mediaPlayerService = sm->checkService(String16("media.player"));
-
- sp<IMediaPlayerService> iMPService = IMediaPlayerService::asInterface(mediaPlayerService);
- sp<IMediaPlayerClient> client;
- Parcel data, reply;
- int dummyAudioSessionId = 1;
- data.writeInterfaceToken(iMPService->getInterfaceDescriptor());
- data.writeStrongBinder(client->asBinder());
- data.writeInt32(dummyAudioSessionId);
-
- // Keep synchronized with IMediaPlayerService.cpp!
- enum {
- CREATE = IBinder::FIRST_CALL_TRANSACTION,
- };
- status_t err = iMPService->asBinder()->transact(CREATE, data, &reply);
-
- if (err == NO_ERROR) {
- iMP = interface_cast<IMediaPlayer>(reply.readStrongBinder());
- }
- return err;
-}
-
-int testMediaPlayerInfoLeak(int command)
-{
- sp<IMediaPlayer> iMP;
- if (NO_ERROR != connectMediaPlayer(iMP)) {
- return false;
- }
-
-
- Parcel data, reply;
- data.writeInterfaceToken(iMP->getInterfaceDescriptor());
- iMP->asBinder()->transact(command, data, &reply);
-
- int leak = reply.readInt32();
- status_t err = reply.readInt32();
- return leak;
-}
-
-jint android_security_cts_MediaPlayer_test_getCurrentPositionLeak(JNIEnv* env __unused,
- jobject thiz __unused)
-{
- // Keep synchronized with IMediaPlayer.cpp!
- enum {
- GET_CURRENT_POSITION = 11,
- };
- return testMediaPlayerInfoLeak(GET_CURRENT_POSITION);
-}
-
-jint android_security_cts_MediaPlayer_test_getDurationLeak(JNIEnv* env __unused,
- jobject thiz __unused)
-{
- // Keep synchronized with IMediaPlayer.cpp!
- enum {
- GET_DURATION = 12,
- };
- return testMediaPlayerInfoLeak(GET_DURATION);
-}
-
-static JNINativeMethod gMethods[] = {
- { "native_test_getCurrentPositionLeak", "()I",
- (void *) android_security_cts_MediaPlayer_test_getCurrentPositionLeak },
- { "native_test_getDurationLeak", "()I",
- (void *) android_security_cts_MediaPlayer_test_getDurationLeak },
-};
-
-int register_android_security_cts_MediaPlayerInfoLeakTest(JNIEnv* env)
-{
- jclass clazz = env->FindClass("android/security/cts/MediaPlayerInfoLeakTest");
- return env->RegisterNatives(clazz, gMethods,
- sizeof(gMethods) / sizeof(JNINativeMethod));
-}
diff --git a/tests/tests/security/src/android/security/cts/AudioPolicyBinderTest.java b/tests/tests/security/src/android/security/cts/AudioPolicyBinderTest.java
index daa7c83..399d8bb 100644
--- a/tests/tests/security/src/android/security/cts/AudioPolicyBinderTest.java
+++ b/tests/tests/security/src/android/security/cts/AudioPolicyBinderTest.java
@@ -48,17 +48,7 @@
assertTrue(native_test_isStreamActive());
}
- /**
- * Checks that IAudioPolicyService::getStreamVolumeIndex() does not leak information
- * when called with an invalid stream/device type.
- */
- public void test_getStreamVolumeLeak() throws Exception {
- int volume = native_test_getStreamVolumeLeak();
- assertTrue(String.format("Leaked volume 0x%08X", volume), volume == 0);
- }
-
private static native boolean native_test_startOutput();
private static native boolean native_test_stopOutput();
private static native boolean native_test_isStreamActive();
- private static native int native_test_getStreamVolumeLeak();
}
diff --git a/tests/tests/security/src/android/security/cts/MediaPlayerInfoLeakTest.java b/tests/tests/security/src/android/security/cts/MediaPlayerInfoLeakTest.java
deleted file mode 100644
index e34fc05..0000000
--- a/tests/tests/security/src/android/security/cts/MediaPlayerInfoLeakTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.security.cts;
-
-import junit.framework.TestCase;
-
-public class MediaPlayerInfoLeakTest extends TestCase {
-
- static {
- System.loadLibrary("ctssecurity_jni");
- }
-
-
- /**
- * Checks that IMediaPlayer::getCurrentPosition() does not leak info in error case
- */
- public void test_getCurrentPositionLeak() throws Exception {
- int pos = native_test_getCurrentPositionLeak();
- assertTrue(String.format("Leaked pos 0x%08X", pos), pos == 0);
- }
-
- /**
- * Checks that IMediaPlayer::getDuration() does not leak info in error case
- */
- public void test_getDurationLeak() throws Exception {
- int dur = native_test_getDurationLeak();
- assertTrue(String.format("Leaked dur 0x%08X", dur), dur == 0);
- }
-
- private static native int native_test_getCurrentPositionLeak();
- private static native int native_test_getDurationLeak();
-}
diff --git a/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java b/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java
index 25431b2..c43183a 100644
--- a/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java
+++ b/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java
@@ -31,7 +31,7 @@
@Option(name="cts-install-path", description="the path to the cts installation to use")
private String mCtsRootDirPath = System.getProperty("CTS_ROOT");
- public static final String CTS_BUILD_VERSION = "5.0_r2";
+ public static final String CTS_BUILD_VERSION = "5.0_r2.5";
/**
* {@inheritDoc}