From 3a49cbc17f57098c8d713b3a493122a39d8a3d7e Mon Sep 17 00:00:00 2001 From: X1nto Date: Thu, 2 Jul 2020 15:33:53 +0400 Subject: [PATCH 1/2] changed manager changelog url address to my github --- .../com/vanced/manager/ui/fragments/ManagerChangelogFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/vanced/manager/ui/fragments/ManagerChangelogFragment.kt b/app/src/main/java/com/vanced/manager/ui/fragments/ManagerChangelogFragment.kt index b6e3db01ff..9f3fe2f31e 100644 --- a/app/src/main/java/com/vanced/manager/ui/fragments/ManagerChangelogFragment.kt +++ b/app/src/main/java/com/vanced/manager/ui/fragments/ManagerChangelogFragment.kt @@ -24,7 +24,7 @@ class ManagerChangelogFragment : Fragment() { val changelogTxt = view.findViewById(R.id.manager_changelog) if (GetJson().isConnected(activity)) { - val checkUrl = GetJson().AsJSONObject("https://vanced.app/api/v1/manager.json") + val checkUrl = GetJson().AsJSONObject("https://x1nto.github.io/VancedFiles/manager.json") val changelog = checkUrl.get("changelog").asString changelogTxt.text = changelog } From a5730a994701164afcbf4af6bf48c8c9aa052a1c Mon Sep 17 00:00:00 2001 From: X1nto Date: Thu, 2 Jul 2020 16:41:30 +0400 Subject: [PATCH 2/2] updated things --- .../main/java/com/vanced/manager/core/Main.kt | 7 +++-- .../manager/ui/dialogs/DialogContainer.kt | 30 ++++++++----------- .../com/vanced/manager/utils/MiuiHelper.kt | 7 ----- app/src/main/res/values-de/strings.xml | 3 -- app/src/main/res/values-es/strings.xml | 3 -- app/src/main/res/values-hi-rIN/strings.xml | 3 -- app/src/main/res/values-id/strings.xml | 3 -- app/src/main/res/values-in/strings.xml | 3 -- app/src/main/res/values-it/strings.xml | 3 -- app/src/main/res/values-ja/strings.xml | 3 -- app/src/main/res/values-ka/strings.xml | 3 -- app/src/main/res/values-ru/strings.xml | 3 -- app/src/main/res/values-vi/strings.xml | 3 -- app/src/main/res/values-zh-rCN/strings.xml | 3 -- app/src/main/res/values-zh-rTW/strings.xml | 3 -- app/src/main/res/values/strings.xml | 3 -- 16 files changed, 16 insertions(+), 67 deletions(-) diff --git a/app/src/main/java/com/vanced/manager/core/Main.kt b/app/src/main/java/com/vanced/manager/core/Main.kt index 0890aa2066..dd25b47e44 100644 --- a/app/src/main/java/com/vanced/manager/core/Main.kt +++ b/app/src/main/java/com/vanced/manager/core/Main.kt @@ -5,10 +5,9 @@ import android.content.Context import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import androidx.preference.PreferenceManager -import com.vanced.manager.ui.dialogs.DialogContainer.secondMiuiDialog +import com.vanced.manager.ui.dialogs.DialogContainer.showRootDialog import com.vanced.manager.ui.dialogs.DialogContainer.showSecurityDialog import com.vanced.manager.ui.dialogs.DialogContainer.statementFalse -import com.vanced.manager.utils.MiuiHelper.isMiuiOptimisationsDisabled // This activity will NOT be used in manifest // since MainActivity will extend it @@ -21,11 +20,13 @@ open class Main: AppCompatActivity() { val prefs = PreferenceManager.getDefaultSharedPreferences(this) val firstStart = prefs.getBoolean("firstStart", true) val falseStatement = prefs.getBoolean("statement", true) + val variant = prefs.getString("vanced_variant", "nonroot") + val showRootDialog = prefs.getBoolean("show_root_dialog", true) when { firstStart -> showSecurityDialog(this) !falseStatement -> statementFalse(this) - !firstStart && !isMiuiOptimisationsDisabled() -> secondMiuiDialog(this) + variant == "root" && showRootDialog -> showRootDialog(this) } } diff --git a/app/src/main/java/com/vanced/manager/ui/dialogs/DialogContainer.kt b/app/src/main/java/com/vanced/manager/ui/dialogs/DialogContainer.kt index 3c3138683a..89dcad4480 100644 --- a/app/src/main/java/com/vanced/manager/ui/dialogs/DialogContainer.kt +++ b/app/src/main/java/com/vanced/manager/ui/dialogs/DialogContainer.kt @@ -52,25 +52,11 @@ object DialogContainer { .setMessage(activity.getString(R.string.disable_signature)) .setPositiveButton(activity.getString(R.string.button_dismiss)) { dialog, _ -> dialog.dismiss() - PreferenceManager.getDefaultSharedPreferences(activity).edit().putBoolean("show_root_dialog", false).apply() } .setNeutralButton(activity.getString(R.string.guide)) { _, _ -> openUrl("https://lmgtfy.com/?q=andnixsh+apk+verification+disable", R.color.Twitter, activity) } - .create() - .show() - } - - fun secondMiuiDialog(context: Context) { - AlertDialog.Builder(context) - .setTitle(context.getString(R.string.miui_two_title)) - .setMessage(context.getString(R.string.miui_two)) - .setPositiveButton(context.getString(R.string.button_fine)) { dialog, _ -> - dialog.dismiss() - } - .setNeutralButton(context.getString(R.string.guide)) { _, _ -> - openUrl("https://telegra.ph/How-to-install-v15-on-MIUI-02-11", R.color.Telegram, context) - } + .setOnDismissListener { PreferenceManager.getDefaultSharedPreferences(activity).edit().putBoolean("show_root_dialog", false).apply() } .create() .show() } @@ -93,10 +79,18 @@ object DialogContainer { setTitle(context.getString(R.string.error)) setMessage(msg) setPositiveButton(context.getString(R.string.close)) { dialog, _ -> dialog.dismiss() } - if (msg == context.getString(R.string.installation_signature)) - setNeutralButton(context.getString(R.string.guide)) { _, _ -> - openUrl("https://lmgtfy.com/?q=andnixsh+apk+verification+disable", R.color.Twitter, context) + when (msg) { + context.getString(R.string.installation_signature) -> { + setNeutralButton(context.getString(R.string.guide)) { _, _ -> + openUrl("https://lmgtfy.com/?q=andnixsh+apk+verification+disable", R.color.Twitter, context) + } } + context.getString(R.string.installation_miui) -> { + setNeutralButton(context.getString(R.string.guide)) { _, _ -> + openUrl("https://telegra.ph/How-to-install-v15-on-MIUI-02-11", R.color.Telegram, context) + } + } + } create() show() } diff --git a/app/src/main/java/com/vanced/manager/utils/MiuiHelper.kt b/app/src/main/java/com/vanced/manager/utils/MiuiHelper.kt index 475d83331a..57a07a76ff 100644 --- a/app/src/main/java/com/vanced/manager/utils/MiuiHelper.kt +++ b/app/src/main/java/com/vanced/manager/utils/MiuiHelper.kt @@ -9,13 +9,6 @@ object MiuiHelper { fun isMiui(): Boolean = !TextUtils.isEmpty(getSystemProps("ro.miui.ui.version.name")) - fun isMiuiOptimisationsDisabled(): Boolean { - return if (isMiui()) - getSystemProps("persist.sys.miui_optimization").equals("0") - else - true - } - private fun getSystemProps(propname: String): String? { val line: String var input: BufferedReader? = null diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index ea5d546816..ec3acd61fe 100755 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -10,7 +10,6 @@ Installieren Einstellungen Schließen - Okay Changelogs %1$s wird heruntergeladen @@ -70,8 +69,6 @@ Warte! MIUI-Nutzer erkannt! Hey! Du scheinst ein MIUI-Nutzer zu sein. Damit Vanced Manager richtig funktioniert musst du diese in den Entwicklereinstellungen deines Gerätes deaktivieren.\nSolltest du jedoch auf einem 20.2.20 Betriebssystem sein, das auf xiaomi.eu basiert ist, kannst du diese Warnung ignorieren. - Halt! - Es scheint so, als hättest du die MIUI-Optimisierung nicht deaktiviert. Bitte deaktiviere sie. (Solltest du jedoch ein 20.2.20 Betriebssystem haben, das auf xiaomi.eu basiert, kannst du diese Warnung ignorieren) Fehler Bitte stelle sicher, dass du die App von vanced.app, dem Vanced Discord Server oder GitHub heruntergeldaden hast. Erfolg! diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 08408797be..5013d72203 100755 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -10,7 +10,6 @@ Instalar Ajustes Descartar - Bien Actualizaciones Descargando %1$s @@ -70,8 +69,6 @@ Un momento! Usuario MiUI detectado! "Hey! Parece que eres un usuario MiUI. Pará poder usar Vanced Manager apropiadamente necesitarás deshabilitar las Optimizaciones MiUI en configuraciónes de desarrollador.\nSin embargo, si estas en el ROM 20.2.20 que esta basado en xiaomi.eu, entonces puedes ignorar esta advertencia de forma segura. " - "Te voy a detener allí! " - Parece que tu NO has deshabilitado las optimizaciones MiUI. Por favor deshabilitalo. Sin embargo, si estas en el ROM 20.2.20 que esta basado en xiaomi.eu, puedes ignorar esta advertencia de forma segura. Error Porfavor asegurate de haver descargado la aplicacion mediante vanced.app, el server de Vanced en Discord, o Github "Éxito! " diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index 41c97c85f1..61f7db1472 100755 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -11,7 +11,6 @@ इंस्टॉल सेट्इन्ग डिस्मिस - ठीक चेंजलॉग डाउनलोड कर रहा है %1$s @@ -73,8 +72,6 @@ रुको! पता लगाया MiUI उपयोगकर्ता! अरे! लगता है कि आप MiUI उपयोगकर्ता हैं। Vanced Manager को ठीक से उपयोग करने के लिए, आपको डेवलपर सेटिंग में MiUI ऑप्टिमाइज़ेशन को अक्षम करना होगा\nहालाँकि, यदि आप 20.2.20 ROM पर हैं जो xiaomi.eu पर आधारित है, तो आप इस चेतावनी को सुरक्षित रूप से अनदेखा कर सकते हैं। - मैं तुम्हें वहीं रोक रहा हूँ! - ऐसा लगता है कि आपने MiUI ऑप्टिमाइज़ेशन को अक्षम नहीं किया है। कृपया इसे निष्क्रिय कर दें। हालाँकि, यदि आप 20.2.20 ROM पर हैं जो xiaomi.eu पर आधारित है, तो आप इस चेतावनी को सुरक्षित रूप से अनदेखा कर सकते हैं। इरर कृपया सुनिश्चित करें कि आपने vanced.app, Vanced Discord सर्वर या GitHub से ऐप डाउनलोड किया है सफलता! diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 58ddff126d..9bdcee8804 100755 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -10,7 +10,6 @@ Instal Pengaturan Hilangkan - Ok Catatan perubahan Mengunduh %1$s @@ -71,8 +70,6 @@ Tahan! Pengguna MiUI terdeteksi! Hai! Sepertinya kamu pengguna MiUI. Untuk dapat menggunakan Vanced Manager dengan benar, anda harus menonaktifkan optimisasi MiUI di pengaturan developer. Walaupun demikian, jika anda berada di ROM versi 20.2.20 berdasarkan xiaomi.eu, anda dapat mengabaikan peringatan ini. - Aku akan memberhentikanmu disitu! - Sepertinya kamu TIDAK menonaktifkan optimisasi MiUI. Tolong nonaktifkan itu. Walaupun demikian, jika anda mempunyai ROM versi 20.2.20 berdasarkan xiaomi.eu, anda dapat mengabaikan peringatan ini. Terjadi kesalahan Pastikan anda mengunduh aplikasi hanya dari vanced.app, Vanced Discord server atau GitHub Berhasil! diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 58ddff126d..9bdcee8804 100755 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -10,7 +10,6 @@ Instal Pengaturan Hilangkan - Ok Catatan perubahan Mengunduh %1$s @@ -71,8 +70,6 @@ Tahan! Pengguna MiUI terdeteksi! Hai! Sepertinya kamu pengguna MiUI. Untuk dapat menggunakan Vanced Manager dengan benar, anda harus menonaktifkan optimisasi MiUI di pengaturan developer. Walaupun demikian, jika anda berada di ROM versi 20.2.20 berdasarkan xiaomi.eu, anda dapat mengabaikan peringatan ini. - Aku akan memberhentikanmu disitu! - Sepertinya kamu TIDAK menonaktifkan optimisasi MiUI. Tolong nonaktifkan itu. Walaupun demikian, jika anda mempunyai ROM versi 20.2.20 berdasarkan xiaomi.eu, anda dapat mengabaikan peringatan ini. Terjadi kesalahan Pastikan anda mengunduh aplikasi hanya dari vanced.app, Vanced Discord server atau GitHub Berhasil! diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 1a99b9b96a..49fafecb3d 100755 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -10,7 +10,6 @@ Installa Impostazioni Scarta - OK Note di rilascio Download in corso di %1$s @@ -70,8 +69,6 @@ Aspetta! Rilevata l\'interfaccia MiUI! Ehi! Sembra che tu sia un utente MiUI. Per poter utilizzare correttamente Vanced Manager, devi disattivare le ottimizzazioni di MiUI nelle impostazioni per sviluppatore.\nSe stai utilizzando la ROM 20.2.20 basata su xiaomi.eu, puoi ignorare questo avviso. - Devo fermarti per un momento di riflessione! - Sembra che tu NON abbia disattivato le ottimizzazioni di MiUI. Per favore, disattivale. Se stai utilizzando la ROM 20.2.20 basata su xiaomi.eu, puoi ignorare questo avviso. Errore Assicurati di aver scaricato l\'app da vanced.app, dal server di Discord di Vanced o da GitHub Fatto! diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index ca0294f7c2..150bcf9ed2 100755 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -10,7 +10,6 @@ インストール 設定 閉じる - 良好 更新履歴 %1$s をダウンロードしています @@ -70,8 +69,6 @@ ちょっと待った! MIUI ユーザーを検知しました! あなたは MIUI ユーザーのようです。Vanced Manager を適切に利用するには、開発者向けオプションから MIUI の最適化を無効にする必要があります。\nただし、xiaomi.eu ベースの 20.2.20 ROM をお使いの場合は、この警告を無視しても問題ありません。 - I\'m gonna stop you right there! - MIUI の最適化を無効にしていないようです。無効化してください。ただし、xiaomi.eu ベースの 20.2.20 ROM を使用している場合、この警告を無視しても問題ありません。 エラー vanced.app、Vanced の Discord サーバーまたは GitHub からアプリをダウンロードしたことを確認してください 成功! diff --git a/app/src/main/res/values-ka/strings.xml b/app/src/main/res/values-ka/strings.xml index 5a1b9ad3cc..eab7ba9e21 100644 --- a/app/src/main/res/values-ka/strings.xml +++ b/app/src/main/res/values-ka/strings.xml @@ -70,13 +70,10 @@ დახურვა - კარგი ინსტრუქცია დაიცა! აღმოჩენილია MIUI-ის მომხმარებელი! როგორც ჩანს ტქვენ MIUI-ის მომხმარებელი ხართ. იმისთვის რომ მენეჯერმა სწორედ იმუშავოს, თქვენ უნდა გამორთოთ MIUI-ის ოპტიმიზაციები დეველოპერის პარამეტრებიდან.\n მაგრამ, თუ თქვენ ხართ სისტემის 20.2.20 (ან უფრო მაღალ) ვერსიაზე რომელიც დაფუძნებულია xiaomi.eu-ზე, შეგიძლიათ დააიგნოროთ ეს გაფრთხილება. - I\'m gonna stop you right there! - როგორც ჩანს თქვენ არ გამორთეთ MIUI-ის ოპტიმიზაციები. გთოხოვთ გამორთოთ იგი. მაგრამ, თუ თქვენ ხართ სისტემის 20.2.20 (ან უფრო მაღალ) ვერსიაზე რომელიც დაფუძნებულია xiaomi.eu-ზე, შეგიძლიათ დააიგნოროთ ეს გაფრთხილება. შეცდომა გთხოვთ დარწმუნდით რომ აპი გადმოწერეთ vanced.app-იდან, Vanced Discord სერვერიდან ან GitHub-იდან წარმატება! diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index e4343bdd69..6d5372a2d7 100755 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -10,7 +10,6 @@ Установить Настройки Отклонить - Хорошо Список изменений Загрузка %1$s @@ -70,8 +69,6 @@ Внимание! Обнаружен пользователь MIUI! Привет! Похоже, вы пользователь MIUI. для правильного использования Vanced Manager вам придется отключить оптимизацию MIUI в настройках разработчика\nЕсли вы используете прошивку версии 20.2.20, основанную на xiaomi.eu, вы можете спокойно проигнорировать это предупреждение. - Я остановлю тебя! - Похоже, вы НЕ отключили оптимизацию MIUI. Пожалуйста, отключите её. Однако, если вы используете прошивку версии 20.2.20, основанную на xiaomi.eu, вы можете спокойно проигнорировать это предупреждение. Ошибка Пожалуйста, убедитесь, что вы скачали это приложение с vanced.app, сервера Discord Vanced или GitHub Успешно! diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index c0039a2161..bdc1ed05ba 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -10,7 +10,6 @@ Cài đặt Tùy chỉnh Bỏ qua - Được Lịch sử thay đổi Đang tải %1$s @@ -70,8 +69,6 @@ Khoan đã! Phát hiện người dùng MiUI Hình như bạn là 1 người dùng MiUI. Để dùng Vanced hiệu quả, bạn sẽ phải vô hiệu hóa MiUI optimisations trong cài đặt lập trình viên\nTuy nhiên, nếu bạn đang dùng ROM 20.2.20 từ xiaomi.eu, bạn có thể bỏ qua cảnh báo này. - Tôi sẽ dừng bạn tại đây! - Hình như bạn KHÔNG vô hiệu hóa MiUI optimisations. Hãy vô hiệu hóa nó. Tuy nhiên, nếu bạn đang dùng ROM 20.2.20 từ xiaomi.eu, bạn có thể bỏ qua cảnh báo này. Lỗi Hãy đảm bảo bạn tải về app từ vanced.app, Vanced Discord server hoặc GitHub Thành công! diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 58bd5505af..0b4945d923 100755 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -10,7 +10,6 @@ 安装 设置 关闭 - 变更日志 %1$s 下载中 @@ -70,8 +69,6 @@ 等一下! 检测到 MiUI 用户! 嘿! 您似乎是 MiUI 用户。为了能够正确地使用 Vanced Manager ,您将需要在开发人员设定中禁用 MiUI 优化\n但是,如果您使用的是基于 xiaomi.eu 的20.2.20 ROM ,则可以放心地忽略此警告。 - 我要在这里阻止你! - 看来您没有禁​​用 MiUI 优化。请把它禁用。但是,如果您使用的是基于 xiaomi.eu 的20.2.20 ROM ,则可以放心地忽略此警告。 错误 请确保您的软件下载来自于vanced.app,Vanced Discord服务器或Github 成功! diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 92cec451f9..c760a8724c 100755 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -10,7 +10,6 @@ 安裝 設定 關閉 - 更新日誌 %1$s 下載中 @@ -70,8 +69,6 @@ 等一下! 檢測到 MiUI 用戶! 嘿! 您似乎是 MiUI 用戶。 為了能夠正確地使用 Vanced Manager ,您將需要在開發人員設定中禁用 MiUI 優化\n但是,如果您使用的是基於 xiaomi.eu 的20.2.20 ROM ,則可以放心地忽略此警告。 - 我要在這裡阻止你! - 看來您沒有禁用 MiUI 優化。 請把它禁用。 但是,如果您使用的是基於 xiaomi.eu 的20.2.20 ROM ,則可以放心地忽略此警告。 錯誤 請確保您於vanced.app、 Vanced的Discord伺服器或GitHub下載應用程式 成功! diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6a596faf13..f5fafb97d5 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -70,13 +70,10 @@ Dismiss - Fine Guide Hold on! Detected MIUI user! Hey! Looks like you\'re an MIUI user. in order to properly use Vanced Manager, you will have to disable MiUI optimisations in developer settings. However, if you are on 20.2.20 ROM (Or later) that\'s based on xiaomi.eu, you can safely ignore this warning. - I\'m gonna stop you right there! - Looks like you did NOT disable MIUI optimisations. Please disable it. However, if you are on 20.2.20 ROM (Or later) that\'s based on xiaomi.eu, you can safely ignore this warning. Error Please make sure you downloaded app from vanced.app, Vanced Discord server or GitHub Success!