From f71d2d5e4c8129e31888f72eddbc0abd189238a3 Mon Sep 17 00:00:00 2001 From: X1nto Date: Thu, 25 Jun 2020 13:45:39 +0400 Subject: [PATCH] huge changes --- .../core/downloader/MicrogDownloadService.kt | 3 +- .../core/downloader/VancedDownloadService.kt | 3 +- app/src/main/res/drawable/ic_brave_logo.xml | 9 ++ .../main/res/drawable/ic_shortcut_info.xml | 15 ++- .../res/drawable/ic_shortcut_settings.xml | 15 ++- app/src/main/res/drawable/ic_vanced_nobg.xml | 6 + .../main/res/layout/include_changelogs.xml | 2 +- .../main/res/layout/include_vanced_medias.xml | 122 ++++++++++-------- app/src/main/res/values/strings.xml | 4 +- 9 files changed, 114 insertions(+), 65 deletions(-) create mode 100644 app/src/main/res/drawable/ic_brave_logo.xml create mode 100644 app/src/main/res/drawable/ic_vanced_nobg.xml diff --git a/app/src/main/java/com/vanced/manager/core/downloader/MicrogDownloadService.kt b/app/src/main/java/com/vanced/manager/core/downloader/MicrogDownloadService.kt index d5553de5..b16fc717 100644 --- a/app/src/main/java/com/vanced/manager/core/downloader/MicrogDownloadService.kt +++ b/app/src/main/java/com/vanced/manager/core/downloader/MicrogDownloadService.kt @@ -13,13 +13,14 @@ import com.downloader.OnStartOrResumeListener import com.downloader.PRDownloader import com.vanced.manager.ui.fragments.HomeFragment import com.vanced.manager.utils.InternetTools.getFileNameFromUrl +import java.lang.IllegalStateException class MicrogDownloadService: Service() { override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { try { downloadMicrog() - } catch (e: Exception) { + } catch (e: IllegalStateException) { Toast.makeText(this, "Unable to download Vanced", Toast.LENGTH_SHORT).show() } stopSelf() diff --git a/app/src/main/java/com/vanced/manager/core/downloader/VancedDownloadService.kt b/app/src/main/java/com/vanced/manager/core/downloader/VancedDownloadService.kt index 4020236a..57eea150 100644 --- a/app/src/main/java/com/vanced/manager/core/downloader/VancedDownloadService.kt +++ b/app/src/main/java/com/vanced/manager/core/downloader/VancedDownloadService.kt @@ -15,13 +15,14 @@ import com.vanced.manager.core.installer.RootSplitInstallerService import com.vanced.manager.core.installer.SplitInstaller import com.vanced.manager.ui.fragments.HomeFragment import com.vanced.manager.utils.InternetTools.getFileNameFromUrl +import java.lang.IllegalStateException class VancedDownloadService: Service() { override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { try { downloadSplits() - } catch (e: Exception) { + } catch (e: IllegalStateException) { Toast.makeText(this, "Unable to download Vanced", Toast.LENGTH_SHORT).show() } stopSelf() diff --git a/app/src/main/res/drawable/ic_brave_logo.xml b/app/src/main/res/drawable/ic_brave_logo.xml new file mode 100644 index 00000000..7cc645f8 --- /dev/null +++ b/app/src/main/res/drawable/ic_brave_logo.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_shortcut_info.xml b/app/src/main/res/drawable/ic_shortcut_info.xml index 1b4680fe..4194d487 100644 --- a/app/src/main/res/drawable/ic_shortcut_info.xml +++ b/app/src/main/res/drawable/ic_shortcut_info.xml @@ -1,5 +1,12 @@ - - - + + + diff --git a/app/src/main/res/drawable/ic_shortcut_settings.xml b/app/src/main/res/drawable/ic_shortcut_settings.xml index f35ff1a0..7a88ef89 100644 --- a/app/src/main/res/drawable/ic_shortcut_settings.xml +++ b/app/src/main/res/drawable/ic_shortcut_settings.xml @@ -1,5 +1,12 @@ - - - + + + diff --git a/app/src/main/res/drawable/ic_vanced_nobg.xml b/app/src/main/res/drawable/ic_vanced_nobg.xml new file mode 100644 index 00000000..3c22913a --- /dev/null +++ b/app/src/main/res/drawable/ic_vanced_nobg.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/app/src/main/res/layout/include_changelogs.xml b/app/src/main/res/layout/include_changelogs.xml index ee6c7a9f..13a14041 100644 --- a/app/src/main/res/layout/include_changelogs.xml +++ b/app/src/main/res/layout/include_changelogs.xml @@ -8,5 +8,5 @@ app:contentPaddingTop="2dp" app:expandOnClick="true" app:inner_view="@layout/include_changelog_pages" - android:background="?colorSurface"/> + android:background="?colorSurfaceVariant"/> diff --git a/app/src/main/res/layout/include_vanced_medias.xml b/app/src/main/res/layout/include_vanced_medias.xml index 1eafeddc..9e1fcf89 100644 --- a/app/src/main/res/layout/include_vanced_medias.xml +++ b/app/src/main/res/layout/include_vanced_medias.xml @@ -1,8 +1,7 @@ + xmlns:app="http://schemas.android.com/apk/res-auto"> @@ -14,71 +13,90 @@ + app:cardBackgroundColor="?colorAccent"> - - - - + - + - + - + - + - + - + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 947f21cd..10eb299e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -33,14 +33,14 @@ Update Useful Links Vanced on Social Media - The official website of Vanced + Vanced Website Disable Sig. Disabled Enabled status: Sig. Verification Check signature - Support us by downloading Brave + Support us! Accent Color