Closed putthidaSR closed 6 years ago
@thinkhy I'm not sure if it's device specific issue. I'll try to test again on other 8.0 devices, but so far, I only tested on Pixel XL 8.0 and it failed to retrieve serial number.
I've seen many devices that don't allow you to read the serial number - I don't have access to these devices anymore, though, so it's difficult to say. Pretty sure they were Xperia devices though.
What STF does is that it passes the serial number to the service when the IdentityActivity is displayed, since STF is guaranteed to know it already.
I'm assuming devices that don't let you access the serial do it for privacy reasons.
@sorccu @putthidaSR You're right, Google set the limitation since Android 8.0, but I notice some manufactures like HuaWei and XiaoMi have changed the policy and permit the access of serial number in their customized ROMs.
Wondering why you submit this PR? Which device/ROM do you find the problem of serial number on? I attempted latest version of STFService.apk on some 8.0/8.1 devices, currently I haven't hit the problem yet.