D9548: Use minSdk in NotificationsPlugin

Matthijs Tijink noreply at phabricator.kde.org
Wed Jan 3 19:21:48 UTC 2018


mtijink added inline comments.

INLINE COMMENTS

> NotificationsPlugin.java:417
>  
> -            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2)
> -                NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() {

This line shouldn't be removed, as it's a different version check than the other code.

> NotificationsPlugin.java:453
>  
> -            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2)
> -                NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() {

Same here.

> NotificationsPlugin.java:462
>  
> -            replyToNotification(np.getString("requestReplyId"), np.getString("message"));
> +            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) {
> +                replyToNotification(np.getString("requestReplyId"), np.getString("message"));

Why was this version check introduced? That version is already required by the `@RequiresApi` annotation.

> NotificationsPlugin.java:574
> +    public int getMinSdk() {
> +        return Build.VERSION_CODES.JELLY_BEAN_MR2;
> +    }

Why Jelly Bean? As I understand the code, it should work with Kitkat.

REPOSITORY
  R225 KDE Connect - Android application

REVISION DETAIL
  https://phabricator.kde.org/D9548

To: nicolasfella, #kde_connect
Cc: mtijink, #kde_connect, SemperPeritus, ahmedbesbes, daniel.z.tg, jeanv, tfella, aboudhar, seebauer, bugzy, progwolff, MayeulC, menasshock, ach, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20180103/6a612eca/attachment-0001.html>


More information about the KDEConnect mailing list