AppListFragment: inform the user on unsupported launchers

This commit is contained in:
Peter Cai 2018-08-22 21:08:37 +08:00
parent 97a46d3dab
commit ada6cbc6a7
No known key found for this signature in database
GPG key ID: 71F5FB4E4F3FD54F
2 changed files with 3 additions and 1 deletions

View file

@ -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?

View file

@ -29,5 +29,6 @@
<string name="unfreeze_success">Application "%s" unfrozen successfully</string>
<string name="clone_fail_system_app">Cannot clone system apps to a profile that Shelter has no control of.</string>
<string name="uninstall_fail_system_app">Cannot uninstall system apps in a profile that Shelter has no control of.</string>
<string name="unsupported_launcher">Cannot add shortcuts to your launcher. Please contact the developer for more information.</string>
<string name="app_context_menu_title">Operations for %s</string>
</resources>