From ada6cbc6a791551eb1d34b832239de57860c850d Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Wed, 22 Aug 2018 21:08:37 +0800 Subject: [PATCH] AppListFragment: inform the user on unsupported launchers --- app/src/main/java/net/typeblog/shelter/ui/AppListFragment.java | 3 ++- app/src/main/res/values/strings.xml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/typeblog/shelter/ui/AppListFragment.java b/app/src/main/java/net/typeblog/shelter/ui/AppListFragment.java index 345190c..d368382 100644 --- a/app/src/main/java/net/typeblog/shelter/ui/AppListFragment.java +++ b/app/src/main/java/net/typeblog/shelter/ui/AppListFragment.java @@ -300,7 +300,8 @@ public class AppListFragment extends Fragment { } else { // TODO: Maybe implement this for launchers without pin shortcut support? // TODO: Should be the same with the fallback for Android < O - throw new RuntimeException("unimplemented"); + // for now just show unsupported + Toast.makeText(getContext(), getString(R.string.unsupported_launcher), Toast.LENGTH_LONG).show(); } } else { // TODO: Maybe backport for Android < O? diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index da90cdc..cf9dc4e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -29,5 +29,6 @@ Application "%s" unfrozen successfully Cannot clone system apps to a profile that Shelter has no control of. Cannot uninstall system apps in a profile that Shelter has no control of. + Cannot add shortcuts to your launcher. Please contact the developer for more information. Operations for %s