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

Commit 4a0c16fd authored by Stefan Niedermann's avatar Stefan Niedermann
Browse files

Drop support for Android < 5.0

parent a924d4e3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ android {

    defaultConfig {
        applicationId "it.niedermann.owncloud.notes"
        minSdkVersion 19
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 3001003
        versionName "3.1.3"
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ public abstract class LockedActivity extends BrandedActivity {
    }

    private void askToUnlock() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && NotesApplication.isLocked()) {
        if (NotesApplication.isLocked()) {
            KeyguardManager keyguardManager = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
            if (keyguardManager != null) {
                Intent i = keyguardManager.createConfirmDeviceCredentialIntent(getString(R.string.unlock_notes), null);
+3 −9
Original line number Diff line number Diff line
@@ -482,9 +482,7 @@ public class MainActivity extends LockedActivity implements NoteClickListener, V

        binding.headerView.setBackgroundColor(mainColor);
        binding.appName.setTextColor(textColor);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        activityBinding.progressCircular.getIndeterminateDrawable().setColorFilter(getSecondaryForegroundColorDependingOnTheme(this, mainColor), PorterDuff.Mode.SRC_IN);
        }

        // TODO We assume, that the background of the spinner is always white
        activityBinding.swiperefreshlayout.setColorSchemeColors(contrastRatioIsSufficient(Color.WHITE, mainColor) ? mainColor : Color.BLACK);
@@ -907,12 +905,8 @@ public class MainActivity extends LockedActivity implements NoteClickListener, V
    private void updateToolbars(boolean disableSearch) {
        activityBinding.homeToolbar.setVisibility(disableSearch ? VISIBLE : GONE);
        activityBinding.toolbar.setVisibility(disableSearch ? GONE : VISIBLE);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        activityBinding.appBar.setStateListAnimator(AnimatorInflater.loadStateListAnimator(activityBinding.appBar.getContext(),
                disableSearch ? R.animator.appbar_elevation_off : R.animator.appbar_elevation_on));
        } else {
            ViewCompat.setElevation(activityBinding.appBar, disableSearch ? 0 : getResources().getDimension(R.dimen.design_appbar_elevation));
        }
        if (disableSearch) {
            activityBinding.searchView.setQuery(null, true);
        }
+1 −7
Original line number Diff line number Diff line
@@ -95,13 +95,7 @@ public abstract class NoteViewHolder extends RecyclerView.ViewHolder {
            ((Chip) noteCategory).setChipStrokeColor(ColorStateList.valueOf(categoryBackground));
            ((Chip) noteCategory).setChipBackgroundColor(ColorStateList.valueOf(isDarkThemeActive ? categoryBackground : Color.TRANSPARENT));
        } else {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            DrawableCompat.setTint(noteCategory.getBackground(), categoryBackground);
            } else {
                final GradientDrawable drawable = (GradientDrawable) noteCategory.getBackground();
                drawable.setStroke(1, categoryBackground);
                drawable.setColor(isDarkThemeActive ? categoryBackground : Color.TRANSPARENT);
            }
        }
    }

+0 −1
Original line number Diff line number Diff line
@@ -124,7 +124,6 @@
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:indeterminateTint="@color/defaultBrand"
                    tools:targetApi="lollipop"
                    tools:visibility="gone" />

                <androidx.recyclerview.widget.RecyclerView