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

Unverified Commit 423e3b0c authored by Marten Gajda's avatar Marten Gajda Committed by GitHub
Browse files

Retire support for Android Version < 4.4 (#888)

The total number of users of Android versions < 4.4 sums up to less than 1% on Google Play. That's not enough to justify supporting these legacy versions anymore. Dropping these, on the other hand, allows us to ignore backwarnds compatibility issues.
parent 88a57514
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
COMPILE_SDK_VERSION=28
MIN_SDK_VERSION=15
MIN_SDK_VERSION=19
TARGET_SDK_VERSION=26
VERSION_OVERRIDE=0
android.enableJetifier=true
+1 −8
Original line number Diff line number Diff line
@@ -70,15 +70,8 @@ public class TaskProviderBroadcastReceiver extends BroadcastReceiver
        }

        // AlarmManager API changed in v19 (KitKat) and the "set" method is not called at the exact time anymore
        if (Build.VERSION.SDK_INT > 18)
        {
        am.setExact(AlarmManager.RTC_WAKEUP, updateTime.getTimestamp(), pendingIntent);
    }
        else
        {
            am.set(AlarmManager.RTC_WAKEUP, updateTime.getTimestamp(), pendingIntent);
        }
    }


    @Override
+0 −17
Original line number Diff line number Diff line
@@ -86,14 +86,6 @@ public class CheckListFieldEditor extends AbstractFieldEditor implements OnCheck
        super.onFinishInflate();

        mText = (EditText) findViewById(android.R.id.text1);
        if (mText != null && VERSION.SDK_INT < 18)
        {
            /*
             * enable memory leak workaround on android < 4.3: disable spell checker
             */
            int inputType = mText.getInputType();
            mText.setInputType(inputType | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
        }

        mContainer = (ViewGroup) findViewById(R.id.checklist);
    }
@@ -258,15 +250,6 @@ public class CheckListFieldEditor extends AbstractFieldEditor implements OnCheck
            viewGroup.setTag(this);
            this.index = index;

            /*
             * enable memory leak workaround on android < 4.3: disable spell checker
             */
            if (VERSION.SDK_INT < 18)
            {
                int inputType = mText.getInputType();
                mText.setInputType(inputType | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
            }

            checkbox.setOnCheckedChangeListener(CheckListFieldEditor.this);

            /* unfortunately every EditText needs a separate TextWatcher, we only use this to add a new line once the last one is written to */
+0 −10
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package org.dmfs.tasks.widget;

import android.content.Context;
import android.os.Build.VERSION;
import android.text.Editable;
import android.text.InputType;
import android.text.TextWatcher;
@@ -301,15 +300,6 @@ public class CheckListFieldView extends AbstractFieldView implements OnCheckedCh
            }
        });

        /*
         * enable memory leak workaround on android < 4.3: disable spell checker
         */
        if (VERSION.SDK_INT < 18)
        {
            int inputType = text.getInputType();
            text.setInputType(inputType | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
        }

        // bind the remove button
        View removeButton = itemView.findViewById(R.id.remove_item);
        removeButton.setTag(item);
+0 −9
Original line number Diff line number Diff line
@@ -77,15 +77,6 @@ public class TextFieldEditor extends AbstractFieldEditor implements OnFocusChang
        mText = (EditText) findViewById(android.R.id.text1);
        if (mText != null)
        {
            /*
             * enable memory leak workaround on android < 4.3: disable spell checker
             */

            int inputType = mText.getInputType();
            if (Build.VERSION.SDK_INT < 18)
            {
                mText.setInputType(inputType | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
            }
            mText.setOnFocusChangeListener(this);
        }
    }
Loading