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
This commit is contained in:
Neha Jain
2022-07-26 21:10:38 +00:00
parent 6a9d2b06aa
commit d611126474
3 changed files with 3 additions and 52 deletions

View File

@@ -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);
}

View File

@@ -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,
)
}

View File

@@ -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)
}
}