Preview 2 arrived on 9 July 2015, within the “late June/early July” window Google had set. Google described it as “near-final APIs” with fixes from developer feedback. Most of its changes were to the permission model.
| Release date | 9 July 2015 |
| Build | MPZ79M (Nexus 5, 6, 9); MPZ79N (Nexus Player) |
| Devices | Same four Nexus devices; over the air from MPZ44Q, or by flashing |
| Emulator | x86 and ARM, 32- and 64-bit, through the SDK Manager |
| Google Play services | 7.6 |
| API status | Near-final |
How Preview 2 reshaped permissions
- Storage.
WRITE_EXTERNAL_STORAGEbecame “dangerous”, so apps must ask for it at runtime. It andREAD_EXTERNAL_STORAGEform theSTORAGEgroup. - Fingerprint.
USE_FINGERPRINTbecame “normal” and no longer needs the user’s approval. It does not give access to fingerprint enrolment. - Wi-Fi and Bluetooth.
BLUETOOTH,BLUETOOTH_ADMIN,CHANGE_WIFI_STATE,CHANGE_WIMAX_STATEandCHANGE_WIFI_MULTICAST_STATEbecame “normal”. Reading the MAC address of a remote Bluetooth or Wi-Fi device now needsACCESS_COARSE_LOCATIONorACCESS_FINE_LOCATION. - Accounts. Some account and identity permissions moved into the
CONTACTSgroup;USE_CREDENTIALS,MANAGE_ACCOUNTSandAUTHENTICATE_ACCOUNTSwere left ungrouped “pending further changes”. Bookmark and subscribed-feed permissions were removed. - System apps. Apps in the system image stopped getting dangerous permissions automatically.
- Rationale.
Activity.shouldShowRequestPermissionRationale(String)tells an app whether the user has already refused a permission, so it can explain why it needs it.
Other Preview 2 changes
- USB connections default to charge-only; the user must allow data access.
android.app.AssistContentandAssistStructuremoved to the newandroid.app.assistpackage.- The stylus listeners were renamed:
View.OnContextClickListenerandGestureDetector.OnContextClickListenerreplace theOnStylusButtonPressversions. InputDevice.hasMicrophone()reports whether an input device has a microphone.
The “Dark” system theme from Preview 1 was gone. 9to5Google later quoted a Googler on the preview issue tracker: “This will not be included in the M release.”