Null safe package name in AppOps writeState

Ensure that, if a package has a null package name, that the AppOpsServer
does not crash. Existing package tags should be closed, and lastPkg set
to null.

Test: manual
Fixes: 193664388
Change-Id: I420477a9f102b6c1f8305b45158e7bdb3a71e227
1 file changed