diff options
| author | 2019-01-15 17:02:49 -0800 | |
|---|---|---|
| committer | 2019-01-15 17:05:36 -0800 | |
| commit | 0c6b23d5d1670c42a3c3f77dfef62fc20347a50b (patch) | |
| tree | fd3c26115b41c7119d4a3aac38fa38e2a810696e | |
| parent | 3a13a85fd4494731270535e5061bf23db97a6983 (diff) | |
Fixed how ContentCapture checks for system apps.
The previous check was disabling it for "non-system" apps that were bundled
in the system...
Bug: 121045049
Fixes: 122915433
Test: manual verification
Test: atest CtsAutoFillServiceTestCases
Change-Id: I2352fc21de27750509715035ba2f9c2dc2371428
| -rw-r--r-- | core/java/android/app/Activity.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 98c5a0fb59be..08d50a530661 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -17,6 +17,7 @@ package android.app; import static android.Manifest.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS; +import static android.os.Process.myUid; import static java.lang.Character.MIN_VALUE; @@ -1025,7 +1026,7 @@ public class Activity extends ContextThemeWrapper */ @Nullable private ContentCaptureManager getContentCaptureManager() { // ContextCapture disabled for system apps - if (getApplicationInfo().isSystemApp()) return null; + if (!UserHandle.isApp(myUid())) return null; if (mContentCaptureManager == null) { mContentCaptureManager = getSystemService(ContentCaptureManager.class); } |