Skip to content

Language refresh on A13+ - #24

Merged
VisionR1 merged 4 commits into
VisionR1:masterfrom
Android-Artisan:a13-menu-refresh
Sep 15, 2026
Merged

VisionR1 merged 4 commits into
VisionR1:masterfrom
Android-Artisan:a13-menu-refresh

Conversation

@Android-Artisan

Copy link
Copy Markdown

fixes issue #18

Copilot AI lite review requested due to automatic review settings September 10, 2026 16:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new relaunch logic can crash when the launch intent is null and the current implementation uses abrupt process exit / synchronous disk I/O on the UI thread.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR addresses Issue #18 (“Visual glitch for language on A13+”) by changing how the app applies and refreshes the selected locale, aiming to ensure the language change takes effect reliably on Android 13+.

Changes:

  • Persist locale changes synchronously and trigger an app relaunch flow after selecting a language.
  • Apply the chosen locale earlier in the activity lifecycle via attachBaseContext.
  • Add an additional supported locale entry (iw).
File summaries
File Description
app/src/main/java/io/github/vvb2060/keyattestation/util/LocaleManager.kt Adjusts locale persistence and changes the post-selection behavior to relaunch the app.
app/src/main/java/io/github/vvb2060/keyattestation/app/AppActivity.kt Applies the selected locale in attachBaseContext to ensure correct resources/config on startup.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +19 to +21
val config = Configuration(newBase.resources.configuration)
config.setLocale(locale)
super.attachBaseContext(newBase.createConfigurationContext(config))
Comment on lines 39 to +40
context.getSharedPreferences("locale_prefs", Context.MODE_PRIVATE)
.edit().putString("app_locale", code).apply()
.edit().putString("app_locale", code).commit()
Comment on lines +65 to +69
val pm = context.packageManager
val intent = pm.getLaunchIntentForPackage(context.packageName)
intent?.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
context.startActivity(intent)
Runtime.getRuntime().exit(0)
Comment thread app/src/main/java/io/github/vvb2060/keyattestation/app/AppActivity.kt Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Android-Artisan

Copy link
Copy Markdown
Author

all the rest copilot reccomended just does no major difference, so ignore, id say safe to merge

@VisionR1

Copy link
Copy Markdown
Owner

@Android-Artisan

At first i see have this changes trigger when detected Android 13+ but after change, what happens?

@Android-Artisan

Copy link
Copy Markdown
Author

@Android-Artisan

At first i see have this changes trigger when detected Android 13+ but after change, what happens?

So what it does is it closes the app and reopens it for you

@Android-Artisan

Copy link
Copy Markdown
Author

I had made my own apk, let me send it or if you want you can build and ill screen record it working

@VisionR1

Copy link
Copy Markdown
Owner

@Android-Artisan
At first i see have this changes trigger when detected Android 13+ but after change, what happens?

So what it does is it closes the app and reopens it for you

Screenrecorder-2026-09-11-12-58-08-483_0_COMPRESSED.mp4

@Android-Artisan

Copy link
Copy Markdown
Author

@Android-Artisan
At first i see have this changes trigger when detected Android 13+ but after change, what happens?

So what it does is it closes the app and reopens it for you

Screenrecorder-2026-09-11-12-58-08-483_0_COMPRESSED.mp4

So it works?

I didnt get the video sorry

@VisionR1

Copy link
Copy Markdown
Owner

@Android-Artisan
At first i see have this changes trigger when detected Android 13+ but after change, what happens?

So what it does is it closes the app and reopens it for you

Screenrecorder-2026-09-11-12-58-08-483_0_COMPRESSED.mp4

So it works?

I didnt get the video sorry

Yeah as i see.

Change language, blind/black screen for 1 second and is done.

That's I'm asking is can this change trigger when detected Android 13+

Or must be generally?

@Android-Artisan

Copy link
Copy Markdown
Author

@Android-Artisan
At first i see have this changes trigger when detected Android 13+ but after change, what happens?

So what it does is it closes the app and reopens it for you

Screenrecorder-2026-09-11-12-58-08-483_0_COMPRESSED.mp4

So it works?
I didnt get the video sorry

Yeah as i see.

Change language, blind/black screen for 1 second and is done.

That's I'm asking is can this change trigger when detected Android 13+

Or must be generally?

I had tried in the first commit to make it api related but that didnt work, hence why i made it general, for now, ill make another pr in the future once my brain is back to earth

@VisionR1

Copy link
Copy Markdown
Owner

@Android-Artisan
At first i see have this changes trigger when detected Android 13+ but after change, what happens?

So what it does is it closes the app and reopens it for you

Screenrecorder-2026-09-11-12-58-08-483_0_COMPRESSED.mp4

So it works?
I didnt get the video sorry

Yeah as i see.
Change language, blind/black screen for 1 second and is done.
That's I'm asking is can this change trigger when detected Android 13+
Or must be generally?

I had tried in the first commit to make it api related but that didnt work, hence why i made it general, for now, ill make another pr in the future once my brain is back to earth

Understand.

Take your time!

I can take a look, but you know better than me.

@VisionR1
VisionR1 force-pushed the master branch 2 times, most recently from 2342fb4 to 8e2050d Compare September 14, 2026 19:49
Co-authored-by: VisionR1 <25982450+VisionR1@users.noreply.github.com>
@Android-Artisan

Copy link
Copy Markdown
Author

Ready to be merged

@VisionR1 VisionR1 changed the title A13 menu refresh Language refresh on A13+ Sep 15, 2026
@VisionR1
VisionR1 merged commit 96c6964 into VisionR1:master Sep 15, 2026
0 of 3 checks passed
@VisionR1 VisionR1 added the enhancement New feature or request label Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants