Fixed themes test for watches with different DPI settings.

Resolved issue caused by missing resources for DPI that applies
to watch devices only. As the test is skipped on watch type
devices, the fix makes the test ignores the missing resources
issue if the test is run on a watch type device.

Bug: 30124611
Change-Id: I0d0619d4b9390f6b664f2c73023d0f736bc1cdeb
diff --git a/hostsidetests/theme/src/android/theme/cts/ThemeHostTest.java b/hostsidetests/theme/src/android/theme/cts/ThemeHostTest.java
index e04a10b..eb2cb80 100644
--- a/hostsidetests/theme/src/android/theme/cts/ThemeHostTest.java
+++ b/hostsidetests/theme/src/android/theme/cts/ThemeHostTest.java
@@ -125,7 +125,7 @@
         mCompletionService = new ExecutorCompletionService<>(mExecutionService);
     }
 
-    private Map<String, File> extractReferenceImages(String zipFile) {
+    private Map<String, File> extractReferenceImages(String zipFile) throws Exception {
         final Map<String, File> references = new HashMap<>();
         final InputStream zipStream = ThemeHostTest.class.getResourceAsStream(zipFile);
         if (zipStream != null) {
@@ -150,7 +150,12 @@
                 fail("Failed to unzip assets: " + zipFile);
             }
         } else {
-            fail("Failed to get resource: " + zipFile);
+            if (checkHardwareTypeSkipTest(mDevice.executeShellCommand(HARDWARE_TYPE_CMD).trim())) {
+                Log.logAndDisplay(LogLevel.WARN, LOG_TAG,
+                        "Could not obtain resources for skipped themes test: " + zipFile);
+            } else {
+                fail("Failed to get resource: " + zipFile);
+            }
         }
 
         return references;