diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 05eb896..e3bbd20 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -12,6 +12,14 @@
android:maxSdkVersion="29"
tools:ignore="ScopedStorage" />
+
+
+
+
+
+
+
+
checkPermission())
+ .setOnDismissListener(dialog -> finish())
+ .show();
+ return;
+ }
+ checkPermission();
+ }
+
+ private void checkPermission() {
if (Build.VERSION.SDK_INT >= 23 && (Build.VERSION.SDK_INT <= 28 || (Build.VERSION.SDK_INT == 29 && Build.VERSION.PREVIEW_SDK_INT == 0))) {
String[] permissions = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE};
if (checkSelfPermission(permissions[0]) != PackageManager.PERMISSION_GRANTED
@@ -35,10 +52,11 @@ protected void onCreate(Bundle savedInstanceState) {
return;
}
}
- handleIntent();
+
+ startSave();
}
- private void handleIntent() {
+ private void startSave() {
String callingPackage = null;
Uri referrer = getReferrer();
if (referrer != null) callingPackage = referrer.getAuthority();
@@ -62,7 +80,7 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
granted &= grantResult == PackageManager.PERMISSION_GRANTED;
}
if (granted) {
- handleIntent();
+ startSave();
} else {
boolean isNight = (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_YES) > 0;
int theme = isNight ? android.R.style.Theme_DeviceDefault_Dialog_Alert : android.R.style.Theme_DeviceDefault_Light_Dialog_Alert;
@@ -81,4 +99,15 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
}
}
}
+
+ private boolean shouldShowConfirmation() {
+ try {
+ Intent intentForTest = new Intent(getIntent());
+ intentForTest.setComponent(null);
+ intentForTest.setPackage(null);
+ return getPackageManager().queryIntentActivities(intentForTest, PackageManager.MATCH_DEFAULT_ONLY).size() <= 1;
+ } catch (Throwable e) {
+ return true;
+ }
+ }
}
diff --git a/app/src/main/java/app/rikka/savecopy/SaveService.java b/app/src/main/java/app/rikka/savecopy/SaveService.java
index f92d4d6..a1ce003 100644
--- a/app/src/main/java/app/rikka/savecopy/SaveService.java
+++ b/app/src/main/java/app/rikka/savecopy/SaveService.java
@@ -73,7 +73,6 @@ public void onCreate() {
});
mNotificationManager = getSystemService(NotificationManager.class);
- //noinspection ConstantConditions
onCreateNotificationChannel(mNotificationManager);
startForeground(NOTIFICATION_ID_PROGRESS, onStartForeground());
diff --git a/app/src/main/res/values-v30/theme.xml b/app/src/main/res/values-v30/theme.xml
deleted file mode 100644
index 055a45e..0000000
--- a/app/src/main/res/values-v30/theme.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 8c59a8b..14c5f28 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -17,4 +17,5 @@
偏好应用文件夹
将副本保存至 Download/<应用名称>。
此应用将“%1$s”加入至“打开方式”菜单。当您使用“%1$s”打开文件时,文件的副本将被保存至“Download”文件夹。\n\n删除原始文件要求原始应用允许写入,但几乎没有允许写入的。因此我们没有提供此功能。\n\n为了保持主屏幕整洁,此应用不会在主屏幕应用中显示(Android 10 除外)。要卸载,请进入系统设置。
-
\ No newline at end of file
+ 是否要保存此文件的副本?
+
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 44c0cc2..0716112 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -17,4 +17,5 @@
偏好應用程式資料夾
將副本儲存至 Download/<應用程式名稱>。
此程式將「%1$s」加入至「開啟方式」選單。當您使用「%1$s」開啟檔案時,檔案的副本將被儲存至「Download」資料夾。\n\n刪除原始檔案要求原始程式允許寫入,但幾乎沒有允許寫入的。因此我們沒有提供此功能。\n\n為了保持主螢幕整潔,此程式不會在主螢幕程式中顯示(Android 10 除外)。要解除安裝,請進入系統設定。
-
\ No newline at end of file
+ 是否要儲存此檔案的副本?
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 32a08db..cd2fdae 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -17,4 +17,5 @@
Prefer app folder
Save the copy to Download/<app name>.
This app adds the \"%1$s\" action to \"Open with\" menus. When you open a file with \"%1$s\", a copy of the file will be saved to the \"Download\" folder.\n\nDelete original file requires the original app to allow writing, but almost no one does. Therefore we did not provide this feature.\n\nIn order to keep your home clean, this app does not show in the home app (except Android 10). To uninstall, please go to system settings.
-
\ No newline at end of file
+ Save a copy for this file?
+
diff --git a/app/src/main/res/values/theme.xml b/app/src/main/res/values/theme.xml
index 5838e33..a09afe1 100644
--- a/app/src/main/res/values/theme.xml
+++ b/app/src/main/res/values/theme.xml
@@ -5,6 +5,8 @@
- true
- @android:color/transparent
- @android:color/transparent
+ - false
+ - false
@@ -19,4 +21,4 @@
- false
-
\ No newline at end of file
+