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

Commit 3e10f3fa authored by Stefan Niedermann's avatar Stefan Niedermann
Browse files

- 🐞 Fix crash for Android < 7 when open a note in preview mode (#1056)

parent 23b61c91
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -7,14 +7,15 @@ android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
        coreLibraryDesugaringEnabled true
    }

    defaultConfig {
        applicationId "it.niedermann.owncloud.notes"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 3001001
        versionName "3.1.1"
        versionCode 3001002
        versionName "3.1.2"
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
@@ -75,10 +76,11 @@ dependencies {
    implementation "androidx.preference:preference:1.1.1"
    implementation "androidx.recyclerview:recyclerview:1.1.0"
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    implementation 'androidx.work:work-runtime:2.4.0'
    implementation 'androidx.work:work-runtime:2.5.0'
    implementation "com.google.android.material:material:1.2.1"

    implementation 'androidx.multidex:multidex:2.0.1'
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.1'

    // Testing
    testImplementation 'junit:junit:4.13.1'
+3 −9
Original line number Diff line number Diff line
@@ -7,17 +7,17 @@ import android.content.res.Configuration;
import android.util.Log;

import androidx.appcompat.app.AppCompatDelegate;
import androidx.multidex.MultiDexApplication;
import androidx.preference.PreferenceManager;

import it.niedermann.owncloud.notes.preferences.DarkModeSetting;

import static androidx.multidex.MultiDex.install;
import static androidx.preference.PreferenceManager.getDefaultSharedPreferences;

public class NotesApplication extends Application {
public class NotesApplication extends MultiDexApplication {
    private static final String TAG = NotesApplication.class.getSimpleName();

    private static final long LOCK_TIME = 30 * 1000;
    private static final long LOCK_TIME = 30_000;
    private static boolean lockedPreference = false;
    private static boolean isLocked = true;
    private static long lastInteraction = 0;
@@ -34,12 +34,6 @@ public class NotesApplication extends Application {
        super.onCreate();
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        install(this);
    }

    public static void setAppTheme(DarkModeSetting setting) {
        AppCompatDelegate.setDefaultNightMode(setting.getModeId());
    }
+1 −0
Original line number Diff line number Diff line
- 🐞 Fix crash for Android < 7 when open a note in preview mode (#1056)
 No newline at end of file