The CommonsBlog

Miscellaneous Android 4.2 Regressions

Lots of people have already chimed in on StackOverflow about Settings.Global, notably the fact that AIRPLANE_MODE is no longer available to be modified in Settings.System. Now, only signature|system apps will be able to toggle on and off airplane mode, which will wipe out many an app widget. To be honest, this did not surprise me, as I never fully understood why it was left in Settings.System in the first place when Settings.Secure was carved out in 1.5.

That being said, I don’t think that it’s unreasonable for there to be a secured means from within the Android SDK to modify these sorts of settings. If a regular permission is deemed insufficient, then make them toggle-able via the device admin API, the way we can disable the camera.

Along a similar line, there has been another regression in the world of APN settings. Android 4.0 locked down the WRITE_APN_SETTINGS permission, making it signature|system, so ordinary SDK apps could no longer modify APN values. Android 4.2 has taken the next step and is using WRITE_APN_SETTINGS to secure read access to APNs. The argument given in the commit is:

Since the DB may contain corp passwords, we should secure it. Using the same permission as writing to the DB as the read is potentially as damaging as a write.

Once again, while I certainly can see the argument for blocking unfettered access to APN data, these are the sorts of changes that really should be available to device admin apps. While the vast majority of Android users do not need apps messing with APNs, and carriers should be working with their device manufacturers (who can offer signature|system apps), enterprises are left in the cold.

Another issue with all these changes is their unannounced nature. Sometimes, as is the case with Settings.Global, we are informed about them. Sometimes, as in both of the WRITE_APN_SETTINGS changes, we find out about them because apps crash in testing, and developers wonder why. You would think that by a version 4.2, a process could be in place where app-affecting changes like WRITE_APN_SETTINGS changes would be collected and published as part of the release notes.

Need Android app development training for your team? Mark Murphy has trained hundreds of developers! Learn more!