本文主要是介绍CTS,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
make cts -j41.进入CTS测试的命令行模式
./android-cts/tools/cts-tradefed2.启动CTS测试,测试CTS的全部测试计划
run cts --plan cts --disable-reboot3.启动CTS测试,CTS的单项测试
run cts -p [packageName]4.--help查询包名public static final String FEATURE_TELEPHONY = "android.hardware.telephony";
public static final String FEATURE_CONNECTION_SERVICE = "android.software.connectionservice";
private static final Intent PHONE_INTENT = new Intent(Intent.ACTION_DIAL);private boolean isPhoneVisible() {PackageManager pm = mContext.getPackageManager();return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)&& pm.resolveActivity(PHONE_INTENT, 0) != null;}PackageManagerService.javaetc/permissions/if (!TestUtils.shouldTestTelecom(mContext)) {return;}android.telecom/*** Feature for {@link #getSystemAvailableFeatures} and* {@link #hasSystemFeature}: The device has a telephony radio with data* communication support.*/@SdkConstant(SdkConstantType.FEATURE)public static final String FEATURE_TELEPHONY = "android.hardware.telephony";/*** Feature for {@link #getSystemAvailableFeatures} and* {@link #hasSystemFeature}: The Connection Service API is enabled on the device.*/@SdkConstant(SdkConstantType.FEATURE)public static final String FEATURE_CONNECTION_SERVICE = "android.software.connectionservice";handheld_core_hardware.xml$adb shell
$cd etc/permissions/
public static final String FEATURE_TELEPHONY = "android.hardware.telephony";
public static final String FEATURE_CONNECTION_SERVICE = "android.software.connectionservice";
private static final Intent PHONE_INTENT = new Intent(Intent.ACTION_DIAL);private boolean isPhoneVisible() {PackageManager pm = mContext.getPackageManager();return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)&& pm.resolveActivity(PHONE_INTENT, 0) != null;}PackageManagerService.javaetc/permissions/if (!TestUtils.shouldTestTelecom(mContext)) {return;}android.telecom/*** Feature for {@link #getSystemAvailableFeatures} and* {@link #hasSystemFeature}: The device has a telephony radio with data* communication support.*/@SdkConstant(SdkConstantType.FEATURE)public static final String FEATURE_TELEPHONY = "android.hardware.telephony";/*** Feature for {@link #getSystemAvailableFeatures} and* {@link #hasSystemFeature}: The Connection Service API is enabled on the device.*/@SdkConstant(SdkConstantType.FEATURE)public static final String FEATURE_CONNECTION_SERVICE = "android.software.connectionservice";handheld_core_hardware.xml$adb shell
$cd etc/permissions/
5.罗列所有包名
l packages
out/host/linux-x86/cts/android-cts/repository/testcases/CtsTelephonyTestCases.apk
如果平板不支持拨号功能,导致在测试CTS测试失败failed。需要修改配置 /etc/×.xml
这篇关于CTS的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!