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

Commit 51e9cbc5 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6175884 from 9b87773b to qt-qpr3-release

Change-Id: I896fb7835289bc4d94220156d6ef7941bbf79a38
parents 9741eb71 9b87773b
Loading
Loading
Loading
Loading
+28 −3
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.RemoteException;
import android.util.Log;
import android.view.Display;
import android.view.GestureDetector;
@@ -167,6 +168,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
    private FlingAnimationUtils mFlingAnimationUtils;
    private SwitchToGuestTimer mSwitchToGuestTimer;
    private NotificationDataManager mNotificationDataManager;
    private CarNotificationListener mCarNotificationListener;
    private NotificationClickHandlerFactory mNotificationClickHandlerFactory;
    private ScreenLifecycle mScreenLifecycle;
    private CarAudioManager mCarAudioManager;
@@ -643,7 +645,17 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
                    }
                });

        CarNotificationListener carNotificationListener = new CarNotificationListener();
        if (mCarNotificationListener != null) {
            try {
                // If we already had a notification listener we need to unreigster is before
                // making a new one
                mCarNotificationListener.unregisterAsSystemService();
            } catch (RemoteException e) {
                Log.e(TAG, "Error unregistering notification listener.");
            }
        }

        mCarNotificationListener = new CarNotificationListener();
        mCarUxRestrictionManagerWrapper = new CarUxRestrictionManagerWrapper();

        mNotificationDataManager = new NotificationDataManager();
@@ -660,7 +672,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
                        mNotificationClickHandlerFactory, mNotificationDataManager);
        mNotificationClickHandlerFactory.setNotificationDataManager(mNotificationDataManager);

        carNotificationListener.registerAsSystemService(mContext, mCarUxRestrictionManagerWrapper,
        mCarNotificationListener.registerAsSystemService(mContext, mCarUxRestrictionManagerWrapper,
                carHeadsUpNotificationManager, mNotificationDataManager);

        mNotificationView = mStatusBarWindow.findViewById(R.id.notification_view);
@@ -769,7 +781,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
                    mNotificationViewController = new NotificationViewController(
                            mNotificationView,
                            PreprocessingManager.getInstance(mContext),
                            carNotificationListener,
                            mCarNotificationListener,
                            mCarUxRestrictionManagerWrapper,
                            mNotificationDataManager);
                    mNotificationViewController.enable();
@@ -1343,6 +1355,19 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt

    @Override
    public void onLocaleListChanged() {
        // When locale changes we need to reload the notification panel with the new language
        if (mNotificationView == null) {
            return;
        }

        LayoutParams params = mNotificationView.getLayoutParams();
        int index = mStatusBarWindow.indexOfChild(mNotificationView);

        mStatusBarWindow.removeView(mNotificationView);

        View v = View.inflate(mContext, R.layout.notification_center_activity, null);
        mStatusBarWindow.addView(v, index, params);

        restartNavBars();
        connectNotificationsUI();
    }
+33 −11
Original line number Diff line number Diff line
@@ -18096,36 +18096,48 @@ public class PackageManagerService extends IPackageManager.Stub
        int count = 0;
        final String packageName = pkg.packageName;
        boolean handlesWebUris = false;
        final boolean alreadyVerified;
        synchronized (mPackages) {
            // If this is a new install and we see that we've already run verification for this
            // package, we have nothing to do: it means the state was restored from backup.
            if (!replacing) {
                IntentFilterVerificationInfo ivi =
            final IntentFilterVerificationInfo ivi =
                    mSettings.getIntentFilterVerificationLPr(packageName);
                if (ivi != null) {
            alreadyVerified = (ivi != null);
            if (!replacing && alreadyVerified) {
                if (DEBUG_DOMAIN_VERIFICATION) {
                    Slog.i(TAG, "Package " + packageName + " already verified: status="
                            + ivi.getStatusString());
                }
                return;
            }
            }
            // If any filters need to be verified, then all need to be.
            // If any filters need to be verified, then all need to be.  In addition, we need to
            // know whether an updating app has any web navigation intent filters, to re-
            // examine handling policy even if not re-verifying.
            boolean needToVerify = false;
            for (PackageParser.Activity a : pkg.activities) {
                for (ActivityIntentInfo filter : a.intents) {
                    if (filter.handlesWebUris(true)) {
                        handlesWebUris = true;
                    }
                    if (filter.needsVerification() && needsNetworkVerificationLPr(filter)) {
                        if (DEBUG_DOMAIN_VERIFICATION) {
                            Slog.d(TAG,
                                    "Intent filter needs verification, so processing all filters");
                        }
                        needToVerify = true;
                        // It's safe to break out here because filter.needsVerification()
                        // can only be true if filter.handlesWebUris(true) returns true, so
                        // we've already noted that.
                        break;
                    }
                }
            }
            // Note whether this app publishes any web navigation handling support at all,
            // and whether there are any web-nav filters that fit the profile for running
            // a verification pass now.
            if (needToVerify) {
                final int verificationId = mIntentFilterVerificationToken++;
                for (PackageParser.Activity a : pkg.activities) {
@@ -18143,13 +18155,23 @@ public class PackageManagerService extends IPackageManager.Stub
        }
        if (count > 0) {
            // count > 0 means that we're running a full verification pass
            if (DEBUG_DOMAIN_VERIFICATION) Slog.d(TAG, "Starting " + count
                    + " IntentFilter verification" + (count > 1 ? "s" : "")
                    +  " for userId:" + userId);
            mIntentFilterVerifier.startVerifications(userId);
        } else if (alreadyVerified && handlesWebUris) {
            // App used autoVerify in the past, no longer does, but still handles web
            // navigation starts.
            if (DEBUG_DOMAIN_VERIFICATION) {
                Slog.d(TAG, "App changed web filters but no longer verifying - resetting policy");
            }
            synchronized (mPackages) {
                clearIntentFilterVerificationsLPw(packageName, userId);
            }
        } else {
            if (DEBUG_DOMAIN_VERIFICATION) {
                Slog.d(TAG, "No filters or not all autoVerify for " + packageName);
                Slog.d(TAG, "No web filters or no prior verify policy for " + packageName);
            }
        }
    }
+1 −0
Original line number Diff line number Diff line
@@ -1252,6 +1252,7 @@ public final class Settings {
            return false;
        }
        ps.clearDomainVerificationStatusForUser(userId);
        ps.setIntentFilterVerificationInfo(null);
        return true;
    }