]> git.ktnx.net Git - mobile-ledger.git/commitdiff
Stop trying to create app shortcuts on pre 7.1 devices, fixing a crash
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 12 Apr 2019 14:04:04 +0000 (17:04 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 12 Apr 2019 14:04:04 +0000 (17:04 +0300)
app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java

index f662dabe367913fdeb2bf4deeb33a6bc6c7178b4..79f39ff73da793187fccb018ff16c4f2e770a0e4 100644 (file)
@@ -330,6 +330,8 @@ public class MainActivity extends ProfileThemedActivity {
         }
     }
     private void createShortcuts() {
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) return;
+
         List<ShortcutInfo> shortcuts = new ArrayList<>();
         try (LockHolder lh = Data.profiles.lockForReading()) {
             for (int i = 0; i < Data.profiles.size(); i++) {