Handle saveInstanceState when viewHandler is null

If the ViewHandler or ViewModel are null, do not save instance state.
Also, when delegating an activity, ensure the viewModel and ViewHandler
are initialized.

Bug: 227547811
Test: atest NotificationPermissionTest
Change-Id: I9b24b1f240cf202f96ec2a9e79a27415c1ce67fc
1 file changed