Issue detail:
We have added a suggested network in other system app(android:sharedUserId="android.uid.system"), and the security type of this network is EAP-SIM. This network can establish connection successful, but the Settings will crash if we click the 'edit' button/icon in the 'Network details' preference. It seems to be an AOSP issue, but I cannot find the root cause at this time.
Does anyone know or have encountered this problem, it would be greatly appreciated for your reply.
The related logs:
--------- beginning of crash
AndroidRuntime: FATAL EXCEPTION: main
AndroidRuntime: Process: com.android.settings, PID: 8540
AndroidRuntime: java.lang.IllegalArgumentException: Invalid userId -10000
AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:2421)
AndroidRuntime: at android.os.Parcel.createException(Parcel.java:2396)
AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2379)
AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2321)
AndroidRuntime: at android.app.admin.IDevicePolicyManager$Stub$Proxy.getProfileOwnerAsUser(IDevicePolicyManager.java:8824)
AndroidRuntime: at android.app.admin.DevicePolicyManager.getProfileOwnerAsUser(DevicePolicyManager.java:7025)
AndroidRuntime: at com.android.settings.wifi.details2.WifiNetworkDetailsFragment2.onOptionsItemSelected(WifiNetworkDetailsFragment2.java:145)
AndroidRuntime: at androidx.fragment.app.Fragment.performOptionsItemSelected(Fragment.java:3033)
AndroidRuntime: at androidx.fragment.app.FragmentManager.dispatchOptionsItemSelected(FragmentManager.java:3099)
AndroidRuntime: at androidx.fragment.app.FragmentController.dispatchOptionsItemSelected(FragmentController.java:416)
AndroidRuntime: at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:317)
AndroidRuntime: at android.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:93)
AndroidRuntime: at com.android.internal.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:65)
AndroidRuntime: at android.widget.Toolbar$1.onMenuItemClick(Toolbar.java:203)
AndroidRuntime: at android.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:769)
AndroidRuntime: at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:787)
AndroidRuntime: at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:151)
AndroidRuntime: at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:934)
AndroidRuntime: at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:924)
AndroidRuntime: at android.widget.ActionMenuView.invokeItem(ActionMenuView.java:619)
AndroidRuntime: at com.android.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:148)
AndroidRuntime: at android.view.View.performClick(View.java:7463)
AndroidRuntime: at android.view.View.performClickInternal(View.java:7432)
AndroidRuntime: at android.view.View.access$3600(View.java:817)
AndroidRuntime: at android.view.View$PerformClick.run(View.java:28315)
AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:938)
AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
AndroidRuntime: at android.os.Looper.loop(Looper.java:378)
AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7707)
AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
AndroidRuntime: Caused by: java.lang.IllegalArgumentException: Invalid userId -10000
AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.enforceSystemUserOrPermissionIfCrossUser(DevicePolicyManagerService.java:9687)
AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCrossUsersPermission(DevicePolicyManagerService.java:9674)
AndroidRuntime: at com.android.server.devicepolicy.DevicePolicyManagerService.getProfileOwnerAsUser(DevicePolicyManagerService.java:9286)
AndroidRuntime: at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:3668)
AndroidRuntime: at android.os.Binder.execTransactInternal(Binder.java:1159)
AndroidRuntime: at android.os.Binder.execTransact(Binder.java:1123)