Random Musings on the Android 12 Developer Preview 3

Each time Google releases a follow-on developer preview, I rummage throughthe incremental API differences report,the release notes,and even the release blog post,to see if there are things that warrant more attention from developers. I try to emphasize things that mainstream developers might use but may notget quite as much attention, because they are buried in the JavaDocs.

Today, let���s take a look at the (presumed) last of the developer previews, DP3, aswe race towards betas. As usual, things start to slow down the deeper into therelease process we get, but there are still some DP3 changes to consider.

What Makes Me Very Angry

Splash screens. Specifically, Google-mandated-and-designed splash screens.Even more specifically, Google-mandated-and-designed splash screens that affectevery app regardless of targetSdkVersion.

What Does Not Shock Me

Adding the SCHEDULE_EXACT_ALARM permissionis unsurprising. If anything, I am surprised it took this long.

Similarly, continuing The War on Background Processing by adding an even more restrictive���restricted��� app standby bucketis unsurprising.

Adding additional blocks on what apps can handle ACTION_VIEW for Web URLsalso is unsurprising. Unfortunately, this has some anti-competitive aspects, as itputs additional burdens on third-party clients for existing Web properties, as wellas for alternative Web browsers.

The fact that RenderScript is dead is unsurprising��� other than the factthat zombies are remarkably tough to kill sometimes.

What Security-Conscious Developers Should Ponder

android:allowBackup no longer affects device-to-device data transfers.There is a separate configuration mechanism that you can use to try to put somelimits on that.

There is a new getRedactedUri()method on MediaStore. Given the Uri of some piece of content, getRedactedUri()will return a Uri that serves up the same content with some form of redactionin place. The cited example is removing location/GPS-related EXIF headers from images.It is unclear if there are other forms of redaction that are offered.

There are new BLUETOOTH_CONNECTand BLUETOOTH_SCANpermissions. My hope is that these will mean that we will no longer have to requestlocation permission to work with Bluetooth devices. OTOH, it seems like this should bedocumented more by now, particularly since they are dangerous permissions andpresumably require runtime requests. These appear to be in a new permissiongroup, NEARBY_DEVICES.

Possibly related, there is a new android:usesPermissionFlags that goes somewhere(<uses-permission> element?). The one supported value is neverForLocation,which basically says ���we pinky-swear that we are not going to use your locationdespite asking for location permissions���.

There is a new DisplayHashManager system service,which is ���used to validate information about what was present on screen���.This begs the question: under what circumstances would this hash fail?See also generateDisplayHash() on View.

What Continues Its Remarkable Turnaround

RemoteViews, particularly for use with app widgets, is getting more love herein Android 12. I mentioned a bunch of improvements in my DP2 post.In DP3, we get a whole bunch of additional RemoteViews improvements.It looks like we can adjust android:layout_* attributes now, for height, width,and margins. And, it appears that we have a simpler option for populating a ListView,using RemoteCollectionItems.

Also, the deprecated AnalogClock class continues getting new capabilities.

What Is Going Away

If you were using system-supplied playlist tracking via MediaStore.Audio.Playlists,do something else.

The ���network slicing��� APIs added to DevicePolicyManager in an earlier developerpreview are now gone.

And our ripples no longer have style.

What Is Back

Deprecated is no longer deprecated.

What Relieves Me Tremendously

We made it to DP3 without any obvious changes to scoped storage.

What Makes Me Go ���Hmmmmm������

There is a new LightsManagerthat ���allows control over device lights���. It is unclear whether or notthere are four lights.

Theoretically, there is a new DomainVerificationManager system service,obtained using DOMAIN_VERIFICATION_SERVICE���except the documentation leads to a 404.

There is a new MANAGE_MEDIApermission. If I understand it correctly, apps that hold it can have a somewhatstreamlined user experience with media management, with fewer confirmation popupsto grant access to the managing app.

There is a new wordy START_FOREGROUND_SERVICES_FROM_BACKGROUNDpermission. Right now, we cannot start foreground services from the background,but with this permission, you can. However, ordinary apps cannot have it,only privileged apps and those in certain roles. Why a gallery app deservesto have the right to start foreground services from the background is beyond me.

Somewhere, perhaps in the manifest, we can specifyandroid:requestOptimizedExternalStorageAccess="true".That can only be granted to apps with MANAGE_EXTERNAL_STORAGE or, once again,gallery apps. If granted, ���bulk file path operations will be optimized���, whateverthat means.

Bubble can suppress their bubbles.Sometimes.

The app search APIs expanded massivelyyet remain unannounced. In completely unrelated news, Google I|O 2021 willbe held May 18-20.

We can now find why our JobScheduler job was stopped,which is a rather nice addition.

There is a new singleInstancePerTask value for android:launchMode.

compileSdkVersion is now reported for installed apps.This includes apparently for things like android-S.

AudioManager now lets you control ���the audio device that should be used for communication use cases���via setCommunicationDevice().

The scrolling-screenshot capability being added to Android 12 may be being poweredby ScrollCaptureCallback.

 •  0 comments  •  flag
Share on Twitter
Published on April 23, 2021 06:44
No comments have been added yet.