OSDN Git Service

Fix companion device feature presence check
authorEugene Susla <eugenesusla@google.com>
Fri, 24 Mar 2017 20:35:45 +0000 (13:35 -0700)
committerEugene Susla <eugenesusla@google.com>
Fri, 24 Mar 2017 20:37:19 +0000 (13:37 -0700)
There was a typo causing the feature to be falsely detected as not present.

Test: Ensure feature presence is now detected correctly
Bug: 30932767
Change-Id: I44d137e89546596058b272e8eeaccc0a1db21aef

core/java/android/companion/CompanionDeviceManager.java

index ecdc0ce..78e3de4 100644 (file)
@@ -214,7 +214,7 @@ public final class CompanionDeviceManager {
     }
 
     private boolean checkFeaturePresent() {
-        boolean featurePresent = mService == null;
+        boolean featurePresent = mService != null;
         if (!featurePresent && DEBUG) {
             Log.d(LOG_TAG, "Feature " + PackageManager.FEATURE_COMPANION_DEVICE_SETUP
                     + " not available");