Skip to content
Commit 9648463d authored by Felipe Leme's avatar Felipe Leme
Browse files

Fixed autofill Shell cmds that set Global settings.

These commands used to set internal variables, which on Q moved to Settings, and changing these
settings fail on on unroot devices:

java.lang.SecurityException: Package android does not belong to 2000
        at android.app.AppOpsManager.checkPackage(AppOpsManager.java:2394)
        at android.content.ContentProvider.getCallingPackage(ContentProvider.java:784)

So, we have 2 solutions here:

1.Deprecate the commands in favor of the 'settings' command
2.Call the SettingsProvider as the system process (uid 1000)

This CL takes the 2nd approach, as these commands (specially 'autofill set log_level')
are widely spread and used by developers for debugging.

Test: adb unroot && atest CtsAutoFillServiceTestCases

Fixes: 112562057

Change-Id: I6256d5098fb8ed3353189a53ee5e85c34519bad4
parent 80457464
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment