Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85de68a9 authored by Vania Januar's avatar Vania Januar Committed by Android (Google) Code Review
Browse files

Merge "Add the USB device parameter to usb stylus feature preference provider." into udc-qpr-dev

parents a277f787 558d9f87
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -41,7 +41,8 @@ public interface StylusFeatureProvider {
     * the list will contain only the preference showing the current firmware version.
     *
     * @param context The context
     * @param usbDevice The USB device for which to generate preferences.
     */
    @Nullable
    List<Preference> getUsbFirmwareUpdatePreferences(Context context);
    List<Preference> getUsbFirmwareUpdatePreferences(Context context, UsbDevice usbDevice);
}
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ public class StylusFeatureProviderImpl implements StylusFeatureProvider {
    }

    @Override
    public List<Preference> getUsbFirmwareUpdatePreferences(Context context) {
    public List<Preference> getUsbFirmwareUpdatePreferences(Context context, UsbDevice usbDevice) {
        return null;
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ public class StylusUsbFirmwareController extends BasePreferenceController
            StylusFeatureProvider featureProvider = FeatureFactory.getFactory(
                    mContext).getStylusFeatureProvider();
            List<Preference> preferences =
                    featureProvider.getUsbFirmwareUpdatePreferences(mContext);
                    featureProvider.getUsbFirmwareUpdatePreferences(mContext, mStylusUsbDevice);

            if (preferences != null) {
                mPreference = new PreferenceCategory(mContext);
+1 −1
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ public class StylusUsbFirmwareControllerTest {
        when(mFeatureFactory.getStylusFeatureProvider()
                .isUsbFirmwareUpdateEnabled(any())).thenReturn(true);
        when(mFeatureFactory.getStylusFeatureProvider()
                .getUsbFirmwareUpdatePreferences(any()))
                .getUsbFirmwareUpdatePreferences(any(), any()))
                .thenReturn(Collections.singletonList(mock(Preference.class)));
    }
}