Loading packages/SystemUI/res/layout/qs_carrier.xml +2 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ ~ limitations under the License --> <com.android.systemui.qs.QSCarrier <com.android.systemui.qs.carrier.QSCarrier xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linear_carrier" android:layout_width="wrap_content" Loading Loading @@ -46,4 +46,4 @@ android:singleLine="true" android:maxEms="7"/> </com.android.systemui.qs.QSCarrier> No newline at end of file </com.android.systemui.qs.carrier.QSCarrier> No newline at end of file packages/SystemUI/res/layout/qs_carrier_group.xml +2 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ --> <!-- Extends LinearLayout --> <com.android.systemui.qs.QSCarrierGroup <com.android.systemui.qs.carrier.QSCarrierGroup xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/qs_mobile" android:layout_width="0dp" Loading Loading @@ -71,4 +71,4 @@ android:layout_weight="1" android:visibility="gone"/> </com.android.systemui.qs.QSCarrierGroup> No newline at end of file </com.android.systemui.qs.carrier.QSCarrierGroup> No newline at end of file packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java +1 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ import com.android.systemui.plugins.ActivityStarter; import com.android.systemui.plugins.DarkIconDispatcher; import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver; import com.android.systemui.qs.QSDetail.Callback; import com.android.systemui.qs.carrier.QSCarrierGroup; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.phone.StatusBarIconController.TintedIconManager; Loading packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.qs; import com.android.systemui.R; import com.android.systemui.qs.carrier.QSCarrierGroupController; import javax.inject.Inject; Loading packages/SystemUI/src/com/android/systemui/qs/carrier/CellSignalState.kt 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.qs.carrier /** * Represents the state of cell signal for a particular slot. * * To be used between [QSCarrierGroupController] and [QSCarrier]. */ data class CellSignalState( @JvmField val visible: Boolean = false, @JvmField val mobileSignalIconId: Int = 0, @JvmField val contentDescription: String? = null, @JvmField val typeContentDescription: String? = null, @JvmField val roaming: Boolean = false ) { /** * Changes the visibility of this state by returning a copy with the visibility changed. * * If the visibility would not change, the same state is returned. * * @param visible the new visibility state * @return `this` if `this.visible == visible`. Else, a new copy with the visibility changed. */ fun changeVisibility(visible: Boolean): CellSignalState { if (this.visible == visible) return this else return copy(visible = visible) } } No newline at end of file Loading
packages/SystemUI/res/layout/qs_carrier.xml +2 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ ~ limitations under the License --> <com.android.systemui.qs.QSCarrier <com.android.systemui.qs.carrier.QSCarrier xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linear_carrier" android:layout_width="wrap_content" Loading Loading @@ -46,4 +46,4 @@ android:singleLine="true" android:maxEms="7"/> </com.android.systemui.qs.QSCarrier> No newline at end of file </com.android.systemui.qs.carrier.QSCarrier> No newline at end of file
packages/SystemUI/res/layout/qs_carrier_group.xml +2 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ --> <!-- Extends LinearLayout --> <com.android.systemui.qs.QSCarrierGroup <com.android.systemui.qs.carrier.QSCarrierGroup xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/qs_mobile" android:layout_width="0dp" Loading Loading @@ -71,4 +71,4 @@ android:layout_weight="1" android:visibility="gone"/> </com.android.systemui.qs.QSCarrierGroup> No newline at end of file </com.android.systemui.qs.carrier.QSCarrierGroup> No newline at end of file
packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java +1 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ import com.android.systemui.plugins.ActivityStarter; import com.android.systemui.plugins.DarkIconDispatcher; import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver; import com.android.systemui.qs.QSDetail.Callback; import com.android.systemui.qs.carrier.QSCarrierGroup; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.phone.StatusBarIconController.TintedIconManager; Loading
packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.qs; import com.android.systemui.R; import com.android.systemui.qs.carrier.QSCarrierGroupController; import javax.inject.Inject; Loading
packages/SystemUI/src/com/android/systemui/qs/carrier/CellSignalState.kt 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.qs.carrier /** * Represents the state of cell signal for a particular slot. * * To be used between [QSCarrierGroupController] and [QSCarrier]. */ data class CellSignalState( @JvmField val visible: Boolean = false, @JvmField val mobileSignalIconId: Int = 0, @JvmField val contentDescription: String? = null, @JvmField val typeContentDescription: String? = null, @JvmField val roaming: Boolean = false ) { /** * Changes the visibility of this state by returning a copy with the visibility changed. * * If the visibility would not change, the same state is returned. * * @param visible the new visibility state * @return `this` if `this.visible == visible`. Else, a new copy with the visibility changed. */ fun changeVisibility(visible: Boolean): CellSignalState { if (this.visible == visible) return this else return copy(visible = visible) } } No newline at end of file