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

Commit 16e3eb78 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6016135 from 78ee3320 to qt-qpr2-release

Change-Id: Ic1a7292e88a9d2a6c240ee6029c8a3be4d23adf0
parents e5bcd19a 78ee3320
Loading
Loading
Loading
Loading
+76 −18
Original line number Diff line number Diff line
@@ -60,26 +60,45 @@ import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.systemui.BatteryMeterView;
import com.android.systemui.CarSystemUIFactory;
import com.android.systemui.Dependency;
import com.android.systemui.ForegroundServiceController;
import com.android.systemui.Prefs;
import com.android.systemui.R;
import com.android.systemui.SystemUIFactory;
import com.android.systemui.classifier.FalsingLog;
import com.android.systemui.colorextraction.SysuiColorExtractor;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.keyguard.ScreenLifecycle;
import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.plugins.qs.QS;
import com.android.systemui.qs.car.CarQSFragment;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.TaskStackChangeListener;
import com.android.systemui.statusbar.FlingAnimationUtils;
import com.android.systemui.statusbar.NavigationBarController;
import com.android.systemui.statusbar.NotificationListener;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationMediaManager;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.NotificationViewHierarchyManager;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.car.hvac.HvacController;
import com.android.systemui.statusbar.car.hvac.TemperatureView;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.VisualStabilityManager;
import com.android.systemui.statusbar.notification.logging.NotificationLogger;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
import com.android.systemui.statusbar.phone.CollapsedStatusBarFragment;
import com.android.systemui.statusbar.phone.LightBarController;
import com.android.systemui.statusbar.phone.NotificationGroupAlertTransferHelper;
import com.android.systemui.statusbar.phone.NotificationGroupManager;
import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.statusbar.phone.StatusBarIconController;
import com.android.systemui.statusbar.policy.BatteryController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.statusbar.policy.KeyguardMonitor;
import com.android.systemui.statusbar.policy.UserSwitcherController;
import com.android.systemui.statusbar.policy.ZenModeController;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -292,6 +311,45 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
        }
    }

    @Override
    protected void getDependencies() {
        // Keyguard
        mKeyguardMonitor = Dependency.get(KeyguardMonitor.class);
        mWakefulnessLifecycle = Dependency.get(WakefulnessLifecycle.class);
        mScreenLifecycle = Dependency.get(ScreenLifecycle.class);

        // Policy
        mZenController = Dependency.get(ZenModeController.class);

        // Icon
        mIconController = Dependency.get(StatusBarIconController.class);
        mLightBarController = Dependency.get(LightBarController.class);

        // Notifications
        mEntryManager = Dependency.get(NotificationEntryManager.class);
        mForegroundServiceController = Dependency.get(ForegroundServiceController.class);
        mGroupAlertTransferHelper = Dependency.get(NotificationGroupAlertTransferHelper.class);
        mGroupManager = Dependency.get(NotificationGroupManager.class);
        mGutsManager = Dependency.get(NotificationGutsManager.class);
        mLockscreenUserManager = Dependency.get(NotificationLockscreenUserManager.class);
        mMediaManager = Dependency.get(NotificationMediaManager.class);
        mNotificationListener = Dependency.get(NotificationListener.class);
        mNotificationLogger = Dependency.get(NotificationLogger.class);
        mRemoteInputManager = Dependency.get(NotificationRemoteInputManager.class);
        mViewHierarchyManager = Dependency.get(NotificationViewHierarchyManager.class);
        mVisualStabilityManager = Dependency.get(VisualStabilityManager.class);

        // Others
        mColorExtractor = Dependency.get(SysuiColorExtractor.class);
        mNavigationBarController = Dependency.get(NavigationBarController.class);
        mUserSwitcherController = Dependency.get(UserSwitcherController.class);
    }

    @Override
    protected void setUpQuickSettingsTilePanel() {
        // ignore.
    }

    /**
     * Remove all content from navbars and rebuild them. Used to allow for different nav bars
     * before and after the device is provisioned. . Also for change of density and font size.
@@ -486,17 +544,6 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt

        CarNotificationListener carNotificationListener = new CarNotificationListener();
        mCarUxRestrictionManagerWrapper = new CarUxRestrictionManagerWrapper();
        ((CarSystemUIFactory) SystemUIFactory.getInstance()).getCarServiceProvider(mContext)
                .addListener((car, ready) -> {
                    if (!ready) {
                        return;
                    }
                    CarUxRestrictionsManager carUxRestrictionsManager =
                            (CarUxRestrictionsManager)
                                    car.getCarManager(Car.CAR_UX_RESTRICTION_SERVICE);
                    mCarUxRestrictionManagerWrapper.setCarUxRestrictionsManager(
                            carUxRestrictionsManager);
                });

        mNotificationDataManager = new NotificationDataManager();
        mNotificationDataManager.setOnUnseenCountUpdateListener(
@@ -620,6 +667,16 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
                return handled || isTracking;
            }
        });
        ((CarSystemUIFactory) SystemUIFactory.getInstance()).getCarServiceProvider(mContext)
                .addListener((car, ready) -> {
                    if (!ready) {
                        return;
                    }
                    CarUxRestrictionsManager carUxRestrictionsManager =
                            (CarUxRestrictionsManager)
                                    car.getCarManager(Car.CAR_UX_RESTRICTION_SERVICE);
                    mCarUxRestrictionManagerWrapper.setCarUxRestrictionsManager(
                            carUxRestrictionsManager);

                    mNotificationViewController = new NotificationViewController(
                            mNotificationView,
@@ -628,6 +685,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
                            mCarUxRestrictionManagerWrapper,
                            mNotificationDataManager);
                    mNotificationViewController.enable();
                });
    }

    /**
+13 −46
Original line number Diff line number Diff line
@@ -718,20 +718,7 @@ public class AccessPoint implements Comparable<AccessPoint> {
                || (mConfig != null && mConfig.shared != config.shared)) {
            return false;
        }

        final int configSecurity = getSecurity(config);
        final WifiManager wifiManager = getWifiManager();
        switch (security) {
            case SECURITY_PSK_SAE_TRANSITION:
                return configSecurity == SECURITY_PSK
                        || (wifiManager.isWpa3SaeSupported() && configSecurity == SECURITY_SAE);
            case SECURITY_OWE_TRANSITION:
                return configSecurity == SECURITY_NONE
                        || (wifiManager.isEnhancedOpenSupported()
                                && configSecurity == SECURITY_OWE);
            default:
                return security == configSecurity;
        }
        return security == getSecurity(config);
    }

    public WifiConfiguration getConfig() {
@@ -1270,34 +1257,10 @@ public class AccessPoint implements Comparable<AccessPoint> {
        mAccessPointListener = listener;
    }

    private static final String sPskSuffix = "," + String.valueOf(SECURITY_PSK);
    private static final String sSaeSuffix = "," + String.valueOf(SECURITY_SAE);
    private static final String sPskSaeSuffix = "," + String.valueOf(SECURITY_PSK_SAE_TRANSITION);
    private static final String sOweSuffix = "," + String.valueOf(SECURITY_OWE);
    private static final String sOpenSuffix = "," + String.valueOf(SECURITY_NONE);
    private static final String sOweTransSuffix = "," + String.valueOf(SECURITY_OWE_TRANSITION);

    private boolean isKeyEqual(String compareTo) {
        if (mKey == null) {
            return false;
        }

        if (compareTo.endsWith(sPskSuffix) || compareTo.endsWith(sSaeSuffix)) {
            if (mKey.endsWith(sPskSaeSuffix)) {
                // Special handling for PSK-SAE transition mode. If the AP has advertised both,
                // we compare the key with both PSK and SAE for a match.
                return TextUtils.equals(mKey.substring(0, mKey.lastIndexOf(',')),
                        compareTo.substring(0, compareTo.lastIndexOf(',')));
            }
        }
        if (compareTo.endsWith(sOpenSuffix) || compareTo.endsWith(sOweSuffix)) {
            if (mKey.endsWith(sOweTransSuffix)) {
                // Special handling for OWE/Open networks. If AP advertises OWE in transition mode
                // and we have an Open network saved, allow this connection to be established.
                return TextUtils.equals(mKey.substring(0, mKey.lastIndexOf(',')),
                        compareTo.substring(0, compareTo.lastIndexOf(',')));
            }
        }
        return mKey.equals(compareTo);
    }

@@ -1628,8 +1591,6 @@ public class AccessPoint implements Comparable<AccessPoint> {
    private static int getSecurity(ScanResult result) {
        if (result.capabilities.contains("WEP")) {
            return SECURITY_WEP;
        } else if (result.capabilities.contains("PSK+SAE")) {
            return SECURITY_PSK_SAE_TRANSITION;
        } else if (result.capabilities.contains("SAE")) {
            return SECURITY_SAE;
        } else if (result.capabilities.contains("PSK")) {
@@ -1638,8 +1599,6 @@ public class AccessPoint implements Comparable<AccessPoint> {
            return SECURITY_EAP_SUITE_B;
        } else if (result.capabilities.contains("EAP")) {
            return SECURITY_EAP;
        } else if (result.capabilities.contains("OWE_TRANSITION")) {
            return SECURITY_OWE_TRANSITION;
        } else if (result.capabilities.contains("OWE")) {
            return SECURITY_OWE;
        }
@@ -1686,10 +1645,6 @@ public class AccessPoint implements Comparable<AccessPoint> {
            return "SUITE_B";
        } else if (security == SECURITY_OWE) {
            return "OWE";
        } else if (security == SECURITY_PSK_SAE_TRANSITION) {
            return "PSK+SAE";
        } else if (security == SECURITY_OWE_TRANSITION) {
            return "OWE_TRANSITION";
        }
        return "NONE";
    }
@@ -1859,4 +1814,16 @@ public class AccessPoint implements Comparable<AccessPoint> {
            }
        }
    }

    /**
     * Lets the caller know if the network was cloned from another network
     *
     * @return true if the network is cloned
     */
    public boolean isCloned() {
        if (mConfig == null) {
            return false;
        }
        return mConfig.clonedNetworkConfigKey != null;
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -176,9 +176,11 @@ public class SystemUIApplication extends Application implements SysUiServiceProv

        Log.v(TAG, "Starting SystemUI services for user " +
                Process.myUserHandle().getIdentifier() + ".");

        TimingsTraceLog log = new TimingsTraceLog("SystemUIBootTiming",
                Trace.TRACE_TAG_APP);
        log.traceBegin(metricsPrefix);

        final int N = services.length;
        for (int i = 0; i < N; i++) {
            String clsName = services[i];
+130 −90

File changed.

Preview size limit exceeded, changes collapsed.

+15 −5
Original line number Diff line number Diff line
@@ -382,12 +382,7 @@ public class WifiConfiguration implements Parcelable {
    public void setSecurityParams(@SecurityType int securityType) {
        // Clear all the bitsets.
        allowedKeyManagement.clear();
        allowedProtocols.clear();
        allowedAuthAlgorithms.clear();
        allowedPairwiseCiphers.clear();
        allowedGroupCiphers.clear();
        allowedGroupManagementCiphers.clear();
        allowedSuiteBCiphers.clear();

        switch (securityType) {
            case SECURITY_TYPE_OPEN:
@@ -410,6 +405,9 @@ public class WifiConfiguration implements Parcelable {
                requirePMF = true;
                break;
            case SECURITY_TYPE_EAP_SUITE_B:
                allowedGroupCiphers.clear();
                allowedGroupManagementCiphers.clear();
                allowedSuiteBCiphers.clear();
                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.SUITE_B_192);
                allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256);
                allowedGroupManagementCiphers.set(WifiConfiguration.GroupMgmtCipher.BIP_GMAC_256);
@@ -922,6 +920,12 @@ public class WifiConfiguration implements Parcelable {
     */
    public int meteredOverride = METERED_OVERRIDE_NONE;

    /**
     * This Wifi configuration is a clone of another network with lower security
     * @hide
     */
    public String clonedNetworkConfigKey;

    /**
     * Blend together all the various opinions to decide if the given network
     * should be considered metered or not.
@@ -1793,6 +1797,7 @@ public class WifiConfiguration implements Parcelable {
        shared = true;
        dtimInterval = 0;
        mRandomizedMacAddress = MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS);
        clonedNetworkConfigKey = null;
    }

    /**
@@ -2352,6 +2357,7 @@ public class WifiConfiguration implements Parcelable {

    /** copy constructor {@hide} */
    @UnsupportedAppUsage

    public WifiConfiguration(WifiConfiguration source) {
        if (source != null) {
            networkId = source.networkId;
@@ -2431,6 +2437,7 @@ public class WifiConfiguration implements Parcelable {
            macRandomizationSetting = source.macRandomizationSetting;
            requirePMF = source.requirePMF;
            updateIdentifier = source.updateIdentifier;
            clonedNetworkConfigKey = source.clonedNetworkConfigKey;
        }
    }

@@ -2502,6 +2509,7 @@ public class WifiConfiguration implements Parcelable {
        dest.writeParcelable(mRandomizedMacAddress, flags);
        dest.writeInt(macRandomizationSetting);
        dest.writeInt(osu ? 1 : 0);
        dest.writeString(clonedNetworkConfigKey);
    }

    /** Implement the Parcelable interface {@hide} */
@@ -2575,6 +2583,8 @@ public class WifiConfiguration implements Parcelable {
                config.mRandomizedMacAddress = in.readParcelable(null);
                config.macRandomizationSetting = in.readInt();
                config.osu = in.readInt() != 0;
                config.clonedNetworkConfigKey = in.readString();

                return config;
            }