Register now for Android Dev Summit 2019!

Android Q privacy: Changes to camera and connectivity

This document describes several restrictions placed on accessing camera and connectivity information. These changes help protect users' privacy.

Some of these changes affect all apps running on Android Q while other changes affect only apps that target Android Q.

Changes affecting all apps

The following change affects all apps running on Android Q, even if they target Android 9 (API level 28) or lower.

Access to all camera information requires permission

Android Q changes the breadth of information that the getCameraCharacteristics() method returns by default. In particular, your app must have the CAMERA permission in order to access potentially device-specific metadata that is included in this method's return value.

If your app doesn't have the CAMERA permission, it cannot access the following fields:

  • ANDROID_LENS_POSE_ROTATION
  • ANDROID_LENS_POSE_TRANSLATION
  • ANDROID_LENS_INTRINSIC_CALIBRATION
  • ANDROID_LENS_RADIAL_DISTORTION
  • ANDROID_LENS_POSE_REFERENCE
  • ANDROID_LENS_DISTORTION
  • ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE
  • ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE
  • ANDROID_SENSOR_REFERENCE_ILLUMINANT1
  • ANDROID_SENSOR_REFERENCE_ILLUMINANT2
  • ANDROID_SENSOR_CALIBRATION_TRANSFORM1
  • ANDROID_SENSOR_CALIBRATION_TRANSFORM2
  • ANDROID_SENSOR_COLOR_TRANSFORM1
  • ANDROID_SENSOR_COLOR_TRANSFORM2
  • ANDROID_SENSOR_FORWARD_MATRIX1
  • ANDROID_SENSOR_FORWARD_MATRIX2

Changes affecting apps targeting Android Q

The following changes affect apps only if they target Android Q.

Restriction on enabling and disabling Wi-Fi

Apps targeting Android Q cannot enable or disable Wi-Fi. The WifiManager.setWifiEnabled() method always returns false.

If needed, use a settings panel to prompt users to enable and disable Wi-Fi.

Wi-Fi network configuration restrictions

To protect user privacy, manual configuration of the list of Wi-Fi networks is now restricted to system apps and device policy controllers (DPCs). A given DPC can be either the device owner or the profile owner.

If your app doesn't fall into one of these categories and targets Android Q, the following methods no longer return useful data:

  • The getConfiguredNetworks() method always returns an empty list.
  • Each network operation method that returns an integer value—addNetwork() and updateNetwork()—always returns -1.
  • Each network operation that returns a boolean value—removeNetwork(), reassociate(), enableNetwork(), disableNetwork(), reconnect(), and disconnect()—always returns false.

If your app needs to connect to Wi-Fi networks, use the following alternative methods:

Fine location permission needed for telephony, Wi-Fi, Bluetooth APIs

Unless your app has the ACCESS_FINE_LOCATION permission, your app cannot use several methods within the Wi-Fi, Wi-Fi Aware, or Bluetooth APIs when running on Android Q. The following list shows the affected methods.

Telephony

Wi-Fi

Bluetooth