Fix keyboard settings crash in multi-user case
We have CL[1] to fix the NPE when keyboard settings is launched by work app. CL[1] overlooked the work profile with multi-user case. Work profile user ID is not available(return null) when calling Utils#getManagedProfile by work identity. For work case, distinguish it's running on managed profile user(launched by work app) or not. And use corresponding userId as: -. If it's a managed profile user, use currentUserId. -. For a owner user, get managed profile userId. [1]: Iea573922ee789d9932c0de05bf71179c4f005eeb Bug: 216395439 Test: Manual test with bugs steps Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableVirtualKeyboardFragmentTest Change-Id: If018d2fddbbcf932927d2235bb8e99393df1e67c
Loading
Please register or sign in to comment