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

Commit 14a5b715 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Give tethering bluetooth privilege permission" into rvc-dev am: 710061c3 am: 8ad227a1

Change-Id: Iac932c222d1ba008a0e2504b4de46e1b5e65c916
parents 15de2746 8ad227a1
Loading
Loading
Loading
Loading
+24 −25
Original line number Diff line number Diff line
@@ -9581,18 +9581,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        // First check if context has client, so it saves a service lookup when it doesn't
        if (mContext.getContentCaptureOptions() == null) return;
        // Then check if it's enabled in the context...
        final ContentCaptureManager ccm = ai != null ? ai.getContentCaptureManager(mContext)
                : mContext.getSystemService(ContentCaptureManager.class);
        if (ccm == null || !ccm.isContentCaptureEnabled()) return;
        // ... and finally at the view level
        // NOTE: isImportantForContentCapture() is more expensive than cm.isContentCaptureEnabled()
        if (!isImportantForContentCapture()) return;
        ContentCaptureSession session = getContentCaptureSession();
        if (session == null) return;
        if (appeared) {
            if (!isLaidOut() || getVisibility() != VISIBLE
                    || (mPrivateFlags4 & PFLAG4_NOTIFIED_CONTENT_CAPTURE_APPEARED) != 0) {
@@ -9607,15 +9595,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                }
                return;
            }
            setNotifiedContentCaptureAppeared();
            if (ai != null) {
                ai.delayNotifyContentCaptureEvent(session, this, appeared);
            } else {
                if (DEBUG_CONTENT_CAPTURE) {
                    Log.w(CONTENT_CAPTURE_LOG_TAG, "no AttachInfo on appeared for " + this);
                }
            }
        } else {
            if ((mPrivateFlags4 & PFLAG4_NOTIFIED_CONTENT_CAPTURE_APPEARED) == 0
                    || (mPrivateFlags4 & PFLAG4_NOTIFIED_CONTENT_CAPTURE_DISAPPEARED) != 0) {
@@ -9630,6 +9609,26 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                }
                return;
            }
        }
        ContentCaptureSession session = getContentCaptureSession();
        if (session == null) return;
        // ... and finally at the view level
        // NOTE: isImportantForContentCapture() is more expensive than cm.isContentCaptureEnabled()
        if (!isImportantForContentCapture()) return;
        if (appeared) {
            setNotifiedContentCaptureAppeared();
            if (ai != null) {
                ai.delayNotifyContentCaptureEvent(session, this, appeared);
            } else {
                if (DEBUG_CONTENT_CAPTURE) {
                    Log.w(CONTENT_CAPTURE_LOG_TAG, "no AttachInfo on appeared for " + this);
                }
            }
        } else {
            mPrivateFlags4 |= PFLAG4_NOTIFIED_CONTENT_CAPTURE_DISAPPEARED;
            mPrivateFlags4 &= ~PFLAG4_NOTIFIED_CONTENT_CAPTURE_APPEARED;
+1 −0
Original line number Diff line number Diff line
@@ -255,6 +255,7 @@ applications that come with the platform
    </privapp-permissions>

    <privapp-permissions package="com.android.networkstack.tethering">
        <permission name="android.permission.BLUETOOTH_PRIVILEGED" />
        <permission name="android.permission.MANAGE_USB"/>
        <permission name="android.permission.MODIFY_PHONE_STATE"/>
        <permission name="android.permission.READ_NETWORK_USAGE_HISTORY"/>
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
         added to the privileged permissions whitelist for that package. -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" />
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.MANAGE_USB" />