[RESTRICT AUTOMERGE] Correct the behavior of ACTION_PACKAGE_DATA_CLEARED

This action should be only broadcasted when the user data is cleared
successfully. Broadcasting this action when failed case may result in
unexpected result.

Bug: 240267890
Test: manually using the PoC in the buganizer to ensure the symptom
      no longer exists.
Change-Id: Ica8aa541e694d62c768a5a3f965547377198eef7
(cherry picked from commit 94b10bba20f8d96964c80a8157fd8e02286eff68)
Merged-In: Ica8aa541e694d62c768a5a3f965547377198eef7
1 file changed