@Test public void testNullActivity() { mAmbientDelegateUnderTest = new AmbientDelegate(null, mMockWearableControllerProvider, mMockAmbientCallback); verifyZeroInteractions(mMockWearableControllerProvider); assertFalse(mAmbientDelegateUnderTest.isAmbient()); }
boolean isAmbient() { if (mWearableController != null) { return mWearableController.isAmbient(); } return false; }
AmbientDelegate { boolean isAmbient() { if (mWearableController != null) { return mWearableController.isAmbient(); } return false; } }
AmbientDelegate { boolean isAmbient() { if (mWearableController != null) { return mWearableController.isAmbient(); } return false; } AmbientDelegate(@Nullable Activity activity,
                           @NonNull WearableControllerProvider wearableControllerProvider,
                           @NonNull AmbientCallback callback); }
AmbientDelegate { boolean isAmbient() { if (mWearableController != null) { return mWearableController.isAmbient(); } return false; } AmbientDelegate(@Nullable Activity activity,
                           @NonNull WearableControllerProvider wearableControllerProvider,
                           @NonNull AmbientCallback callback);  }
AmbientDelegate { boolean isAmbient() { if (mWearableController != null) { return mWearableController.isAmbient(); } return false; } AmbientDelegate(@Nullable Activity activity,
                           @NonNull WearableControllerProvider wearableControllerProvider,
                           @NonNull AmbientCallback callback);   }