Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c6b23d5 authored by Felipe Leme's avatar Felipe Leme
Browse files

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
parent 3a13a85f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
        }