diff options
| author | 2022-07-26 21:10:38 +0000 | |
|---|---|---|
| committer | 2022-07-26 21:10:38 +0000 | |
| commit | d611126474130e657ab8f70e91c861a40b80f86c (patch) | |
| tree | 1110526c6e4be9c14e1baf346c545e2972ea2d87 | |
| parent | 6a9d2b06aadc7858fff5d775425b8da28ec44fcc (diff) | |
Revert "Create a MobileStatusTrackerFactory"
Revert submission 19279477
Reason for revert: b/240223150
Reverted Changes:
I1bef3f309:Remove support for COMBINED_SIGNAL_ICONS
I38f76a746:Create a MobileStatusTrackerFactory
I0b1dd8e71:Change from deprecated telephony api
Id1a02134f:[Cleanup] Order NetworkController's intent filters...
I405ad3858:Add an @Inject-able MobileSignalControllerFactory
Change-Id: Iccec69e2697f6638a6ef07e86bb9303641ef7167
3 files changed, 3 insertions, 52 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalController.java index f3dedc4e0d6e..9d8667a3ccb0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalController.java @@ -96,7 +96,7 @@ public class MobileSignalController extends SignalController<MobileState, Mobile private int mLastWlanLevel; private int mLastWlanCrossSimLevel; @VisibleForTesting - final MobileStatusTracker mMobileStatusTracker; + MobileStatusTracker mMobileStatusTracker; // Save the previous STATUS_HISTORY_SIZE states for logging. private final String[] mMobileStatusHistory = new String[STATUS_HISTORY_SIZE]; @@ -192,7 +192,6 @@ public class MobileSignalController extends SignalController<MobileState, Mobile SubscriptionDefaults defaults, Looper receiverLooper, CarrierConfigTracker carrierConfigTracker, - MobileStatusTrackerFactory mobileStatusTrackerFactory, FeatureFlags featureFlags ) { super("MobileSignalController(" + info.getSubscriptionId() + ")", context, @@ -225,7 +224,8 @@ public class MobileSignalController extends SignalController<MobileState, Mobile } }; mImsMmTelManager = ImsMmTelManager.createForSubscriptionId(info.getSubscriptionId()); - mMobileStatusTracker = mobileStatusTrackerFactory.createTracker(mMobileCallback); + mMobileStatusTracker = new MobileStatusTracker(mPhone, receiverLooper, + info, mDefaults, mMobileCallback); mProviderModelBehavior = featureFlags.isEnabled(Flags.COMBINED_STATUS_BAR_SIGNAL_ICONS); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalControllerFactory.kt b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalControllerFactory.kt index 908c2704c8c0..fa1333073f37 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalControllerFactory.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalControllerFactory.kt @@ -43,12 +43,6 @@ internal class MobileSignalControllerFactory @Inject constructor( subscriptionDefaults: MobileStatusTracker.SubscriptionDefaults, receiverLooper: Looper // TODO: no! ): MobileSignalController { - val mobileTrackerFactory = MobileStatusTrackerFactory( - phone, - receiverLooper, - subscriptionInfo, - subscriptionDefaults) - return MobileSignalController( context, config, @@ -60,7 +54,6 @@ internal class MobileSignalControllerFactory @Inject constructor( subscriptionDefaults, receiverLooper, carrierConfigTracker, - mobileTrackerFactory, featureFlags, ) } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileStatusTrackerFactory.kt b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileStatusTrackerFactory.kt deleted file mode 100644 index a4c1a1989933..000000000000 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileStatusTrackerFactory.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2022 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.statusbar.connectivity - -import android.os.Looper -import android.telephony.SubscriptionInfo -import android.telephony.TelephonyManager -import com.android.settingslib.mobile.MobileStatusTracker - -/** - * Factory for [MobileStatusTracker], which lives in SettingsLib - */ -class MobileStatusTrackerFactory ( - val phone: TelephonyManager, - val receiverLooper: Looper, - val info: SubscriptionInfo, - val defaults: MobileStatusTracker.SubscriptionDefaults, -) { - fun createTracker( - callback: MobileStatusTracker.Callback - ): MobileStatusTracker { - return MobileStatusTracker( - phone, - receiverLooper, - info, - defaults, - callback) - } -} |