summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/phone/CallBarringEditPreference.java10
-rw-r--r--src/com/android/phone/CallForwardEditPreference.java10
-rw-r--r--src/com/android/phone/GsmUmtsCallForwardOptions.java7
3 files changed, 25 insertions, 2 deletions
diff --git a/src/com/android/phone/CallBarringEditPreference.java b/src/com/android/phone/CallBarringEditPreference.java
index dcc1d68f50..cc2ccebc3c 100644
--- a/src/com/android/phone/CallBarringEditPreference.java
+++ b/src/com/android/phone/CallBarringEditPreference.java
@@ -14,6 +14,12 @@
* limitations under the License.
*/
+/**
+* Changes from Qualcomm Innovation Center, Inc. are provided under the following license:
+* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
+* SPDX-License-Identifier: BSD-3-Clause-Clear
+*/
+
package com.android.phone;
import static com.android.phone.TimeConsumingPreferenceActivity.RESPONSE_ERROR;
@@ -124,6 +130,8 @@ public class CallBarringEditPreference extends EditPinPreference {
R.styleable.CallBarringEditPreference, 0, R.style.EditPhoneNumberPreference);
mFacility = typedArray.getString(R.styleable.CallBarringEditPreference_facility);
typedArray.recycle();
+
+ mExtTelephonyManager = ExtTelephonyManager.getInstance(getContext());
}
/**
@@ -185,6 +193,7 @@ public class CallBarringEditPreference extends EditPinPreference {
mQtiImsExtConnector = null;
mQtiImsExtManager = null;
}
+ mExtTelephonyManager.unregisterCallback(mExtPhoneCallbackListener);
}
void init(TimeConsumingPreferenceListener listener, boolean skipReading, Phone phone) {
@@ -192,7 +201,6 @@ public class CallBarringEditPreference extends EditPinPreference {
mPhone = phone;
mTcpListener = listener;
- mExtTelephonyManager = ExtTelephonyManager.getInstance(getContext());
if (!skipReading) {
// Query call barring status
if (!mPhone.isUtEnabled()) {
diff --git a/src/com/android/phone/CallForwardEditPreference.java b/src/com/android/phone/CallForwardEditPreference.java
index d9db928b9d..90885c6141 100644
--- a/src/com/android/phone/CallForwardEditPreference.java
+++ b/src/com/android/phone/CallForwardEditPreference.java
@@ -1,3 +1,9 @@
+/**
+* Changes from Qualcomm Innovation Center, Inc. are provided under the following license:
+* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
+* SPDX-License-Identifier: BSD-3-Clause-Clear
+*/
+
package com.android.phone;
import static com.android.phone.TimeConsumingPreferenceActivity.EXCEPTION_ERROR;
@@ -119,6 +125,8 @@ public class CallForwardEditPreference extends EditPhoneNumberPreference {
CommandsInterface.CF_REASON_UNCONDITIONAL);
a.recycle();
+ mExtTelephonyManager = ExtTelephonyManager.getInstance(getContext());
+
Log.d(LOG_TAG, "mServiceClass=" + mServiceClass + ", reason=" + reason);
}
@@ -137,7 +145,6 @@ public class CallForwardEditPreference extends EditPhoneNumberPreference {
Log.d(LOG_TAG,
"init :mReplaceInvalidCFNumber " + mReplaceInvalidCFNumber + ", mCallForwardByUssd "
+ mCallForwardByUssd);
- mExtTelephonyManager = ExtTelephonyManager.getInstance(getContext());
if (mCallForwardByUssd) {
mCfInfo = new HashMap<String, String>();
TelephonyManager telephonyManager = new TelephonyManager(getContext(),
@@ -179,6 +186,7 @@ public class CallForwardEditPreference extends EditPhoneNumberPreference {
mQtiImsExtManager = null;
mIsTimerEnabled = false;
}
+ mExtTelephonyManager.unregisterCallback(mExtPhoneCallbackListener);
}
private boolean isUtUnavailableForVideoCallForward() {
diff --git a/src/com/android/phone/GsmUmtsCallForwardOptions.java b/src/com/android/phone/GsmUmtsCallForwardOptions.java
index 5979b0a6fb..31c3707ad4 100644
--- a/src/com/android/phone/GsmUmtsCallForwardOptions.java
+++ b/src/com/android/phone/GsmUmtsCallForwardOptions.java
@@ -1,3 +1,9 @@
+/**
+* Changes from Qualcomm Innovation Center, Inc. are provided under the following license:
+* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
+* SPDX-License-Identifier: BSD-3-Clause-Clear
+*/
+
package com.android.phone;
import android.app.ActionBar;
@@ -195,6 +201,7 @@ public class GsmUmtsCallForwardOptions extends TimeConsumingPreferenceActivity
if (support) {
mPreferences.add(preference);
} else {
+ preference.deInit();
prefSet.removePreference(preference);
}
}