4

I just noticed something interesting happen in Android Q Beta 4 that was not happening in Android Q Beta 3

According to the documentation getIMEI() - https://developer.android.com/reference/android/telephony/TelephonyManager.html#getImei()

Returns the IMEI (International Mobile Equipment Identity). Return null if IMEI is not available.

Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier privileges (see hasCarrierPrivileges()).

However using the Android Emulator (Google Play Store) I can still access the device IMEI if I'm the default SMS App:

  • READ_PHONE_STATE + Default SMS App --> Will return device IMEI
  • READ_PHONE_STATE --> Will return null

This was not happening with Beta 3, even with the (READ_PHONE_STATE + Default SMS App) combination I was not able to access the IMEI, which is fine it matches the Q documentation

From what I understand the Android Beta 4 behavior goes against the documentation and the new Android Q "Non-resettable device identifiers" restrictions.

Anyone knows if this is a regression from the Beta 3 or did Google change this behavior and did not update the Android documentation?

Community
  • 1
  • 1
duffyduck
  • 91
  • 5
  • 1
    My guess is a documentation bug, but you might consider filing an issue to try to get it clarified. – CommonsWare Jun 06 '19 at 18:49
  • Well it could be something like that... I'm going to wait two or three days and see if there's any update to the documentation. However and after all the talk about the new [Non-resettable device identifiers](https://developer.android.com/preview/privacy/data-identifiers#device-ids) I find this behavior change from Beta 3 to Beta 4 suspicious... – duffyduck Jun 06 '19 at 19:18
  • @duffyduck IMSI works for you? – NitZRobotKoder Jul 01 '19 at 07:34
  • @NitZRobotKoder Yes, If the application is set as the default SMS App I can access IMEI and IMSI on Beta 4 In the meantime there's two open issues in the public issue tracker to try to clarify this behavior: https://issuetracker.google.com/issues/135210778 https://issuetracker.google.com/issues/136024233 – duffyduck Jul 05 '19 at 08:07

0 Answers0