VancedManager/app/src/main/java/com/vanced/manager/utils/Extensions.kt

88 lines
3.1 KiB
Kotlin
Raw Normal View History

2020-10-31 19:45:39 +00:00
package com.vanced.manager.utils
import android.content.Context
2020-12-14 21:18:58 +00:00
import android.content.ContextWrapper
2020-12-18 12:12:52 +00:00
import android.content.DialogInterface
2020-10-31 19:45:39 +00:00
import android.widget.RadioGroup
2020-12-18 12:12:52 +00:00
import androidx.core.graphics.ColorUtils
2020-10-31 19:45:39 +00:00
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.FragmentActivity
2020-12-14 21:18:58 +00:00
import androidx.lifecycle.LifecycleOwner
2020-12-18 12:12:52 +00:00
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.progressindicator.LinearProgressIndicator
2020-10-31 19:45:39 +00:00
import com.google.android.material.radiobutton.MaterialRadioButton
import com.topjohnwu.superuser.io.SuFile
import com.topjohnwu.superuser.io.SuFileOutputStream
2020-11-02 14:41:39 +00:00
import com.vanced.manager.R
2021-02-03 18:24:28 +00:00
import com.vanced.manager.utils.AppUtils.log
import java.util.*
2020-10-31 19:45:39 +00:00
Vanced Manager 2.6.0 (#516) * updated app card UI * bug fixes * fixed grammar * removed unnoticable animation to improve performance * removed useless attribute * kotlin extensions are stonks * reference accent color variable instead of getting preference value every time * updated old stuff * removed useless check inside 'when' statement * optimised lifecycleOwner getter * property access syntax goes brrrrr * small accent update * added progress indicators to download dialogs * fixed changelog not appearing when pressing card in about menu * bumped up kotlin to 1.4.31 * fixed #437 * fixed #435 * fixed viewpager navigation on RTL layout * added a check for session id in root installer * updated strings * always notify about miui error * only run 1 animation at once * require external storage * sorted strings xml * improved layouts to look more close to each other * bumped up dependencies * updated version * fixed crash on manager update * New Crowdin updates (#489) * New translations strings.xml (Romanian) * New translations strings.xml (Bengali) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Marathi) * New translations strings.xml (Portuguese) * New translations strings.xml (Thai) * New translations strings.xml (Croatian) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Russian) * New translations strings.xml (Polish) * New translations strings.xml (Arabic) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Malayalam) * New translations strings.xml (Japanese) * New translations strings.xml (Estonian) * New translations strings.xml (French) * New translations strings.xml (Kurdish) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Hungarian) * New translations strings.xml (Finnish) * New translations strings.xml (Korean) * New translations strings.xml (Afrikaans) * New translations strings.xml (Punjabi) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Georgian) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi, Pakistan) * Added button info on long press * preview adjustments to navigation xml * moved splash screen activity to parent dir * fixed buttontag getter * updated readme * fixed readme * Added build section to readme * Updated build instructions * prevent stacktrace from obfuscating * Added an option to switch between internal and external storage * removed warning for music vanced * added back a fix for split installer * added -r option for root music installer * Revert "prevent stacktrace from obfuscating" This reverts commit 2d30eb60af11f2d854c826953c025702c2e161ce. * Revert "added back a fix for split installer" This reverts commit aeaa0d445ec7cd6d2c318bf3f3751f8759d89801. * Revert "Added an option to switch between internal and external storage" This reverts commit 98c4b88961d14f36acf908bcee2376c1f79af86e. * reverted all storage-related commits * prevent stacktrace ovfuscation * updated readme * updated base url * use storage perms only on android 5 * cleanup * removed unused event file * fixed dark overlay not disappearing after bottom dialog has been dismissed * removed unecessary path from file_provider * fixed lint for core-ui * improved layout flexibility * updated icons in expandable app item * removed path prefix for api urls * removed microg bug dialog * fixed version code comparison * New translations strings.xml (Romanian) * New translations strings.xml (Croatian) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Bengali) * New translations strings.xml (Marathi) * New translations strings.xml (Thai) * New translations strings.xml (Estonian) * New translations strings.xml (Swedish) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Malayalam) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Punjabi, Pakistan) * New translations strings.xml (Turkish) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (French) * New translations strings.xml (Hebrew) * New translations strings.xml (Spanish) * New translations strings.xml (Afrikaans) * New translations strings.xml (Arabic) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Finnish) * New translations strings.xml (Hungarian) * New translations strings.xml (Slovak) * New translations strings.xml (Italian) * New translations strings.xml (Japanese) * New translations strings.xml (Georgian) * New translations strings.xml (Korean) * New translations strings.xml (Kurdish) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Arabic) * New translations strings.xml (Slovak) * New translations strings.xml (Korean) * New translations strings.xml (Polish) * New Crowdin updates (#515) * New translations strings.xml (Arabic) * New translations strings.xml (Greek) * New translations strings.xml (Dutch) * New translations strings.xml (Turkish) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Indonesian) Co-authored-by: X1nto <burtkni@yandex.ru> Co-authored-by: Tornike Khintibidze <48173186+X1nto@users.noreply.github.com>
2021-04-27 12:16:14 +00:00
val RadioGroup.checkedButtonTag: String?
get() = findViewById<MaterialRadioButton>(
checkedRadioButtonId
)?.tag?.toString()
2020-10-31 19:45:39 +00:00
2021-01-16 17:00:38 +00:00
fun DialogFragment.show(activity: FragmentActivity) {
try {
show(activity.supportFragmentManager, "")
} catch (e: Exception) {
2021-02-03 18:24:28 +00:00
log("VMUI", e.stackTraceToString())
2020-10-31 19:45:39 +00:00
}
2021-01-16 17:00:38 +00:00
}
2020-10-31 19:45:39 +00:00
fun List<String>.convertToAppVersions(): List<String> = listOf("latest") + reversed()
Vanced Manager 2.6.0 (#516) * updated app card UI * bug fixes * fixed grammar * removed unnoticable animation to improve performance * removed useless attribute * kotlin extensions are stonks * reference accent color variable instead of getting preference value every time * updated old stuff * removed useless check inside 'when' statement * optimised lifecycleOwner getter * property access syntax goes brrrrr * small accent update * added progress indicators to download dialogs * fixed changelog not appearing when pressing card in about menu * bumped up kotlin to 1.4.31 * fixed #437 * fixed #435 * fixed viewpager navigation on RTL layout * added a check for session id in root installer * updated strings * always notify about miui error * only run 1 animation at once * require external storage * sorted strings xml * improved layouts to look more close to each other * bumped up dependencies * updated version * fixed crash on manager update * New Crowdin updates (#489) * New translations strings.xml (Romanian) * New translations strings.xml (Bengali) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Marathi) * New translations strings.xml (Portuguese) * New translations strings.xml (Thai) * New translations strings.xml (Croatian) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Russian) * New translations strings.xml (Polish) * New translations strings.xml (Arabic) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Malayalam) * New translations strings.xml (Japanese) * New translations strings.xml (Estonian) * New translations strings.xml (French) * New translations strings.xml (Kurdish) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Hungarian) * New translations strings.xml (Finnish) * New translations strings.xml (Korean) * New translations strings.xml (Afrikaans) * New translations strings.xml (Punjabi) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Georgian) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi, Pakistan) * Added button info on long press * preview adjustments to navigation xml * moved splash screen activity to parent dir * fixed buttontag getter * updated readme * fixed readme * Added build section to readme * Updated build instructions * prevent stacktrace from obfuscating * Added an option to switch between internal and external storage * removed warning for music vanced * added back a fix for split installer * added -r option for root music installer * Revert "prevent stacktrace from obfuscating" This reverts commit 2d30eb60af11f2d854c826953c025702c2e161ce. * Revert "added back a fix for split installer" This reverts commit aeaa0d445ec7cd6d2c318bf3f3751f8759d89801. * Revert "Added an option to switch between internal and external storage" This reverts commit 98c4b88961d14f36acf908bcee2376c1f79af86e. * reverted all storage-related commits * prevent stacktrace ovfuscation * updated readme * updated base url * use storage perms only on android 5 * cleanup * removed unused event file * fixed dark overlay not disappearing after bottom dialog has been dismissed * removed unecessary path from file_provider * fixed lint for core-ui * improved layout flexibility * updated icons in expandable app item * removed path prefix for api urls * removed microg bug dialog * fixed version code comparison * New translations strings.xml (Romanian) * New translations strings.xml (Croatian) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Bengali) * New translations strings.xml (Marathi) * New translations strings.xml (Thai) * New translations strings.xml (Estonian) * New translations strings.xml (Swedish) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Malayalam) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Punjabi, Pakistan) * New translations strings.xml (Turkish) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (French) * New translations strings.xml (Hebrew) * New translations strings.xml (Spanish) * New translations strings.xml (Afrikaans) * New translations strings.xml (Arabic) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Finnish) * New translations strings.xml (Hungarian) * New translations strings.xml (Slovak) * New translations strings.xml (Italian) * New translations strings.xml (Japanese) * New translations strings.xml (Georgian) * New translations strings.xml (Korean) * New translations strings.xml (Kurdish) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Arabic) * New translations strings.xml (Slovak) * New translations strings.xml (Korean) * New translations strings.xml (Polish) * New Crowdin updates (#515) * New translations strings.xml (Arabic) * New translations strings.xml (Greek) * New translations strings.xml (Dutch) * New translations strings.xml (Turkish) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Indonesian) Co-authored-by: X1nto <burtkni@yandex.ru> Co-authored-by: Tornike Khintibidze <48173186+X1nto@users.noreply.github.com>
2021-04-27 12:16:14 +00:00
fun String.formatVersion(context: Context): String =
if (this == "latest") context.getString(R.string.install_latest) else this
Vanced Manager 2.6.0 (#516) * updated app card UI * bug fixes * fixed grammar * removed unnoticable animation to improve performance * removed useless attribute * kotlin extensions are stonks * reference accent color variable instead of getting preference value every time * updated old stuff * removed useless check inside 'when' statement * optimised lifecycleOwner getter * property access syntax goes brrrrr * small accent update * added progress indicators to download dialogs * fixed changelog not appearing when pressing card in about menu * bumped up kotlin to 1.4.31 * fixed #437 * fixed #435 * fixed viewpager navigation on RTL layout * added a check for session id in root installer * updated strings * always notify about miui error * only run 1 animation at once * require external storage * sorted strings xml * improved layouts to look more close to each other * bumped up dependencies * updated version * fixed crash on manager update * New Crowdin updates (#489) * New translations strings.xml (Romanian) * New translations strings.xml (Bengali) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Marathi) * New translations strings.xml (Portuguese) * New translations strings.xml (Thai) * New translations strings.xml (Croatian) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Russian) * New translations strings.xml (Polish) * New translations strings.xml (Arabic) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Malayalam) * New translations strings.xml (Japanese) * New translations strings.xml (Estonian) * New translations strings.xml (French) * New translations strings.xml (Kurdish) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Hungarian) * New translations strings.xml (Finnish) * New translations strings.xml (Korean) * New translations strings.xml (Afrikaans) * New translations strings.xml (Punjabi) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Georgian) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi, Pakistan) * Added button info on long press * preview adjustments to navigation xml * moved splash screen activity to parent dir * fixed buttontag getter * updated readme * fixed readme * Added build section to readme * Updated build instructions * prevent stacktrace from obfuscating * Added an option to switch between internal and external storage * removed warning for music vanced * added back a fix for split installer * added -r option for root music installer * Revert "prevent stacktrace from obfuscating" This reverts commit 2d30eb60af11f2d854c826953c025702c2e161ce. * Revert "added back a fix for split installer" This reverts commit aeaa0d445ec7cd6d2c318bf3f3751f8759d89801. * Revert "Added an option to switch between internal and external storage" This reverts commit 98c4b88961d14f36acf908bcee2376c1f79af86e. * reverted all storage-related commits * prevent stacktrace ovfuscation * updated readme * updated base url * use storage perms only on android 5 * cleanup * removed unused event file * fixed dark overlay not disappearing after bottom dialog has been dismissed * removed unecessary path from file_provider * fixed lint for core-ui * improved layout flexibility * updated icons in expandable app item * removed path prefix for api urls * removed microg bug dialog * fixed version code comparison * New translations strings.xml (Romanian) * New translations strings.xml (Croatian) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Bengali) * New translations strings.xml (Marathi) * New translations strings.xml (Thai) * New translations strings.xml (Estonian) * New translations strings.xml (Swedish) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Malayalam) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Punjabi, Pakistan) * New translations strings.xml (Turkish) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (French) * New translations strings.xml (Hebrew) * New translations strings.xml (Spanish) * New translations strings.xml (Afrikaans) * New translations strings.xml (Arabic) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Finnish) * New translations strings.xml (Hungarian) * New translations strings.xml (Slovak) * New translations strings.xml (Italian) * New translations strings.xml (Japanese) * New translations strings.xml (Georgian) * New translations strings.xml (Korean) * New translations strings.xml (Kurdish) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Arabic) * New translations strings.xml (Slovak) * New translations strings.xml (Korean) * New translations strings.xml (Polish) * New Crowdin updates (#515) * New translations strings.xml (Arabic) * New translations strings.xml (Greek) * New translations strings.xml (Dutch) * New translations strings.xml (Turkish) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Indonesian) Co-authored-by: X1nto <burtkni@yandex.ru> Co-authored-by: Tornike Khintibidze <48173186+X1nto@users.noreply.github.com>
2021-04-27 12:16:14 +00:00
fun String.convertToAppTheme(context: Context): String = with(context) {
getString(
R.string.light_plus_other,
if (this@convertToAppTheme == "dark") getString(R.string.vanced_dark) else getString(R.string.vanced_black)
)
2021-01-16 17:00:38 +00:00
}
Vanced Manager 2.6.0 (#516) * updated app card UI * bug fixes * fixed grammar * removed unnoticable animation to improve performance * removed useless attribute * kotlin extensions are stonks * reference accent color variable instead of getting preference value every time * updated old stuff * removed useless check inside 'when' statement * optimised lifecycleOwner getter * property access syntax goes brrrrr * small accent update * added progress indicators to download dialogs * fixed changelog not appearing when pressing card in about menu * bumped up kotlin to 1.4.31 * fixed #437 * fixed #435 * fixed viewpager navigation on RTL layout * added a check for session id in root installer * updated strings * always notify about miui error * only run 1 animation at once * require external storage * sorted strings xml * improved layouts to look more close to each other * bumped up dependencies * updated version * fixed crash on manager update * New Crowdin updates (#489) * New translations strings.xml (Romanian) * New translations strings.xml (Bengali) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Marathi) * New translations strings.xml (Portuguese) * New translations strings.xml (Thai) * New translations strings.xml (Croatian) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Russian) * New translations strings.xml (Polish) * New translations strings.xml (Arabic) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Malayalam) * New translations strings.xml (Japanese) * New translations strings.xml (Estonian) * New translations strings.xml (French) * New translations strings.xml (Kurdish) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Hungarian) * New translations strings.xml (Finnish) * New translations strings.xml (Korean) * New translations strings.xml (Afrikaans) * New translations strings.xml (Punjabi) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Georgian) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi, Pakistan) * Added button info on long press * preview adjustments to navigation xml * moved splash screen activity to parent dir * fixed buttontag getter * updated readme * fixed readme * Added build section to readme * Updated build instructions * prevent stacktrace from obfuscating * Added an option to switch between internal and external storage * removed warning for music vanced * added back a fix for split installer * added -r option for root music installer * Revert "prevent stacktrace from obfuscating" This reverts commit 2d30eb60af11f2d854c826953c025702c2e161ce. * Revert "added back a fix for split installer" This reverts commit aeaa0d445ec7cd6d2c318bf3f3751f8759d89801. * Revert "Added an option to switch between internal and external storage" This reverts commit 98c4b88961d14f36acf908bcee2376c1f79af86e. * reverted all storage-related commits * prevent stacktrace ovfuscation * updated readme * updated base url * use storage perms only on android 5 * cleanup * removed unused event file * fixed dark overlay not disappearing after bottom dialog has been dismissed * removed unecessary path from file_provider * fixed lint for core-ui * improved layout flexibility * updated icons in expandable app item * removed path prefix for api urls * removed microg bug dialog * fixed version code comparison * New translations strings.xml (Romanian) * New translations strings.xml (Croatian) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Bengali) * New translations strings.xml (Marathi) * New translations strings.xml (Thai) * New translations strings.xml (Estonian) * New translations strings.xml (Swedish) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Malayalam) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Punjabi, Pakistan) * New translations strings.xml (Turkish) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (French) * New translations strings.xml (Hebrew) * New translations strings.xml (Spanish) * New translations strings.xml (Afrikaans) * New translations strings.xml (Arabic) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Finnish) * New translations strings.xml (Hungarian) * New translations strings.xml (Slovak) * New translations strings.xml (Italian) * New translations strings.xml (Japanese) * New translations strings.xml (Georgian) * New translations strings.xml (Korean) * New translations strings.xml (Kurdish) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Arabic) * New translations strings.xml (Slovak) * New translations strings.xml (Korean) * New translations strings.xml (Polish) * New Crowdin updates (#515) * New translations strings.xml (Arabic) * New translations strings.xml (Greek) * New translations strings.xml (Dutch) * New translations strings.xml (Turkish) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Indonesian) Co-authored-by: X1nto <burtkni@yandex.ru> Co-authored-by: Tornike Khintibidze <48173186+X1nto@users.noreply.github.com>
2021-04-27 12:16:14 +00:00
fun String.getLatestAppVersion(versions: List<String>): String =
if (this == "latest") versions.reversed()[0] else this
2020-11-10 12:49:27 +00:00
Vanced Manager 2.6.0 (#516) * updated app card UI * bug fixes * fixed grammar * removed unnoticable animation to improve performance * removed useless attribute * kotlin extensions are stonks * reference accent color variable instead of getting preference value every time * updated old stuff * removed useless check inside 'when' statement * optimised lifecycleOwner getter * property access syntax goes brrrrr * small accent update * added progress indicators to download dialogs * fixed changelog not appearing when pressing card in about menu * bumped up kotlin to 1.4.31 * fixed #437 * fixed #435 * fixed viewpager navigation on RTL layout * added a check for session id in root installer * updated strings * always notify about miui error * only run 1 animation at once * require external storage * sorted strings xml * improved layouts to look more close to each other * bumped up dependencies * updated version * fixed crash on manager update * New Crowdin updates (#489) * New translations strings.xml (Romanian) * New translations strings.xml (Bengali) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Marathi) * New translations strings.xml (Portuguese) * New translations strings.xml (Thai) * New translations strings.xml (Croatian) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Russian) * New translations strings.xml (Polish) * New translations strings.xml (Arabic) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Malayalam) * New translations strings.xml (Japanese) * New translations strings.xml (Estonian) * New translations strings.xml (French) * New translations strings.xml (Kurdish) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Hungarian) * New translations strings.xml (Finnish) * New translations strings.xml (Korean) * New translations strings.xml (Afrikaans) * New translations strings.xml (Punjabi) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Georgian) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi, Pakistan) * Added button info on long press * preview adjustments to navigation xml * moved splash screen activity to parent dir * fixed buttontag getter * updated readme * fixed readme * Added build section to readme * Updated build instructions * prevent stacktrace from obfuscating * Added an option to switch between internal and external storage * removed warning for music vanced * added back a fix for split installer * added -r option for root music installer * Revert "prevent stacktrace from obfuscating" This reverts commit 2d30eb60af11f2d854c826953c025702c2e161ce. * Revert "added back a fix for split installer" This reverts commit aeaa0d445ec7cd6d2c318bf3f3751f8759d89801. * Revert "Added an option to switch between internal and external storage" This reverts commit 98c4b88961d14f36acf908bcee2376c1f79af86e. * reverted all storage-related commits * prevent stacktrace ovfuscation * updated readme * updated base url * use storage perms only on android 5 * cleanup * removed unused event file * fixed dark overlay not disappearing after bottom dialog has been dismissed * removed unecessary path from file_provider * fixed lint for core-ui * improved layout flexibility * updated icons in expandable app item * removed path prefix for api urls * removed microg bug dialog * fixed version code comparison * New translations strings.xml (Romanian) * New translations strings.xml (Croatian) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Bengali) * New translations strings.xml (Marathi) * New translations strings.xml (Thai) * New translations strings.xml (Estonian) * New translations strings.xml (Swedish) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Malayalam) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Punjabi, Pakistan) * New translations strings.xml (Turkish) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (French) * New translations strings.xml (Hebrew) * New translations strings.xml (Spanish) * New translations strings.xml (Afrikaans) * New translations strings.xml (Arabic) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Finnish) * New translations strings.xml (Hungarian) * New translations strings.xml (Slovak) * New translations strings.xml (Italian) * New translations strings.xml (Japanese) * New translations strings.xml (Georgian) * New translations strings.xml (Korean) * New translations strings.xml (Kurdish) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Arabic) * New translations strings.xml (Slovak) * New translations strings.xml (Korean) * New translations strings.xml (Polish) * New Crowdin updates (#515) * New translations strings.xml (Arabic) * New translations strings.xml (Greek) * New translations strings.xml (Dutch) * New translations strings.xml (Turkish) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Indonesian) Co-authored-by: X1nto <burtkni@yandex.ru> Co-authored-by: Tornike Khintibidze <48173186+X1nto@users.noreply.github.com>
2021-04-27 12:16:14 +00:00
val Context.lifecycleOwner: LifecycleOwner?
get() = when (this) {
is LifecycleOwner -> this
!is LifecycleOwner -> (this as ContextWrapper).baseContext as LifecycleOwner
else -> null
2021-01-16 17:00:38 +00:00
}
2020-12-14 21:18:58 +00:00
2021-01-16 17:00:38 +00:00
fun Int.toHex(): String = java.lang.String.format("#%06X", 0xFFFFFF and this)
2020-12-14 21:18:58 +00:00
2021-01-16 17:00:38 +00:00
//Material team decided to keep their LinearProgressIndicator final
//At least extension methods exist
fun LinearProgressIndicator.applyAccent() {
Vanced Manager 2.6.0 (#516) * updated app card UI * bug fixes * fixed grammar * removed unnoticable animation to improve performance * removed useless attribute * kotlin extensions are stonks * reference accent color variable instead of getting preference value every time * updated old stuff * removed useless check inside 'when' statement * optimised lifecycleOwner getter * property access syntax goes brrrrr * small accent update * added progress indicators to download dialogs * fixed changelog not appearing when pressing card in about menu * bumped up kotlin to 1.4.31 * fixed #437 * fixed #435 * fixed viewpager navigation on RTL layout * added a check for session id in root installer * updated strings * always notify about miui error * only run 1 animation at once * require external storage * sorted strings xml * improved layouts to look more close to each other * bumped up dependencies * updated version * fixed crash on manager update * New Crowdin updates (#489) * New translations strings.xml (Romanian) * New translations strings.xml (Bengali) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Marathi) * New translations strings.xml (Portuguese) * New translations strings.xml (Thai) * New translations strings.xml (Croatian) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Russian) * New translations strings.xml (Polish) * New translations strings.xml (Arabic) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Malayalam) * New translations strings.xml (Japanese) * New translations strings.xml (Estonian) * New translations strings.xml (French) * New translations strings.xml (Kurdish) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Hungarian) * New translations strings.xml (Finnish) * New translations strings.xml (Korean) * New translations strings.xml (Afrikaans) * New translations strings.xml (Punjabi) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Georgian) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi, Pakistan) * Added button info on long press * preview adjustments to navigation xml * moved splash screen activity to parent dir * fixed buttontag getter * updated readme * fixed readme * Added build section to readme * Updated build instructions * prevent stacktrace from obfuscating * Added an option to switch between internal and external storage * removed warning for music vanced * added back a fix for split installer * added -r option for root music installer * Revert "prevent stacktrace from obfuscating" This reverts commit 2d30eb60af11f2d854c826953c025702c2e161ce. * Revert "added back a fix for split installer" This reverts commit aeaa0d445ec7cd6d2c318bf3f3751f8759d89801. * Revert "Added an option to switch between internal and external storage" This reverts commit 98c4b88961d14f36acf908bcee2376c1f79af86e. * reverted all storage-related commits * prevent stacktrace ovfuscation * updated readme * updated base url * use storage perms only on android 5 * cleanup * removed unused event file * fixed dark overlay not disappearing after bottom dialog has been dismissed * removed unecessary path from file_provider * fixed lint for core-ui * improved layout flexibility * updated icons in expandable app item * removed path prefix for api urls * removed microg bug dialog * fixed version code comparison * New translations strings.xml (Romanian) * New translations strings.xml (Croatian) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Bengali) * New translations strings.xml (Marathi) * New translations strings.xml (Thai) * New translations strings.xml (Estonian) * New translations strings.xml (Swedish) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Malayalam) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Punjabi, Pakistan) * New translations strings.xml (Turkish) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (French) * New translations strings.xml (Hebrew) * New translations strings.xml (Spanish) * New translations strings.xml (Afrikaans) * New translations strings.xml (Arabic) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Finnish) * New translations strings.xml (Hungarian) * New translations strings.xml (Slovak) * New translations strings.xml (Italian) * New translations strings.xml (Japanese) * New translations strings.xml (Georgian) * New translations strings.xml (Korean) * New translations strings.xml (Kurdish) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Arabic) * New translations strings.xml (Slovak) * New translations strings.xml (Korean) * New translations strings.xml (Polish) * New Crowdin updates (#515) * New translations strings.xml (Arabic) * New translations strings.xml (Greek) * New translations strings.xml (Dutch) * New translations strings.xml (Turkish) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Indonesian) Co-authored-by: X1nto <burtkni@yandex.ru> Co-authored-by: Tornike Khintibidze <48173186+X1nto@users.noreply.github.com>
2021-04-27 12:16:14 +00:00
with(accentColor.value!!) {
2021-01-16 17:00:38 +00:00
setIndicatorColor(this)
trackColor = ColorUtils.setAlphaComponent(this, 70)
2020-12-18 12:12:52 +00:00
}
2021-01-16 17:00:38 +00:00
}
Vanced Manager 2.6.0 (#516) * updated app card UI * bug fixes * fixed grammar * removed unnoticable animation to improve performance * removed useless attribute * kotlin extensions are stonks * reference accent color variable instead of getting preference value every time * updated old stuff * removed useless check inside 'when' statement * optimised lifecycleOwner getter * property access syntax goes brrrrr * small accent update * added progress indicators to download dialogs * fixed changelog not appearing when pressing card in about menu * bumped up kotlin to 1.4.31 * fixed #437 * fixed #435 * fixed viewpager navigation on RTL layout * added a check for session id in root installer * updated strings * always notify about miui error * only run 1 animation at once * require external storage * sorted strings xml * improved layouts to look more close to each other * bumped up dependencies * updated version * fixed crash on manager update * New Crowdin updates (#489) * New translations strings.xml (Romanian) * New translations strings.xml (Bengali) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Marathi) * New translations strings.xml (Portuguese) * New translations strings.xml (Thai) * New translations strings.xml (Croatian) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Russian) * New translations strings.xml (Polish) * New translations strings.xml (Arabic) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Malayalam) * New translations strings.xml (Japanese) * New translations strings.xml (Estonian) * New translations strings.xml (French) * New translations strings.xml (Kurdish) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Hungarian) * New translations strings.xml (Finnish) * New translations strings.xml (Korean) * New translations strings.xml (Afrikaans) * New translations strings.xml (Punjabi) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Georgian) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi, Pakistan) * Added button info on long press * preview adjustments to navigation xml * moved splash screen activity to parent dir * fixed buttontag getter * updated readme * fixed readme * Added build section to readme * Updated build instructions * prevent stacktrace from obfuscating * Added an option to switch between internal and external storage * removed warning for music vanced * added back a fix for split installer * added -r option for root music installer * Revert "prevent stacktrace from obfuscating" This reverts commit 2d30eb60af11f2d854c826953c025702c2e161ce. * Revert "added back a fix for split installer" This reverts commit aeaa0d445ec7cd6d2c318bf3f3751f8759d89801. * Revert "Added an option to switch between internal and external storage" This reverts commit 98c4b88961d14f36acf908bcee2376c1f79af86e. * reverted all storage-related commits * prevent stacktrace ovfuscation * updated readme * updated base url * use storage perms only on android 5 * cleanup * removed unused event file * fixed dark overlay not disappearing after bottom dialog has been dismissed * removed unecessary path from file_provider * fixed lint for core-ui * improved layout flexibility * updated icons in expandable app item * removed path prefix for api urls * removed microg bug dialog * fixed version code comparison * New translations strings.xml (Romanian) * New translations strings.xml (Croatian) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Bengali) * New translations strings.xml (Marathi) * New translations strings.xml (Thai) * New translations strings.xml (Estonian) * New translations strings.xml (Swedish) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Malayalam) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Punjabi, Pakistan) * New translations strings.xml (Turkish) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (French) * New translations strings.xml (Hebrew) * New translations strings.xml (Spanish) * New translations strings.xml (Afrikaans) * New translations strings.xml (Arabic) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Finnish) * New translations strings.xml (Hungarian) * New translations strings.xml (Slovak) * New translations strings.xml (Italian) * New translations strings.xml (Japanese) * New translations strings.xml (Georgian) * New translations strings.xml (Korean) * New translations strings.xml (Kurdish) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Arabic) * New translations strings.xml (Slovak) * New translations strings.xml (Korean) * New translations strings.xml (Polish) * New Crowdin updates (#515) * New translations strings.xml (Arabic) * New translations strings.xml (Greek) * New translations strings.xml (Dutch) * New translations strings.xml (Turkish) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Indonesian) Co-authored-by: X1nto <burtkni@yandex.ru> Co-authored-by: Tornike Khintibidze <48173186+X1nto@users.noreply.github.com>
2021-04-27 12:16:14 +00:00
fun MaterialAlertDialogBuilder.showWithAccent() {
with(accentColor.value!!) {
2021-01-16 17:00:38 +00:00
show().apply {
getButton(DialogInterface.BUTTON_POSITIVE).setTextColor(this@with)
getButton(DialogInterface.BUTTON_NEGATIVE).setTextColor(this@with)
getButton(DialogInterface.BUTTON_NEUTRAL).setTextColor(this@with)
2020-12-18 12:12:52 +00:00
}
}
2021-01-16 17:00:38 +00:00
}
fun Context.writeServiceDScript(apkFPath: String, path: String, app: String) {
val shellFileZ = SuFile.open("/data/adb/service.d/$app.sh")
shellFileZ.createNewFile()
2021-02-22 11:34:14 +00:00
val script = """
#!/system/bin/sh
while [ "$(getprop sys.boot_completed | tr -d '\r')" != "1" ]; do sleep 1; done
sleep ${defPrefs.serviceDSleepTimer}
chcon u:object_r:apk_data_file:s0 $apkFPath
mount -o bind $apkFPath $path
""".trimIndent()
Vanced Manager 2.6.0 (#516) * updated app card UI * bug fixes * fixed grammar * removed unnoticable animation to improve performance * removed useless attribute * kotlin extensions are stonks * reference accent color variable instead of getting preference value every time * updated old stuff * removed useless check inside 'when' statement * optimised lifecycleOwner getter * property access syntax goes brrrrr * small accent update * added progress indicators to download dialogs * fixed changelog not appearing when pressing card in about menu * bumped up kotlin to 1.4.31 * fixed #437 * fixed #435 * fixed viewpager navigation on RTL layout * added a check for session id in root installer * updated strings * always notify about miui error * only run 1 animation at once * require external storage * sorted strings xml * improved layouts to look more close to each other * bumped up dependencies * updated version * fixed crash on manager update * New Crowdin updates (#489) * New translations strings.xml (Romanian) * New translations strings.xml (Bengali) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Marathi) * New translations strings.xml (Portuguese) * New translations strings.xml (Thai) * New translations strings.xml (Croatian) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Russian) * New translations strings.xml (Polish) * New translations strings.xml (Arabic) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Malayalam) * New translations strings.xml (Japanese) * New translations strings.xml (Estonian) * New translations strings.xml (French) * New translations strings.xml (Kurdish) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Hungarian) * New translations strings.xml (Finnish) * New translations strings.xml (Korean) * New translations strings.xml (Afrikaans) * New translations strings.xml (Punjabi) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Georgian) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi, Pakistan) * Added button info on long press * preview adjustments to navigation xml * moved splash screen activity to parent dir * fixed buttontag getter * updated readme * fixed readme * Added build section to readme * Updated build instructions * prevent stacktrace from obfuscating * Added an option to switch between internal and external storage * removed warning for music vanced * added back a fix for split installer * added -r option for root music installer * Revert "prevent stacktrace from obfuscating" This reverts commit 2d30eb60af11f2d854c826953c025702c2e161ce. * Revert "added back a fix for split installer" This reverts commit aeaa0d445ec7cd6d2c318bf3f3751f8759d89801. * Revert "Added an option to switch between internal and external storage" This reverts commit 98c4b88961d14f36acf908bcee2376c1f79af86e. * reverted all storage-related commits * prevent stacktrace ovfuscation * updated readme * updated base url * use storage perms only on android 5 * cleanup * removed unused event file * fixed dark overlay not disappearing after bottom dialog has been dismissed * removed unecessary path from file_provider * fixed lint for core-ui * improved layout flexibility * updated icons in expandable app item * removed path prefix for api urls * removed microg bug dialog * fixed version code comparison * New translations strings.xml (Romanian) * New translations strings.xml (Croatian) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Bengali) * New translations strings.xml (Marathi) * New translations strings.xml (Thai) * New translations strings.xml (Estonian) * New translations strings.xml (Swedish) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Malayalam) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Punjabi, Pakistan) * New translations strings.xml (Turkish) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (French) * New translations strings.xml (Hebrew) * New translations strings.xml (Spanish) * New translations strings.xml (Afrikaans) * New translations strings.xml (Arabic) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Finnish) * New translations strings.xml (Hungarian) * New translations strings.xml (Slovak) * New translations strings.xml (Italian) * New translations strings.xml (Japanese) * New translations strings.xml (Georgian) * New translations strings.xml (Korean) * New translations strings.xml (Kurdish) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Arabic) * New translations strings.xml (Slovak) * New translations strings.xml (Korean) * New translations strings.xml (Polish) * New Crowdin updates (#515) * New translations strings.xml (Arabic) * New translations strings.xml (Greek) * New translations strings.xml (Dutch) * New translations strings.xml (Turkish) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Indonesian) Co-authored-by: X1nto <burtkni@yandex.ru> Co-authored-by: Tornike Khintibidze <48173186+X1nto@users.noreply.github.com>
2021-04-27 12:16:14 +00:00
SuFileOutputStream.open(shellFileZ).use { out -> out.write(script.toByteArray()) }
2021-01-16 17:00:38 +00:00
}