The CommonsBlog

Random Musings on the P Developer Preview 3

Android P Developer Preview 3 (P DP3) was released yesterday. I usually do a “random musings” post for these releases, as I did for P DP1 and P DP2.

This was a really tiny update, in terms of API changes.

Other than some tweaks to the P slice API, there is very little that should directly affect existing code. And, since I suspect most slicemongers are using the AndroidX slice API, even that will not affect you, until a new version of that AndroidX API is released.

I am curious about FEATURE_CANT_SAVE_STATE. A device with that feature is supposed to support cantSaveState (perhaps a new XML attribute on <application>?), which is described as:

Declare that this application can’t participate in the normal state save/restore mechanism. Since it is not able to save and restore its state on demand, it can not participate in the normal activity lifecycle. It will not be killed while in the background; the user must explicitly quit it. Only one such app can be running at a time; if the user tries to launch a second such app, they will be prompted to quit the first before doing so. While the application is running, the user will be informed of this.

My guess is that this is for dedicated single-app devices, as an adjunct to kiosk mode and similar features, but that is just a guess.

One thing that will not directly affect your code but will affect your UX is that call log-related permissions have been pulled out into a separate permission group. If you are requesting both phone-related permissions (e.g., READ_PHONE_STATE) and call log-related permissions (e.g., READ_CALL_LOG), you should get separate panes in the runtime permission dialog and will get separate entries in the list of permissions on your app’s screen in Settings. Unfortunately, at the moment, both permission groups share the same icon.

If you have been fighting API graylist/blacklist issues – perhaps because you have been naughty – it is possible that you will encounter some changes in behavior.

And, as Sebastiano Poggi and others pointed out, it appears that Android P is going to be Android 9.0.

Stuck on an Android problem? Subscribers have access to live office hours chats with Mark Murphy, to help you work through your challenges!