Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +1 −2 Original line number Diff line number Diff line Loading @@ -349,7 +349,6 @@ public class GsmCdmaPhone extends Phone { super(precisePhoneType == PhoneConstants.PHONE_TYPE_GSM ? "GSM" : "CDMA", notifier, context, ci, unitTestMode, phoneId, telephonyComponentFactory, featureFlags); // phone type needs to be set before other initialization as other objects rely on it mPrecisePhoneType = precisePhoneType; mVoiceCallSessionStats = new VoiceCallSessionStats(mPhoneId, this, featureFlags); Loading @@ -370,7 +369,7 @@ public class GsmCdmaPhone extends Phone { SignalStrengthController.class.getName()).makeSignalStrengthController(this); mSST = mTelephonyComponentFactory.inject(ServiceStateTracker.class.getName()) .makeServiceStateTracker(this, this.mCi, featureFlags); if (hasCalling()) { if (hasCalling() || hasMessaging()) { mEmergencyNumberTracker = mTelephonyComponentFactory .inject(EmergencyNumberTracker.class.getName()).makeEmergencyNumberTracker( this, this.mCi, mFeatureFlags); Loading src/java/com/android/internal/telephony/Phone.java +7 −0 Original line number Diff line number Diff line Loading @@ -1966,6 +1966,13 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { return TelephonyCapabilities.supportsTelephonyCalling(mFeatureFlags, mContext); } /** * @return true if this device supports messaging, false otherwise. */ public boolean hasMessaging() { return TelephonyCapabilities.supportsTelephonyMessaging(mFeatureFlags, mContext); } /** * Retrieves the EmergencyNumberTracker of the phone instance. */ Loading src/java/com/android/internal/telephony/TelephonyCapabilities.java +10 −0 Original line number Diff line number Diff line Loading @@ -219,4 +219,14 @@ public class TelephonyCapabilities { return context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_TELEPHONY_CALLING); } /** * @return true if this device supports telephony messaging, false if it does not. */ public static boolean supportsTelephonyMessaging(@NonNull FeatureFlags featureFlags, Context context) { if (!TelephonyCapabilities.minimalTelephonyCdmCheck(featureFlags)) return true; return context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_TELEPHONY_MESSAGING); } } Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +1 −2 Original line number Diff line number Diff line Loading @@ -349,7 +349,6 @@ public class GsmCdmaPhone extends Phone { super(precisePhoneType == PhoneConstants.PHONE_TYPE_GSM ? "GSM" : "CDMA", notifier, context, ci, unitTestMode, phoneId, telephonyComponentFactory, featureFlags); // phone type needs to be set before other initialization as other objects rely on it mPrecisePhoneType = precisePhoneType; mVoiceCallSessionStats = new VoiceCallSessionStats(mPhoneId, this, featureFlags); Loading @@ -370,7 +369,7 @@ public class GsmCdmaPhone extends Phone { SignalStrengthController.class.getName()).makeSignalStrengthController(this); mSST = mTelephonyComponentFactory.inject(ServiceStateTracker.class.getName()) .makeServiceStateTracker(this, this.mCi, featureFlags); if (hasCalling()) { if (hasCalling() || hasMessaging()) { mEmergencyNumberTracker = mTelephonyComponentFactory .inject(EmergencyNumberTracker.class.getName()).makeEmergencyNumberTracker( this, this.mCi, mFeatureFlags); Loading
src/java/com/android/internal/telephony/Phone.java +7 −0 Original line number Diff line number Diff line Loading @@ -1966,6 +1966,13 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { return TelephonyCapabilities.supportsTelephonyCalling(mFeatureFlags, mContext); } /** * @return true if this device supports messaging, false otherwise. */ public boolean hasMessaging() { return TelephonyCapabilities.supportsTelephonyMessaging(mFeatureFlags, mContext); } /** * Retrieves the EmergencyNumberTracker of the phone instance. */ Loading
src/java/com/android/internal/telephony/TelephonyCapabilities.java +10 −0 Original line number Diff line number Diff line Loading @@ -219,4 +219,14 @@ public class TelephonyCapabilities { return context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_TELEPHONY_CALLING); } /** * @return true if this device supports telephony messaging, false if it does not. */ public static boolean supportsTelephonyMessaging(@NonNull FeatureFlags featureFlags, Context context) { if (!TelephonyCapabilities.minimalTelephonyCdmCheck(featureFlags)) return true; return context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_TELEPHONY_MESSAGING); } }