Loading src/java/com/android/internal/telephony/PhoneBase.java +10 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,10 @@ public abstract class PhoneBase extends Handler implements Phone { int mCallRingDelay; public boolean mIsTheCurrentActivePhone = true; boolean mIsVoiceCapable = true; // Variable to cache the video capabilitity. In some cases, we lose this info and are unable // to recover from the state. So, we cache it and notify listeners when they register. private boolean mIsVideoCapable = false; protected UiccController mUiccController = null; public AtomicReference<IccRecords> mIccRecords = new AtomicReference<IccRecords>(); public SmsStorageMonitor mSmsStorageMonitor; Loading Loading @@ -754,6 +758,9 @@ public abstract class PhoneBase extends Handler implements Phone { checkCorrectThread(h); mVideoCapabilityChangedRegistrants.addUnique(h, what, obj); // Notify any registrants of the cached video capability as soon as they register. notifyForVideoCapabilityChanged(mIsVideoCapable); } // Inherited documentation suffices. Loading Loading @@ -1763,6 +1770,9 @@ public abstract class PhoneBase extends Handler implements Phone { * Notify registrants if phone is video capable. */ public void notifyForVideoCapabilityChanged(boolean isVideoCallCapable) { // Cache the current video capability so that we don't lose the information. mIsVideoCapable = isVideoCallCapable; AsyncResult ar = new AsyncResult(null, isVideoCallCapable, null); mVideoCapabilityChangedRegistrants.notifyRegistrants(ar); } Loading src/java/com/android/internal/telephony/imsphone/ImsPhone.java +10 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,10 @@ public class ImsPhone extends ImsPhoneBase { private final RegistrantList mSilentRedialRegistrants = new RegistrantList(); // Variable to cache the video capabilitity. In cases where we delete/re-create the phone // this information is getting lost. private boolean mIsVideoCapable = false; // A runnable which is used to automatically exit from Ecm after a period of time. private Runnable mExitEcmRunnable = new Runnable() { @Override Loading Loading @@ -176,6 +180,11 @@ public class ImsPhone extends ImsPhoneBase { // synchronization is managed at the PhoneBase scope (which calls this function) mDefaultPhone = parentPhone; mPhoneId = mDefaultPhone.getPhoneId(); // When the parent phone is updated, we need to notify listeners of the cached video // capability. Rlog.d(LOG_TAG, "updateParentPhone - Notify video capability changed " + mIsVideoCapable); notifyForVideoCapabilityChanged(mIsVideoCapable); } @Override Loading Loading @@ -469,6 +478,7 @@ public class ImsPhone extends ImsPhoneBase { } public void notifyForVideoCapabilityChanged(boolean isVideoCapable) { mIsVideoCapable = isVideoCapable; mDefaultPhone.notifyForVideoCapabilityChanged(isVideoCapable); } Loading Loading
src/java/com/android/internal/telephony/PhoneBase.java +10 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,10 @@ public abstract class PhoneBase extends Handler implements Phone { int mCallRingDelay; public boolean mIsTheCurrentActivePhone = true; boolean mIsVoiceCapable = true; // Variable to cache the video capabilitity. In some cases, we lose this info and are unable // to recover from the state. So, we cache it and notify listeners when they register. private boolean mIsVideoCapable = false; protected UiccController mUiccController = null; public AtomicReference<IccRecords> mIccRecords = new AtomicReference<IccRecords>(); public SmsStorageMonitor mSmsStorageMonitor; Loading Loading @@ -754,6 +758,9 @@ public abstract class PhoneBase extends Handler implements Phone { checkCorrectThread(h); mVideoCapabilityChangedRegistrants.addUnique(h, what, obj); // Notify any registrants of the cached video capability as soon as they register. notifyForVideoCapabilityChanged(mIsVideoCapable); } // Inherited documentation suffices. Loading Loading @@ -1763,6 +1770,9 @@ public abstract class PhoneBase extends Handler implements Phone { * Notify registrants if phone is video capable. */ public void notifyForVideoCapabilityChanged(boolean isVideoCallCapable) { // Cache the current video capability so that we don't lose the information. mIsVideoCapable = isVideoCallCapable; AsyncResult ar = new AsyncResult(null, isVideoCallCapable, null); mVideoCapabilityChangedRegistrants.notifyRegistrants(ar); } Loading
src/java/com/android/internal/telephony/imsphone/ImsPhone.java +10 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,10 @@ public class ImsPhone extends ImsPhoneBase { private final RegistrantList mSilentRedialRegistrants = new RegistrantList(); // Variable to cache the video capabilitity. In cases where we delete/re-create the phone // this information is getting lost. private boolean mIsVideoCapable = false; // A runnable which is used to automatically exit from Ecm after a period of time. private Runnable mExitEcmRunnable = new Runnable() { @Override Loading Loading @@ -176,6 +180,11 @@ public class ImsPhone extends ImsPhoneBase { // synchronization is managed at the PhoneBase scope (which calls this function) mDefaultPhone = parentPhone; mPhoneId = mDefaultPhone.getPhoneId(); // When the parent phone is updated, we need to notify listeners of the cached video // capability. Rlog.d(LOG_TAG, "updateParentPhone - Notify video capability changed " + mIsVideoCapable); notifyForVideoCapabilityChanged(mIsVideoCapable); } @Override Loading Loading @@ -469,6 +478,7 @@ public class ImsPhone extends ImsPhoneBase { } public void notifyForVideoCapabilityChanged(boolean isVideoCapable) { mIsVideoCapable = isVideoCapable; mDefaultPhone.notifyForVideoCapabilityChanged(isVideoCapable); } Loading