From 533e5bc14855bd736f06a14e3940ab7778932c1f Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Sat, 13 Mar 2021 16:35:27 +0800 Subject: [PATCH] MainActivity: cleanup unused device admin requests and text --- .../main/java/net/typeblog/shelter/ui/MainActivity.java | 9 --------- app/src/main/res/values/strings.xml | 1 - 2 files changed, 10 deletions(-) diff --git a/app/src/main/java/net/typeblog/shelter/ui/MainActivity.java b/app/src/main/java/net/typeblog/shelter/ui/MainActivity.java index fb3f8f9..266a2a7 100644 --- a/app/src/main/java/net/typeblog/shelter/ui/MainActivity.java +++ b/app/src/main/java/net/typeblog/shelter/ui/MainActivity.java @@ -47,7 +47,6 @@ public class MainActivity extends AppCompatActivity { private static final int REQUEST_PROVISION_PROFILE = 1; private static final int REQUEST_START_SERVICE_IN_WORK_PROFILE = 2; - private static final int REQUEST_SET_DEVICE_ADMIN = 3; private static final int REQUEST_TRY_START_SERVICE_IN_WORK_PROFILE = 4; private static final int REQUEST_DOCUMENTS_CHOOSE_APK = 5; @@ -497,14 +496,6 @@ public class MainActivity extends AppCompatActivity { registerStartActivityProxies(); startKiller(); buildView(); - } else if (requestCode == REQUEST_SET_DEVICE_ADMIN) { - if (resultCode == RESULT_OK) { - // Device Admin is now set, go ahead to provisioning (or initialization) - init(); - } else { - Toast.makeText(this, getString(R.string.device_admin_toast), Toast.LENGTH_LONG).show(); - finish(); - } } else if (requestCode == REQUEST_DOCUMENTS_CHOOSE_APK && resultCode == RESULT_OK && data != null) { Uri uri = data.getData(); UriForwardProxy proxy = new UriForwardProxy(getApplicationContext(), uri); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 86a97af..976a65d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -75,7 +75,6 @@ https://www.patreon.com/PeterCxy - You have to grant Device Admin permission for Shelter to work. Please try again. Shelter is still being set up. You should be seeing a notification soon from Shelter, which you must click on to finish the setup process. If you do not see the notification, please disable Do Not Disturb mode and try again. Shelter setup complete. Now restarting Shelter. If Shelter didn\'t start automatically, you may launch it again from your launcher. Permission is denied or Unsupported device