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

Commit 51cdd0ad authored by Steve Statia's avatar Steve Statia Committed by Android (Google) Code Review
Browse files

Merge "Fix to unregister the mSmsBroadcastReceiver from CatService when the...

Merge "Fix to unregister the mSmsBroadcastReceiver from CatService when the process is disposed." into main
parents eaf15a98 8c6848a7
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -28,3 +28,14 @@ flag {
    purpose: PURPOSE_BUGFIX
  }
}

# OWNER=stevestatia TARGET=24Q3
flag {
    name: "unregister_sms_broadcast_receiver_from_cat_service"
    namespace: "telephony"
    description: "This flag will unregister the sms broadcast receiver in the CatService when the process is disposed."
    bug: "338936403"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}
 No newline at end of file
+8 −0
Original line number Diff line number Diff line
@@ -284,6 +284,14 @@ public class CatService extends Handler implements AppInterface {
            CatLog.d(this, "Disposing CatService object");
            mIccRecords.unregisterForRecordsLoaded(this);

            if (sFlags.unregisterSmsBroadcastReceiverFromCatService()) {
                try {
                    mContext.unregisterReceiver(mSmsBroadcastReceiver);
                } catch (IllegalArgumentException e) {
                    CatLog.e(this, "mSmsBroadcastReceiver: was not registered" + e);
                }
            }

            // Clean up stk icon if dispose is called
            broadcastCardStateAndIccRefreshResp(CardState.CARDSTATE_ABSENT, null);