Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #237 from YTVanced/dev
Browse files Browse the repository at this point in the history
2.0 hotfix
  • Loading branch information
KevinX8 committed Nov 13, 2020
2 parents 01f3808 + ff14e65 commit 1fffa48
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ object MusicDownloader {
if (variant == "root")
installMusicRoot(context)
else
install("${context.getExternalFilesDir("music/$variant")}/music.apk", context)
install("${context.getExternalFilesDir("music/nonroot")}/nonroot.apk", context)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,18 @@ import com.vanced.manager.utils.DeviceUtils.getArch
import com.vanced.manager.utils.DownloadHelper.downloadProgress
import com.vanced.manager.utils.Extensions.getInstallUrl
import com.vanced.manager.utils.Extensions.getLatestAppVersion
import com.vanced.manager.utils.InternetTools
import com.vanced.manager.utils.InternetTools.backupUrl
import com.vanced.manager.utils.InternetTools.baseUrl
import com.vanced.manager.utils.InternetTools.checkSHA256
import com.vanced.manager.utils.InternetTools.getFileNameFromUrl
import com.vanced.manager.utils.InternetTools.getSha256
import com.vanced.manager.utils.InternetTools.vanced
import com.vanced.manager.utils.InternetTools.vancedVersions
import com.vanced.manager.utils.LanguageHelper.getDefaultVancedLanguages
import com.vanced.manager.utils.PackageHelper.downloadStockCheck
import com.vanced.manager.utils.PackageHelper.getPkgVerCode
import com.vanced.manager.utils.PackageHelper.installVanced
import com.vanced.manager.utils.PackageHelper.installVancedRoot
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import java.io.File
import java.io.IOException
import java.security.MessageDigest
import java.util.*

object VancedDownloader {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import com.vanced.manager.utils.DownloadHelper.downloadProgress
import com.vanced.manager.utils.InternetTools.isUpdateAvailable

class ManagerUpdateDialog(
private val forceUpdate: Boolean
private val forceUpdate: Boolean
) : DialogFragment() {

private lateinit var binding: DialogManagerUpdateBinding
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/java/com/vanced/manager/utils/AppUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import android.content.pm.PackageInstaller
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import com.vanced.manager.BuildConfig.APPLICATION_ID
import com.vanced.manager.R
import com.vanced.manager.core.downloader.VancedDownloader
import com.vanced.manager.ui.dialogs.AppDownloadDialog
import com.vanced.manager.ui.fragments.HomeFragment
import com.vanced.manager.utils.DownloadHelper.downloadProgress
Expand Down
7 changes: 5 additions & 2 deletions app/src/main/java/com/vanced/manager/utils/DownloadHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,19 @@ object DownloadHelper {
fun downloadManager(context: Context) {
CoroutineScope(Dispatchers.IO).launch {
val url = "https://github.com/YTVanced/VancedManager/releases/latest/download/manager.apk"
downloadProgress.get()?.currentDownload = PRDownloader.download(url, context.getExternalFilesDir("apk")?.path, "manager.apk")
downloadProgress.get()?.currentDownload = PRDownloader.download(url, context.getExternalFilesDir("manager")?.path, "manager.apk")
.build()
.setOnProgressListener { progress ->
val mProgress = progress.currentBytes * 100 / progress.totalBytes
downloadProgress.get()?.downloadProgress?.set(mProgress.toInt())
}
.setOnCancelListener {
downloadProgress.get()?.downloadProgress?.set(0)
}
.start(object : OnDownloadListener {
override fun onDownloadComplete() {
val apk =
File("${context.getExternalFilesDir("apk")?.path}/manager.apk")
File("${context.getExternalFilesDir("manager")?.path}/manager.apk")
val uri =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
FileProvider.getUriForFile(
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/vanced/manager/utils/Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.preference.PreferenceManager.getDefaultSharedPreferences
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.google.android.material.radiobutton.MaterialRadioButton
import com.vanced.manager.R
import com.vanced.manager.model.AppVersionsModel
import com.vanced.manager.utils.InternetTools.baseUrl
import com.vanced.manager.utils.InternetTools.loadJson
import java.util.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import com.beust.klaxon.JsonArray
import com.beust.klaxon.JsonObject
import com.vanced.manager.BuildConfig
import com.vanced.manager.R
import com.vanced.manager.core.downloader.VancedDownloader
import com.vanced.manager.utils.AppUtils.generateChecksum
import com.vanced.manager.utils.Extensions.getDefaultPrefs
import kotlinx.coroutines.CoroutineScope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ object PackageHelper {
}

fun musicApkExists(context: Context): Boolean {
val apkPath = File(context.getExternalFilesDir("music/nonroot")?.path, "music.apk")
val apkPath = File(context.getExternalFilesDir("music/nonroot")?.path, "nonroot.apk")
if (apkPath.exists()) {
return true
}
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/res/layout/view_preference_switch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@
app:layout_constraintTop_toBottomOf="@id/preference_switch_title"
tools:text="Receive push notifications when an update for vanced is released" />

<com.google.android.material.switchmaterial.SwitchMaterial
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/preference_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:theme="@style/PreferenceSwitch"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:checked="true" />
app:layout_constraintTop_toTopOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>
8 changes: 4 additions & 4 deletions app/src/main/res/values-da-rDK/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<string name="are_you_rooted">Er Din Enhed Rooted?</string>
<string name="grant_root">Tildel Root Tilladelse</string>
<string name="select_at_least_one_app">Vælg mindst én app!</string>
<string name="select_apps_music">Vanced, but for YouTube Music!\nrelatively less feature rich but fulfils your needs.</string>
<string name="select_apps_vanced">YouTube Vanced is the stock Android YouTube App, but better!</string>
<string name="lets_get_started">Let\'s get started</string>
<string name="select_apps_music">Vanced, men for YouTube Music!\nrelativt mindre funktionsrig men opfylder dine behov.</string>
<string name="select_apps_vanced">YouTube Vanced er standard YouTube App, men bedre!</string>
<string name="lets_get_started">Lad os komme igang</string>
<string name="willing_to_use_root">Vil du bruge root version? Tryk blot på knappen nedenfor, ellers tryk fotsæt</string>
<!-- Home Page -->
<string name="about_app">Om %1$s</string>
Expand Down Expand Up @@ -61,7 +61,7 @@
<string name="update_not_found">Ingen nye opdateringer</string>
<string name="variant">Variant</string>
<!-- Dialogs -->
<string name="advanced">Advanced</string>
<string name="advanced">Avanceret</string>
<string name="app_install_files_detected">%1$s installationsfiler fundet!</string>
<string name="app_install_files_detected_summary">Manageren opdagede, at alle nødvendige filer til %1$s installationen blev fundet. Vil du installere?</string>
<string name="checking_updates">Søger efter opdateringer…</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-es-rES/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<string name="title_about">Información</string>
<string name="title_home">Manager</string>
<string name="title_settings">Ajustes</string>
<string name="update_manager">Actualizar Manager</string>
<string name="update_manager">Gestor de actualizaciones</string>
<!-- Welcome Page -->
<string name="are_you_rooted">¿Su dispositivo está rooteado?</string>
<string name="grant_root">Conceder permiso root</string>
Expand Down
68 changes: 34 additions & 34 deletions app/src/main/res/values-it-rIT/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,35 @@
<string name="save">Salva</string>
<string name="select_apps">Seleziona le Tue App</string>
<!-- Main Activity -->
<string name="title_about">Autori</string>
<string name="title_about">Informazioni</string>
<string name="title_home">Manager</string>
<string name="title_settings">Impostazioni</string>
<string name="update_manager">Aggiorna Manager</string>
<!-- Welcome Page -->
<string name="are_you_rooted">Il tuo dispositivo ha i permessi di root?</string>
<string name="grant_root">Concedi Permessi Root</string>
<string name="grant_root">Concedi i Permessi di Root</string>
<string name="select_at_least_one_app">Seleziona almeno un\'app!</string>
<string name="select_apps_music">Vanced, ma per YouTube Music!\nrelativamente meno ricco di caratteristiche ma ugualmente adattabile alle tue esigenze.</string>
<string name="select_apps_vanced">YouTube Vanced è l\'App di YouTube preinstallata di Android, ma migliore!</string>
<string name="select_apps_vanced">YouTube Vanced è l\'App di YouTube preinstallata di Android, ma migliorata!</string>
<string name="lets_get_started">Iniziamo</string>
<string name="willing_to_use_root">Vorresti usare la versione di root? Basta premere il pulsante sotto, altrimenti tocca per continuare</string>
<string name="willing_to_use_root">Sei disposto ad utilizzare la versione root? È sufficiente premere il pulsante in basso, altrimenti tocca per continuare</string>
<!-- Home Page -->
<string name="about_app">A proposito di %1$s</string>
<string name="app_changelog_tooltip">Tocca sulla scheda per vedere il changelog.</string>
<string name="changelog">Changelog</string>
<string name="about_app">Informazioni su %1$s</string>
<string name="app_changelog_tooltip">Tocca la scheda per vedere le novità.</string>
<string name="changelog">Novità</string>
<string name="downloading_file">Download in corso di %1$s</string>
<string name="install">Installa</string>
<string name="button_reinstall">Reinstalla</string>
<string name="version_installed">Versione installata:</string>
<string name="latest">Ultima versione:</string>
<string name="version_installed">Installata:</string>
<string name="latest">Disponibile:</string>
<string name="no_microg">microG non è installato</string>
<string name="root_not_granted">Non è stato fornito l\'accesso di root</string>
<string name="root_not_granted">Accesso root non consentito</string>
<string name="unavailable">Non disponibile</string>
<string name="update">Aggiorna</string>
<string name="useful_links">Link utili</string>
<string name="useful_links">Link Utili</string>
<string name="support_us">Sostienici!</string>
<!-- Settings -->
<string name="accent_color">Colore evidenziatore</string>
<string name="accent_color">Colore in Evidenza</string>
<string name="accent_blue">Blu</string>
<string name="accent_green">Verde</string>
<string name="accent_purple">Viola</string>
Expand All @@ -45,26 +45,26 @@
<string name="category_behaviour">Comportamento</string>
<string name="clear_files">Cancella i file scaricati</string>
<string name="cleared_files">File cancellati con successo</string>
<string name="firebase_title">Analitica Firebase</string>
<string name="firebase_summary">Questo ci consente di raccogliere informazioni sulle prestazioni dell\'app ed i registri dei crash</string>
<string name="firebase_title">Analisi Firebase</string>
<string name="firebase_summary">Questo ci consente di raccogliere informazioni sulle prestazioni dell\'app ed i registri sui crash</string>
<string name="language_title">Lingua</string>
<string name="link_title">Utilizza le schede personalizzate di Chrome</string>
<string name="link_custom_tabs">I link verranno aperti nelle schede personalizzate di Chrome</string>
<string name="link_title">Utilizza le Schede Personalizzate di Chrome</string>
<string name="link_custom_tabs">I link verranno aperti nelle Schede Personalizzate di Chrome</string>
<string name="system_default">Predefinito di Sistema</string>
<string name="theme">Tema</string>
<string name="theme_dark">Tema scuro</string>
<string name="theme_light">Tema chiaro</string>
<string name="theme_dark">Tema Scuro</string>
<string name="theme_light">Tema Chiaro</string>
<string name="update_url">Aggiorna l\'URL del canale</string>
<string name="push_notifications">Notifiche push di %1$s</string>
<string name="push_notifications">Notifiche Push di %1$s</string>
<string name="push_notifications_summary">Ricevi notifiche push quando un aggiornamento per %1$s è disponibile</string>
<string name="update_center">Centro aggiornamenti</string>
<string name="update_center">Centro Aggiornamenti</string>
<string name="update_not_found">Nessun nuovo aggiornamento</string>
<string name="variant">Variante</string>
<!-- Dialogs -->
<string name="advanced">Avanzate</string>
<string name="app_install_files_detected">%1$s file d\'installazione rilevati!</string>
<string name="app_install_files_detected_summary">Il manager ha rilevato che tutti i file necessari per l\'installazione di %1$s sono stati trovati. Vuoi installarli?</string>
<string name="checking_updates">Verificando gli aggiornamenti…</string>
<string name="app_install_files_detected_summary">Manager ha rilevato tutti i file necessari per l\'installazione di %1$s. Vuoi installarli?</string>
<string name="checking_updates">Verifica aggiornamenti…</string>
<string name="chosen_lang">Lingue: %1$s</string>
<string name="chosen_theme">Tema: %1$s</string>
<string name="chosen_version">Versione: %1$s</string>
Expand All @@ -75,30 +75,30 @@
<string name="miui_one_title">Rilevata l\'interfaccia MIUI!</string>
<string name="miui_one">Per poter installare Vanced, DEVI PER FORZA disattivare le ottimizzazioni di MIUI nelle impostazioni da sviluppatore (puoi ignorare questo avviso se stai utilizzando la versione 20.2.20 o successive di una ROM basata su xiaomi.eu).</string>
<string name="error">Errore</string>
<string name="redownload">Scarica di nuovo</string>
<string name="security_context">Assicurati di aver scaricato l\'app da vancedapp.com, dal server Discord di Vanced o dalla pagina GitHub di Vanced</string>
<string name="success">Fatto!</string>
<string name="redownload">Scarica nuovamente</string>
<string name="security_context">Assicurati di aver scaricato l\'app da vancedapp.com, dal server di Discord di Vanced o dalla pagina GitHub di Vanced</string>
<string name="success">Riuscito!</string>
<string name="app_installation_preferences">Preferenze di installazione %1$s</string>
<string name="vanced_installed">Vanced è stato installato con successo. Vuoi avviarlo ora?</string>
<string name="version">Versione</string>
<string name="music_installed">Vanced Music è stato installato con successo! Vuoi eseguirlo ora?</string>
<string name="please_be_patient">Sei pregato di essere paziente…</string>
<string name="please_be_patient">Si prega di attendere…</string>
<string name="launch">Avvia</string>
<string name="welcome">Benvenuto</string>
<!-- Install Page -->
<string name="choose_preferred_language">Scegli le tue lingue preferite per Vanced</string>
<string name="light_plus_other">Luce + %1$s</string>
<string name="light_plus_other">Chiaro + %1$s</string>
<string name="select_at_least_one_lang">Seleziona almeno una lingua!</string>
<!-- About Page -->
<string name="manager_dev">Sviluppatori di Manager</string>
<string name="sources">Codice sorgente</string>
<string name="vanced_team">Il team di Vanced</string>
<string name="vanced_team">Il Team di Vanced</string>
<!-- Error messages -->
<string name="chown_fail">Impossibile cambiare il proprietario dell\'apk in proprietario del sistema, sei pregato di riprovare.</string>
<string name="error_downloading">Errore nel download di %1$s</string>
<string name="chown_fail">Impossibile modificare il proprietario dell\'apk nel proprietario di sistema, per favore riprova.</string>
<string name="error_downloading">Errore nel Download di %1$s</string>
<string name="failed_uninstall">Impossibile disinstallare il pacchetto %1$s</string>
<string name="files_missing_va">Impossibile trovare i file richiesti per l\'installazione. Scarica di nuovo i file di installazione, poi riprova.</string>
<string name="ifile_missing">Impossibile trovare il file apk per il tema nero/scuro dall\'archiviazione, sei pregato di riprovare.</string>
<string name="files_missing_va">Impossibile individuare i file richiesti per l\'installazione. Scaricali nuovamente e riprova.</string>
<string name="ifile_missing">Impossibile individuare il file apk per il tema nero/scuro dalla memoria, per favore riprova.</string>
<string name="installation_aborted">Installazione non riuscita, l\'utente ha annullato l\'installazione.</string>
<string name="installation_blocked">Installazione non riuscita, l\'utente ha bloccato l\'installazione.</string>
<string name="installation_downgrade">Installazione non riuscita, l\'utente ha provato a eseguire il downgrade del pacchetto. Disinstalla gli aggiornamenti dell\'app predefinita di YouTube, poi riprova.</string>
Expand All @@ -109,6 +109,6 @@
<string name="installation_signature">Installazione non riuscita, la verifica della firma apk è attivata. Disattiva la verifica della firma apk, poi riprova.</string>
<string name="installation_miui">Installazione non riuscita, le ottimizzazioni di MIUI sono attivate. Disattiva le ottimizzazioni di MIUI, poi riprova.</string>
<string name="installation_storage">Installazione non riuscita, errore dello spazio di archiviazione.</string>
<string name="modapk_missing">Impossibile trovare il file apk per il tema nero/scuro dall\'installer. Cancella i dati dell\'app del Manager, poi riprova.</string>
<string name="path_missing">Impossibile trovare il percorso di installazione di stock di YouTube dopo l\'installazione divisa.</string>
<string name="modapk_missing">Impossibile trovare il file apk per il tema nero/scuro dall\'installer. Cancella i dati dell\'app Manager, quindi riprova.</string>
<string name="path_missing">Impossibile individuare il percorso di installazione di YouTube stock dopo l\'installazione divisa.</string>
</resources>
Loading

0 comments on commit 1fffa48

Please sign in to comment.