Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c03be60 authored by Felipe Leme's avatar Felipe Leme
Browse files

Deprecate (and log usage) of DPMS.getMainUserId()

To test it, enable verbose:

$ adb shell setprop log.tag.DevicePolicyManager VERBOSE

Watch logcat:

$ adb logcat DevicePolicyManager *:s

And trigger a date change:

$ adb shell date 0531103025

It will show something like:

05-31 10:30:00.021  7355  7355 V DevicePolicyManager: getMainUserId() returning 0 at:
05-31 10:30:00.021  7355  7355 V DevicePolicyManager: java.lang.Exception
05-31 10:30:00.021  7355  7355 V DevicePolicyManager: 	at com.android.server.devicepolicy.DevicePolicyManagerService.getMainUserId(DevicePolicyManagerService.java:10166)
05-31 10:30:00.021  7355  7355 V DevicePolicyManager: 	at com.android.server.devicepolicy.DevicePolicyManagerService.-$$Nest$mgetMainUserId(Unknown Source:0)
05-31 10:30:00.021  7355  7355 V DevicePolicyManager: 	at com.android.server.devicepolicy.DevicePolicyManagerService$1.onReceive(DevicePolicyManagerService.java:1305)

Bug: 420745998
Bug: 417943524
Test: see above
Flag: EXEMPT logging changes only

Change-Id: I08013990d3d071e2bba0cf39cdec3520cfe910fc
parent 51f9e51a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment