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

Commit 6505660c authored by Manjeet Rulhania's avatar Manjeet Rulhania Committed by Android (Google) Code Review
Browse files

Merge "Add null check for SensitiveContentProtectionService" into main

parents 5f28ccab 12a66bf9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1210,6 +1210,9 @@ public final class ViewRootImpl implements ViewParent,
            mSensitiveContentProtectionService =
                    ISensitiveContentProtectionManager.Stub.asInterface(
                        ServiceManager.getService(Context.SENSITIVE_CONTENT_PROTECTION_SERVICE));
            if (mSensitiveContentProtectionService == null) {
                Log.e(TAG, "SensitiveContentProtectionService shouldn't be null");
            }
        } else {
            mSensitiveContentProtectionService = null;
        }
@@ -4179,6 +4182,9 @@ public final class ViewRootImpl implements ViewParent,
     */
    void notifySensitiveContentAppProtection(boolean showSensitiveContent) {
        try {
            if (mSensitiveContentProtectionService == null) {
                return;
            }
            // The window would be blocked during screen share if it shows sensitive content.
            mSensitiveContentProtectionService.setSensitiveContentProtection(
                    getWindowToken(), mContext.getPackageName(), showSensitiveContent);