commit | 68dc5d71ba554db7699fa75b29b103a2e9d2a050 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Sat Feb 12 03:23:23 2022 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Sat Feb 12 03:23:23 2022 +0000 |
tree | a6a9f0d36932fa54132243cbbafcbe77b3aeaae4 | |
parent | 4a3b2fff6109e7fdd296917bc43e9e467ef10a04 [diff] | |
parent | 52f527c7286df6126db81471303b6d4e679002ba [diff] |
Merge "Check tuner feature before running testGetClientPriority"
diff --git a/tests/tests/tv/src/android/media/tv/cts/TvInputManagerTest.java b/tests/tests/tv/src/android/media/tv/cts/TvInputManagerTest.java index e4e27a7..8b07ea2 100644 --- a/tests/tests/tv/src/android/media/tv/cts/TvInputManagerTest.java +++ b/tests/tests/tv/src/android/media/tv/cts/TvInputManagerTest.java
@@ -674,7 +674,7 @@ } public void testGetClientPriority() { - if (!Utils.hasTvInputFramework(getActivity())) { + if (!Utils.hasTvInputFramework(getActivity()) || !Utils.hasTunerFeature(getActivity())) { return; }
diff --git a/tests/tests/tv/src/android/media/tv/cts/Utils.java b/tests/tests/tv/src/android/media/tv/cts/Utils.java index 01a93f6..ad70ac4 100644 --- a/tests/tests/tv/src/android/media/tv/cts/Utils.java +++ b/tests/tests/tv/src/android/media/tv/cts/Utils.java
@@ -18,4 +18,7 @@ return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LIVE_TV); } + public static boolean hasTunerFeature(Context context) { + return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TUNER); + } }