mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-05-25 11:02:13 +02:00
feat: improve patcher screen labels
This commit is contained in:
parent
5150adeaff
commit
e2f02ebf22
@ -47,7 +47,7 @@ class Session(
|
|||||||
var nextPatchIndex = 0
|
var nextPatchIndex = 0
|
||||||
|
|
||||||
updateProgress(
|
updateProgress(
|
||||||
name = androidContext.getString(R.string.applying_patch, selectedPatches[nextPatchIndex]),
|
name = androidContext.getString(R.string.executing_patch, selectedPatches[nextPatchIndex]),
|
||||||
state = State.RUNNING
|
state = State.RUNNING
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ class Session(
|
|||||||
|
|
||||||
if (exception != null) {
|
if (exception != null) {
|
||||||
updateProgress(
|
updateProgress(
|
||||||
name = androidContext.getString(R.string.failed_to_apply_patch, patch.name),
|
name = androidContext.getString(R.string.failed_to_execute_patch, patch.name),
|
||||||
state = State.FAILED,
|
state = State.FAILED,
|
||||||
message = exception.stackTraceToString()
|
message = exception.stackTraceToString()
|
||||||
)
|
)
|
||||||
@ -72,7 +72,7 @@ class Session(
|
|||||||
|
|
||||||
selectedPatches.getOrNull(nextPatchIndex)?.let { nextPatch ->
|
selectedPatches.getOrNull(nextPatchIndex)?.let { nextPatch ->
|
||||||
updateProgress(
|
updateProgress(
|
||||||
name = androidContext.getString(R.string.applying_patch, nextPatch.name)
|
name = androidContext.getString(R.string.executing_patch, nextPatch.name)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ class Session(
|
|||||||
updateProgress(
|
updateProgress(
|
||||||
state = State.COMPLETED,
|
state = State.COMPLETED,
|
||||||
name = androidContext.resources.getQuantityString(
|
name = androidContext.resources.getQuantityString(
|
||||||
R.plurals.patches_applied,
|
R.plurals.patches_executed,
|
||||||
selectedPatches.size,
|
selectedPatches.size,
|
||||||
selectedPatches.size
|
selectedPatches.size
|
||||||
)
|
)
|
||||||
@ -105,7 +105,6 @@ class Session(
|
|||||||
logger.info("Merging integrations")
|
logger.info("Merging integrations")
|
||||||
acceptIntegrations(integrations.toSet())
|
acceptIntegrations(integrations.toSet())
|
||||||
acceptPatches(selectedPatches.toSet())
|
acceptPatches(selectedPatches.toSet())
|
||||||
updateProgress(state = State.COMPLETED) // Merging
|
|
||||||
|
|
||||||
logger.info("Applying patches...")
|
logger.info("Applying patches...")
|
||||||
applyPatchesVerbose(selectedPatches.sortedBy { it.name })
|
applyPatchesVerbose(selectedPatches.sortedBy { it.name })
|
||||||
|
@ -184,11 +184,11 @@ class PatcherWorker(
|
|||||||
Log.i(tag, "Patching succeeded".logFmt())
|
Log.i(tag, "Patching succeeded".logFmt())
|
||||||
Result.success()
|
Result.success()
|
||||||
} catch (e: ProcessRuntime.RemoteFailureException) {
|
} catch (e: ProcessRuntime.RemoteFailureException) {
|
||||||
Log.e(tag, "An exception occured in the remote process while patching. ${e.originalStackTrace}".logFmt())
|
Log.e(tag, "An exception occurred in the remote process while patching. ${e.originalStackTrace}".logFmt())
|
||||||
updateProgress(state = State.FAILED, message = e.originalStackTrace)
|
updateProgress(state = State.FAILED, message = e.originalStackTrace)
|
||||||
Result.failure()
|
Result.failure()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e(tag, "An exception occured while patching".logFmt(), e)
|
Log.e(tag, "An exception occurred while patching".logFmt(), e)
|
||||||
updateProgress(state = State.FAILED, message = e.stackTraceToString())
|
updateProgress(state = State.FAILED, message = e.stackTraceToString())
|
||||||
Result.failure()
|
Result.failure()
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -316,13 +316,9 @@ class PatcherViewModel(
|
|||||||
context.getString(R.string.patcher_step_unpack),
|
context.getString(R.string.patcher_step_unpack),
|
||||||
StepCategory.PREPARING
|
StepCategory.PREPARING
|
||||||
),
|
),
|
||||||
Step(
|
|
||||||
context.getString(R.string.patcher_step_integrations),
|
|
||||||
StepCategory.PREPARING
|
|
||||||
),
|
|
||||||
|
|
||||||
Step(
|
Step(
|
||||||
context.getString(R.string.apply_patches),
|
context.getString(R.string.execute_patches),
|
||||||
StepCategory.PATCHING
|
StepCategory.PATCHING
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
<item quantity="one">%d patch</item>
|
<item quantity="one">%d patch</item>
|
||||||
<item quantity="other">%d patches</item>
|
<item quantity="other">%d patches</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<plurals name="patches_applied">
|
<plurals name="patches_executed">
|
||||||
<item quantity="one">Applied %d patch</item>
|
<item quantity="one">Executed %d patch</item>
|
||||||
<item quantity="other">Applied %d patches</item>
|
<item quantity="other">Executed %d patches</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
</resources>
|
</resources>
|
@ -162,7 +162,7 @@
|
|||||||
<string name="continue_anyways">Continue anyways</string>
|
<string name="continue_anyways">Continue anyways</string>
|
||||||
<string name="download_another_version">Download another version</string>
|
<string name="download_another_version">Download another version</string>
|
||||||
<string name="download_app">Download app</string>
|
<string name="download_app">Download app</string>
|
||||||
<string name="download_apk">Download APK</string>
|
<string name="download_apk">Download APK file</string>
|
||||||
<string name="source_download_fail">Failed to download patch bundle: %s</string>
|
<string name="source_download_fail">Failed to download patch bundle: %s</string>
|
||||||
<string name="source_replace_fail">Failed to load updated patch bundle: %s</string>
|
<string name="source_replace_fail">Failed to load updated patch bundle: %s</string>
|
||||||
<string name="source_replace_integrations_fail">Failed to update integrations: %s</string>
|
<string name="source_replace_integrations_fail">Failed to update integrations: %s</string>
|
||||||
@ -248,16 +248,15 @@
|
|||||||
|
|
||||||
<string name="patcher_step_group_preparing">Preparing</string>
|
<string name="patcher_step_group_preparing">Preparing</string>
|
||||||
<string name="patcher_step_load_patches">Load patches</string>
|
<string name="patcher_step_load_patches">Load patches</string>
|
||||||
<string name="patcher_step_unpack">Unpack APK</string>
|
<string name="patcher_step_unpack">Read APK file</string>
|
||||||
<string name="patcher_step_integrations">Merge Integrations</string>
|
|
||||||
<string name="patcher_step_group_patching">Patching</string>
|
<string name="patcher_step_group_patching">Patching</string>
|
||||||
<string name="patcher_step_group_saving">Saving</string>
|
<string name="patcher_step_group_saving">Saving</string>
|
||||||
<string name="patcher_step_write_patched">Write patched APK</string>
|
<string name="patcher_step_write_patched">Write patched APK file</string>
|
||||||
<string name="patcher_step_sign_apk">Sign APK</string>
|
<string name="patcher_step_sign_apk">Sign patched APK file</string>
|
||||||
<string name="patcher_notification_message">Patching in progress…</string>
|
<string name="patcher_notification_message">Patching in progress…</string>
|
||||||
<string name="apply_patches">Apply patches</string>
|
<string name="execute_patches">Execute patches</string>
|
||||||
<string name="applying_patch">Applying %s</string>
|
<string name="executing_patch">Execute %s</string>
|
||||||
<string name="failed_to_apply_patch">Failed to apply %s</string>
|
<string name="failed_to_execute_patch">Failed to execute %s</string>
|
||||||
|
|
||||||
<string name="step_completed">completed</string>
|
<string name="step_completed">completed</string>
|
||||||
<string name="step_failed">failed</string>
|
<string name="step_failed">failed</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user