Fix reading app ops data - framework

There was an optimized code path that is hit if the op
has not been accessed that does not write the uid state
information which did not add the closing tag which
resulted in producing a malformed XML.

Test: atest android.app.appops.cts.AppOpsTest#testNonHistoricalStatePersistence

bug:128872367

Change-Id: Iaddcce09b41f3e124e1838b65731d8dac9ca64e3
4 files changed