Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add flag to skip removing permissions at cleardata #2261

Closed

Conversation

ruanhongfu
Copy link

@ruanhongfu ruanhongfu commented Dec 15, 2023

this PR gives users an option to keep App permissions even when clear data
operation is called under certain cases. It reads system property to decide the
behavior. By default, the property is not set, so no effect on the system.
It benefits automation test, in which App data needs to be cleared but its
permissions need to be kept.

Test done:

  • boot up Android, run "adb shell pm clear com.wedobest.fivechess", found
    all granted permissions of fivechess are cleared.
  • run "adb shell setprop skip.reset.permission" and above pm clear cmd, the
    granted permissions are still there

Tracked-On: OAM-114234

Test done:
1. boot up Android, run "adb shell pm clear com.wedobest.fivechess",
found all granted permissions of fivechess are cleared.
2. run "adb shell setprop skip.reset.permission" and above pm clear
cmd, the granted permissions are still there as expected.

Tracked-On: OAM-114234
Signed-off-by: Ruan, Hongfu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant