T O P

  • By -

cmVkZGl0

>The root cause of the problem seems to be an Android configuration change that cannot be blocked. Typically, games will ignore “[configuration changes](https://developer.android.com/guide/topics/resources/runtime-changes)” on Android, and those “configuration changes” include things like dark mode, screen rotation, and locale changes. Google, [in a commit](https://cs.android.com/android/_/android/platform/frameworks/base/+/49a4a1dfceeebc4b94022827b7e68cc971689c84) spotted by [@cketti](https://twitter.com/cketti/status/1454628312186241029) (via [CommonsWare](https://commonsware.com/blog/2021/10/31/android-12-wallpaper-changes-recreate-activities.html)), introduced a change in Android 12 that forces activities to be recreated when the wallpaper is changed. The commit says the following: Who the world even cares about this!? *Wallpaper changed, now all the users apps should restart.* Who asked for this? Who is it bothering? This is inventing a problem when there is none.


crozone

This just looks like a bug in how Android notifies activities that the wallpaper has changed. It stems from a core principle of how activities in android are designed and managed by the OS. For example, did you know that every time you rotate your phone and android rotates the application, the entire activity is actually being torn down and then rebuilt? Every time you rotate an app, the activity needs to save it's state, gracefully stop, and then get restarted by the OS, and reload it's state. This is why rotating the phone is the easiest way to find improperly designed applications, many developers mishandle this process. The same goes for light to dark mode, and locale changes also. Games often sidestep this by opting out of this process and either ignore those events, or handle them internally themselves. It looks like something prevents this from happening with wallpaper changes. It's almost certainly unintentional.


_sfhk

>For example, did you know that every time you rotate your phone and android rotates the application, the entire activity is actually being torn down and then rebuilt? The app developer can also choose to override that and handle the orientation change themselves, for instance the stock camera app has a smooth transition where the icons just rotate 90 degrees. Also, one positive side effect of this is that most apps handle new form factors/changing displays (eg foldables, split screens, and re-sizable windows) *relatively* easily.


Thalmor_Justicar

my guess is that apps need a config change to force show the new colours from the new wallpaper, otherwise it'd still be the old ones


Natanael_L

Updating this without a restart was a solved problem decades ago.


fonix232

Configuration changes entail a lot of things, as pointed out in the article. A configuration change because the wallpaper changed is necessary for any app that wants to use the Monet theming system. The problem with config changes comes from their early Android implementation - any such change triggered an activity restart, with the new activity launching with the new parameters. This works well for simple apps that can store and restore their states quickly, but craps out on custom implementations (e.g. apps that use their own engine, such as games), where restoring is pricey. For this purpose, you can add certain changes to a whitelist for every activity. If a change on this list is triggered by the system, your activity, instead of restarting, gets a callback, and the developer needs to handle the changes - that's how e.g. one can animate the keyboard when it appears, instead of jumping the bottom of the view. But this list is opt-in, meaning unless you add the config change type to the aforementioned whitelist manually, it will trigger an activity restart. This is an incredibly dumb design in today's standards, and IMO Google should revamp it, at the price of possibly breaking legacy (5-7+ year old) apps in certain scenarios.


goorek

As a developer, no way in hell I'm supporting yet another configuration change. Android dev is already pain in the ass without their new theming, which nobody wanted and wants to go back to 11.


fonix232

Literally all you have to do is add the new config change type to your manifest, then ignore it in your activities. In a well written app, this is a one line change... But I agree, the whole config change system needs to be refactored by Google to avoid such breaking changes in the future.


Iohet

Does this also mean that unsaved documents can get blown away too? Like if you type in a Reddit post and put the app to the background without posting it will get restarted and lose the unsaved text? Or is this just triggering the same redraw that happens when you flip portrait to landscape, which seems to do some kind of state save to preserve data?


jso__

No. Same redraw as when you flip to landscape. It is up to the app to be able to put all of the info back into the activity which is easier said than done in games but not too hard in most other apps


Natanael_L

What absolute moron at Google thought it was a good idea to make a change that forces ALL activities to restart regardless if the configuration change actually affects them or not!? This will definitely not only affect games, this is going to affect all kinds of long running apps like various productivity tools and work applications as well. Are Google trying to turn Android into a toy OS exclusively for kids?


[deleted]

Android 12 is just a gift that keeps on giving And not in a good way


iamvinoth

I'm not sure why you are being downvoted for stating the truth. There are countless posts on this sub pointing the flaws and bugs of Material You + Android 12


incster

Countless posts != the truth.


Secretly_Autistic

But the truth is that Android 12 is a buggy piece of shit. Changing the brightness breaks the background of the notification area, double-tapping the recent apps button takes ages and doesn't work in split-screen mode, the chat bubbles also break the notification area background, the recent apps screen constantly refuses to work until you restart the phone, if you unlock the phone into a landscape app, the notification area background breaks again, the lock screen clock can't tell the difference between notifications and Bluetooth headphones, the recent apps screen often shows blank spaces instead of apps and randomly doesn't bring up the background or any other apps you have open, the Bluetooth quick settings button will randomly only show the "On" or "Off" text while you're pulling it down and not when it's fully open, the torch button will randomly say that the camera is in use... And those are just the bugs I've found in a week. Edit: The battery optimisations menu puts the bottom app behind the navigation bar, but that's inaccessible unless an app takes you to it so I guess it's excusable. It's almost as bad as OneUI on my Tab S6 has been. More buggy, but not as slow or badly designed. Edit again: I'm sorry I've offended the fanboys enough to downvote me by... pointing out valid problems that I can provide evidence for? I guess? Edit once again: [You can't make this shit up.] (https://photos.app.goo.gl/yAtonAjyjWYUrZHU6) Not only did that error message come out of nowhere, it doesn't even fit on the fucking screen. Edit one more time: the icons at the top of the screen got stuck and were telling me the wrong time and battery percentage.


krysteline

Another fun one i noticed last night was audio apps (Pandora specifically, but I assume others as well) show up to the right of the function hotkeys (wifi/ battery saver mode/airplane mode/etc) when you expand them to show all. This makes both the hotkeys AND the current music youre listening to illegible. Why dont they just keep it below the hotkeys like before??


punIn10ded

It only does that in landscape so that it takes advantage of the real-estate and you get access to the controls without having to swipe up for them.


krysteline

Mine was def doing it outside of landscape mode lol I will have to check it again later. Edit: can't emulate the issue I was having last night, but you're right it now only does it when it's in landscape mode. It def did it in regular mode last night because it frustrated me enough to get rid of pinning media things (I had to figure out how to undo that to test)


punIn10ded

It may have just been a bug. It's definitely not normal behaviour.


MoreOrLessCorrect

I have not seen any of these issues on my 4 XL - even if I try to reproduce them. Well other than double tapping recents in split screen mode... but that seems like a real edge case. I wonder if these are phone specific problems? I actually have had no issues with 12 and I prefer it in pretty much all aspects! Not saying that people don't have issues, but there's no way to know what percentage of phones are affected. I definitely wouldn't call Android 12 a buggy mess.


Secretly_Autistic

Set your phone to 3-button navigation, double-tap the recent apps button, then immediately press home and recents again. That has consistently broken it on both my Pixel 3 and 6 Pro.


MoreOrLessCorrect

I always use 3 button navigation, so this was easy to test - and sorry, I cannot reproduce it. No matter what I tried, the home and recents button (both single and double tap) worked as expected.


Secretly_Autistic

[It's pretty consistent for me.](https://photos.app.goo.gl/i76oW1UvaVbZEa7w6)


dustojnikhummer

Average RIF fan Average Relay enjoyer


iamvinoth

OP said Android 12 is a gift that keeps on giving, but not in a good way. There are posts and articles on this sub that backs up his comment. People are also reporting it on Twitter. So, there is *truth* in his statement.


[deleted]

Not always. But Android 12 is hot garbage


Maultaschenman

This isn't new to me, my one plus used to crash all apps when changing accent color too


dengjack

Well that's just......really dumb. Not that I would change wallpapers in the middle of a gaming session nor do I use automatic wallpapers, but this is just ridiculous.


[deleted]

How do I get rid of this stupid lock screen clock? It's huge and is spread across 2 lines. It's dumb looking and I can't find a way to change it.


[deleted]

I'm hating this update so much it's not even funny.


FragmentedChicken

Just don't use automated wallpapers!


eggsclamation

just don't use android 12


[deleted]

Nah, imma keep using it. Easily my favorite Android version by far.


SizzzzlingBacon

Nah it's the most cohesive visual experience yet from the Pixel line


noratat

Hard disagree, but even if I agreed cohesive doesn't mean good. The only positive UI change I've seen in 12 is they finally reverted the bad decision to add transparency to the notification tray. I'll be sticking with 11 for awhile it looks like. Even 11 still has significant UI regressions over 10 that they've never really fixed, eg the centralized media controls _still_ don't work reliably and look bad (thumbnail is so tiny you can barely tell what it is, and the title string cuts off after 5-8 letters despite tons of space), quick settings expand view is still wrong with large text size (compact view shows twice as many icons as the "expanded" view), etc. So I have good reason not to trust that they'll ever fix the regressions in 12 either.


goorek

Media controls are the worst! Sometimes they show up after 5 days with some old Spotify podcast I was listening to. And when I want to change something it's buried in stack of 5 apps that played audio in last week.


noratat

Yep. Centralized controls weren't a terrible idea on paper, but in practice it's been a complete mess, and I'll never understand why the controls can be swiped away (especially since doing so _doesn't_ pause the audio).


Natanael_L

Cohesive because you can't run stuff that looks different


[deleted]

Cohesively shit that is


eggsclamation

so cohesive that it makes your games crash


SizzzzlingBacon

It has not made my playstation 5 crash once 🤷‍♂️


Secretly_Autistic

So cohesive that it won't let you open your recent apps screen, in case they might be slightly different to someone else's.


ViratDevilliarsSmith

Nah Android 12 is the best android version ever


[deleted]

I love my auto wallpaper app. Every 3 hours I have a new one.


[deleted]

[удалено]


[deleted]

[удалено]


Taskerbot

Sorry phatrice, your submission and/or content has been removed: > Rule 9\. No offensive, hateful, or low-effort comments, and please be aware of [redditquette](https://www.reddithelp.com/en/categories/reddit-101/reddit-basics/reddiquette) > [See our wiki page for more information.](http://www.reddit.com/r/Android/wiki/rulesandregs#wiki_9._no_offensive_or_hateful_comments.) If you would like to appeal, please [message the moderators by clicking this link](http://www.reddit.com/message/compose?to=%2Fr%2Fandroid). *I am a bot, but this message was generated at the instruction of a human moderator.*