From: Damyan Ivanov Date: Fri, 12 Apr 2019 14:04:04 +0000 (+0300) Subject: Stop trying to create app shortcuts on pre 7.1 devices, fixing a crash X-Git-Tag: v0.9.4~6 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=ca13ea74abebbeee4f885917a07c683a9c0fbd4b;p=mobile-ledger.git Stop trying to create app shortcuts on pre 7.1 devices, fixing a crash --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index f662dabe..79f39ff7 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -330,6 +330,8 @@ public class MainActivity extends ProfileThemedActivity { } } private void createShortcuts() { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) return; + List shortcuts = new ArrayList<>(); try (LockHolder lh = Data.profiles.lockForReading()) { for (int i = 0; i < Data.profiles.size(); i++) {