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

Commit 8e331f99 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov Committed by Automerger Merge Worker
Browse files

Merge changes I040f8c30,Ifea61ce5,Idb0fc71f,Ia121ea81,I10921ebf, ... into...

Merge changes I040f8c30,Ifea61ce5,Idb0fc71f,Ia121ea81,I10921ebf, ... into udc-qpr-dev am: 156b1f91 am: 4937db69

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24324556



Change-Id: I4cea03b0f3eaa6bd8117c9a293116f305a58dcef
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2e367787 4937db69
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -370,6 +370,9 @@ object Flags {
    @JvmField val INCOMPATIBLE_CHARGING_BATTERY_ICON =
        unreleasedFlag(614, "incompatible_charging_battery_icon")

    // TODO(b/293585143): Tracking Bug
    val INSTANT_TETHER = unreleasedFlag(615, "instant_tether")

    // 700 - dialer/calls
    // TODO(b/254512734): Tracking Bug
    val ONGOING_CALL_STATUS_BAR_CHIP = releasedFlag(700, "ongoing_call_status_bar_chip")
+3 −0
Original line number Diff line number Diff line
@@ -49,6 +49,9 @@ interface WifiRepository {
        const val COL_NAME_IS_ENABLED = "isEnabled"
        /** Column name to use for [isWifiDefault] for table logging. */
        const val COL_NAME_IS_DEFAULT = "isDefault"

        const val CARRIER_MERGED_INVALID_SUB_ID_REASON =
            "Wifi network was carrier merged but had invalid sub ID"
    }
}

+17 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import com.android.systemui.demomode.DemoMode.COMMAND_NETWORK
import com.android.systemui.demomode.DemoModeController
import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository.Companion.DEFAULT_NUM_LEVELS
import com.android.systemui.statusbar.pipeline.wifi.data.repository.demo.model.FakeWifiEventModel
import com.android.systemui.statusbar.pipeline.wifi.shared.model.WifiNetworkModel
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.SharingStarted
@@ -56,12 +57,14 @@ constructor(
        val activity = getString("activity").toActivity()
        val ssid = getString("ssid")
        val validated = getString("fully").toBoolean()
        val hotspotDeviceType = getString("hotspot").toHotspotDeviceType()

        return FakeWifiEventModel.Wifi(
            level = level,
            activity = activity,
            ssid = ssid,
            validated = validated,
            hotspotDeviceType,
        )
    }

@@ -82,6 +85,20 @@ constructor(
            else -> WifiManager.TrafficStateCallback.DATA_ACTIVITY_NONE
        }

    private fun String?.toHotspotDeviceType(): WifiNetworkModel.HotspotDeviceType {
        return when (this) {
            null,
            "none" -> WifiNetworkModel.HotspotDeviceType.NONE
            "unknown" -> WifiNetworkModel.HotspotDeviceType.UNKNOWN
            "phone" -> WifiNetworkModel.HotspotDeviceType.PHONE
            "tablet" -> WifiNetworkModel.HotspotDeviceType.TABLET
            "laptop" -> WifiNetworkModel.HotspotDeviceType.LAPTOP
            "watch" -> WifiNetworkModel.HotspotDeviceType.WATCH
            "auto" -> WifiNetworkModel.HotspotDeviceType.AUTO
            else -> WifiNetworkModel.HotspotDeviceType.INVALID
        }
    }

    companion object {
        const val DEFAULT_CARRIER_MERGED_SUB_ID = 10
    }
+1 −0
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ constructor(
            isValidated = validated ?: true,
            level = level ?: 0,
            ssid = ssid ?: DEMO_NET_SSID,
            hotspotDeviceType = hotspotDeviceType,

            // These fields below aren't supported in demo mode, since they aren't needed to satisfy
            // the interface.
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.pipeline.wifi.data.repository.demo.model

import android.telephony.Annotation
import com.android.systemui.statusbar.pipeline.wifi.shared.model.WifiNetworkModel

/**
 * Model for demo wifi commands, ported from [NetworkControllerImpl]
@@ -29,6 +30,8 @@ sealed interface FakeWifiEventModel {
        @Annotation.DataActivityType val activity: Int,
        val ssid: String?,
        val validated: Boolean?,
        val hotspotDeviceType: WifiNetworkModel.HotspotDeviceType =
            WifiNetworkModel.HotspotDeviceType.NONE,
    ) : FakeWifiEventModel

    data class CarrierMerged(
Loading