Update KeyguardUpdateMonitor DPM_STATE_CHANGED params

KUM#DPM_STATE_CHANGE was sending the userId as message's object obj,
not arg1, so this test would break on headless system variants since
msg.arg1 always was equal to 0 (while this always passes on non-headless
systems since the test always runs as userId 0).

Test: atest KeyguardUpdateMonitorTest#testSecondaryLockscreenRequirement
on a headless system device variant (previously was 100% failing)
Fixes: 264869291

Change-Id: Iab519b59ca92ea25da1386cb2e020df63c828070
This commit is contained in:
Beverly
2023-04-12 18:10:43 +00:00
committed by Beverly Tai
parent 002b09c340
commit bd09bd2034

View File

@@ -1824,7 +1824,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
} else if (DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED
.equals(action)) {
mHandler.sendMessage(mHandler.obtainMessage(MSG_DPM_STATE_CHANGED,
getSendingUserId()));
getSendingUserId(), 0));
} else if (ACTION_USER_UNLOCKED.equals(action)) {
mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_UNLOCKED,
getSendingUserId(), 0));