From ca13ea74abebbeee4f885917a07c683a9c0fbd4b Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 12 Apr 2019 17:04:04 +0300 Subject: [PATCH] Stop trying to create app shortcuts on pre 7.1 devices, fixing a crash --- .../java/net/ktnx/mobileledger/ui/activity/MainActivity.java | 2 ++ 1 file changed, 2 insertions(+) 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++) { -- 2.39.5