Use collectAsCallbackWithLifecycle

Instead of observeAsCallback, since isAllowed is a flow now.

Bug: 322916468
Test: manual - on Toggle Permission page and switch between apps
Test: unit test
Change-Id: Ic33a7d6cd7c71c7cf6cd4a6e353505fa12cf0046
4 files changed