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

Commit 0979cee2 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 10721735 from 58eb008b to udc-qpr1-release

Change-Id: I584167d0cd6bded187e90b44f16c2116276ddb33
parents 3f61ba6f 58eb008b
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -552,10 +552,6 @@
    <color name="accessibility_magnification_thumbnail_container_background_color">#99000000</color>
    <color name="accessibility_magnification_thumbnail_container_stroke_color">#FFFFFF</color>

    <!-- Color of camera light when camera is in use -->
    <color name="camera_privacy_light_day">#FFFFFF</color>
    <color name="camera_privacy_light_night">#FFFFFF</color>

    <!-- Lily Language Picker language item view colors -->
    <color name="language_picker_item_text_color">#202124</color>
    <color name="language_picker_item_text_color_secondary">#5F6368</color>
+13 −2
Original line number Diff line number Diff line
@@ -6441,8 +6441,19 @@

    <!-- Interval in milliseconds to average light sensor values for camera light brightness -->
    <integer name="config_cameraPrivacyLightAlsAveragingIntervalMillis">3000</integer>
    <!-- Light sensor's lux value to use as the threshold between using day or night brightness -->
    <integer name="config_cameraPrivacyLightAlsNightThreshold">4</integer>
    <!-- Ambient Light sensor's lux values to use as the threshold between brightness colors defined
         by config_cameraPrivacyLightColors. If the ambient brightness less than the first element
         in this array then lights of type "camera" will be set to the color in position 0 of
         config_cameraPrivacyLightColors. This array must be strictly increasing and have a length
         of zero means there is only one brightness -->
    <integer-array name="config_cameraPrivacyLightAlsLuxThresholds">
    </integer-array>
    <!-- Colors to configure the camera privacy light at different brightnesses. This array must
         have exactly one more entry than config_cameraPrivacyLightAlsLuxThresholds,
         or a length of zero if the feature isn't supported. If nonempty and the device doesn't have
         an ambient light sensor the last element in this array will be the only one used -->
    <array name="config_cameraPrivacyLightColors">
    </array>

    <!-- List of system components which are allowed to receive ServiceState entries in an
         un-sanitized form, even if the location toggle is off. This is intended ONLY for system
+2 −3
Original line number Diff line number Diff line
@@ -4963,10 +4963,9 @@
  <java-symbol type="string" name="vdm_camera_access_denied" />
  <java-symbol type="string" name="vdm_secure_window" />

  <java-symbol type="color" name="camera_privacy_light_day"/>
  <java-symbol type="color" name="camera_privacy_light_night"/>
  <java-symbol type="integer" name="config_cameraPrivacyLightAlsAveragingIntervalMillis"/>
  <java-symbol type="integer" name="config_cameraPrivacyLightAlsNightThreshold"/>
  <java-symbol type="array" name="config_cameraPrivacyLightAlsLuxThresholds"/>
  <java-symbol type="array" name="config_cameraPrivacyLightColors"/>

  <java-symbol type="bool" name="config_bg_current_drain_monitor_enabled" />
  <java-symbol type="array" name="config_bg_current_drain_threshold_to_restricted_bucket" />
+3 −13
Original line number Diff line number Diff line
@@ -132,9 +132,6 @@ public class InternetAdapter extends RecyclerView.Adapter<InternetAdapter.Intern
        final Context mContext;
        final InternetDialogController mInternetDialogController;

        @VisibleForTesting
        protected WifiUtils.InternetIconInjector mWifiIconInjector;

        InternetViewHolder(View view, InternetDialogController internetDialogController) {
            super(view);
            mContext = view.getContext();
@@ -146,12 +143,10 @@ public class InternetAdapter extends RecyclerView.Adapter<InternetAdapter.Intern
            mWifiTitleText = view.requireViewById(R.id.wifi_title);
            mWifiSummaryText = view.requireViewById(R.id.wifi_summary);
            mWifiEndIcon = view.requireViewById(R.id.wifi_end_icon);
            mWifiIconInjector = mInternetDialogController.getWifiIconInjector();
        }

        void onBind(@NonNull WifiEntry wifiEntry) {
            mWifiIcon.setImageDrawable(
                    getWifiDrawable(wifiEntry.getLevel(), wifiEntry.shouldShowXLevelIcon()));
            mWifiIcon.setImageDrawable(getWifiDrawable(wifiEntry));
            setWifiNetworkLayout(wifiEntry.getTitle(),
                    Html.fromHtml(wifiEntry.getSummary(false), Html.FROM_HTML_MODE_LEGACY));

@@ -213,13 +208,8 @@ public class InternetAdapter extends RecyclerView.Adapter<InternetAdapter.Intern
        }

        @Nullable
        Drawable getWifiDrawable(int level, boolean hasNoInternet) {
            // If the Wi-Fi level is equal to WIFI_LEVEL_UNREACHABLE(-1), then a null drawable
            // will be returned.
            if (level == WifiEntry.WIFI_LEVEL_UNREACHABLE) {
                return null;
            }
            final Drawable drawable = mWifiIconInjector.getIcon(hasNoInternet, level);
        Drawable getWifiDrawable(@NonNull WifiEntry wifiEntry) {
            Drawable drawable = mInternetDialogController.getWifiDrawable(wifiEntry);
            if (drawable == null) {
                return null;
            }
+22 −9
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.systemui.qs.tiles.dialog;

import static com.android.settingslib.mobile.MobileMappings.getIconKey;
import static com.android.settingslib.mobile.MobileMappings.mapIconSets;
import static com.android.settingslib.wifi.WifiUtils.getHotspotIconResource;
import static com.android.wifitrackerlib.WifiEntry.CONNECTED_STATE_CONNECTED;

import android.animation.Animator;
@@ -89,6 +90,7 @@ import com.android.systemui.toast.SystemUIToast;
import com.android.systemui.toast.ToastFactory;
import com.android.systemui.util.CarrierConfigTracker;
import com.android.systemui.util.settings.GlobalSettings;
import com.android.wifitrackerlib.HotspotNetworkEntry;
import com.android.wifitrackerlib.MergedCarrierEntry;
import com.android.wifitrackerlib.WifiEntry;

@@ -454,11 +456,7 @@ public class InternetDialogController implements AccessPointController.AccessPoi

    @Nullable
    Drawable getInternetWifiDrawable(@NonNull WifiEntry wifiEntry) {
        if (wifiEntry.getLevel() == WifiEntry.WIFI_LEVEL_UNREACHABLE) {
            return null;
        }
        final Drawable drawable =
                mWifiIconInjector.getIcon(wifiEntry.shouldShowXLevelIcon(), wifiEntry.getLevel());
        Drawable drawable = getWifiDrawable(wifiEntry);
        if (drawable == null) {
            return null;
        }
@@ -466,6 +464,25 @@ public class InternetDialogController implements AccessPointController.AccessPoi
        return drawable;
    }

    /**
     * Returns a Wi-Fi icon {@link Drawable}.
     *
     * @param wifiEntry {@link WifiEntry}
     */
    @Nullable
    Drawable getWifiDrawable(@NonNull WifiEntry wifiEntry) {
        if (wifiEntry instanceof HotspotNetworkEntry) {
            int deviceType = ((HotspotNetworkEntry) wifiEntry).getDeviceType();
            return mContext.getDrawable(getHotspotIconResource(deviceType));
        }
        // If the Wi-Fi level is equal to WIFI_LEVEL_UNREACHABLE(-1), then a null drawable
        // will be returned.
        if (wifiEntry.getLevel() == WifiEntry.WIFI_LEVEL_UNREACHABLE) {
            return null;
        }
        return mWifiIconInjector.getIcon(wifiEntry.shouldShowXLevelIcon(), wifiEntry.getLevel());
    }

    Drawable getSignalStrengthDrawable(int subId) {
        Drawable drawable = mContext.getDrawable(
                R.drawable.ic_signal_strength_zero_bar_no_internet);
@@ -1314,10 +1331,6 @@ public class InternetDialogController implements AccessPointController.AccessPoi
        mDefaultDataSubId = defaultDataSubId;
    }

    public WifiUtils.InternetIconInjector getWifiIconInjector() {
        return mWifiIconInjector;
    }

    interface InternetDialogCallback {

        void onRefreshCarrierInfo();
Loading