Merge "Revert "[MEP] psim->esim, don't skip carrierConfigChanged with subId -1"" into tm-qpr-dev am: f71b548285 am: 40838101dd

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20973543

Change-Id: I573b4835887ef22ed832291d881123690b9d5d5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
SongFerng Wang
2023-01-16 08:58:31 +00:00
committed by Automerger Merge Worker
2 changed files with 6 additions and 21 deletions

View File

@@ -32,20 +32,9 @@ public class CarrierConfigChangedReceiver extends BroadcastReceiver {
CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED;
private final CountDownLatch mLatch;
private final boolean mIsWaitingForValidSubId;
/**
* This is the CarrierConfigChanged receiver. If it receives the carrier config changed, then it
* call the CountDownLatch.countDown().
* If the "isWaitingForValidSubId" is true, then the receiver skip the carrier config changed
* with the subId = -1. The receiver executes the countDown when the CarrierConfigChanged
* with valid subId.
* If the "isWaitingForValidSubId" is false, then the receiver executes the countDown when
* receiving any CarrierConfigChanged.
*/
public CarrierConfigChangedReceiver(CountDownLatch latch, boolean isWaitingForValidSubId) {
public CarrierConfigChangedReceiver(CountDownLatch latch) {
mLatch = latch;
mIsWaitingForValidSubId = isWaitingForValidSubId;
}
public void registerOn(Context context) {
@@ -65,8 +54,7 @@ public class CarrierConfigChangedReceiver extends BroadcastReceiver {
}
private void checkSubscriptionIndex(Intent intent) {
if (intent.hasExtra(CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX)
|| !mIsWaitingForValidSubId) {
if (intent.hasExtra(CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX)) {
int subId = intent.getIntExtra(CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX, -1);
Log.i(TAG, "subId from config changed: " + subId);
mLatch.countDown();