Modify CTSVerifier FeatureSummaryActivity test for television device type.
Change feature android.hardware.location to indeterminate status
because television device is stable and might not have support for location.
Change-Id: Ieadcb75f7fae70203b87f8c38f701c81de26c104
Signed-off-by: Do Thu Nga <thunga.do@vn.panasonic.com>
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java
index fe7d926..90fe0ad 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java
@@ -263,6 +263,7 @@
boolean hasTelephony = false;
boolean hasBluetooth = false;
boolean hasIllegalFeature = false;
+ boolean hasTelevision = false;
// get list of all features device thinks it has, & store in a HashMap
// for fast lookups
@@ -326,6 +327,8 @@
if (apiVersion >= Build.VERSION_CODES.ECLAIR_MR1) {
Collections.addAll(features, ALL_ECLAIR_FEATURES);
}
+
+ hasTelevision = getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEVISION);
for (Feature f : features) {
HashMap<String, Object> row = new HashMap<String, Object>();
listViewData.add(row);
@@ -341,6 +344,9 @@
// it's required, but device doesn't report it. Boo, set the
// bogus icon
statusIcon = R.drawable.fs_error;
+ if (hasTelevision && PackageManager.FEATURE_LOCATION.equals(f.name)) {
+ statusIcon = R.drawable.fs_indeterminate;
+ }
} else {
// device doesn't report it, but it's not req'd, so can't tell
// if there's a problem