Loading src/java/com/android/internal/telephony/AppSmsManager.java +25 −1 Original line number Diff line number Diff line Loading @@ -20,10 +20,16 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.app.AppOpsManager; import android.app.PendingIntent; import android.app.role.IRoleManager; import android.content.Context; import android.content.Intent; import android.os.Binder; import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceManager.ServiceNotFoundException; import android.provider.Telephony.Sms.Intents; import android.telephony.IFinancialSmsCallback; import android.telephony.SmsManager; import android.telephony.SmsMessage; import android.telephony.SubscriptionManager; Loading @@ -42,7 +48,7 @@ import java.util.concurrent.TimeUnit; /** * Manager for app specific incoming SMS requests. This can be used to implement SMS based * Manager for app specific SMS requests. This can be used to implement SMS based * communication channels (e.g. for SMS based phone number verification) without needing the * {@link Manifest.permission#RECEIVE_SMS} permission. * Loading Loading @@ -140,6 +146,24 @@ public class AppSmsManager { return token; } /** * Get filtered SMS messages for financial app. */ public void getSmsMessagesForFinancialApp( String callingPkg, Bundle params, final IFinancialSmsCallback callback) { try { IRoleManager roleManager = IRoleManager.Stub.asInterface( ServiceManager.getServiceOrThrow(Context.ROLE_SERVICE)); roleManager.getSmsMessagesForFinancialApp(callingPkg, params, callback); } catch (RemoteException e) { Log.e(LOG_TAG, "Receive RemoteException."); // do nothing } catch (ServiceNotFoundException e) { Log.e(LOG_TAG, "Service not found."); // do nothing } } /** * Handle an incoming SMS_DELIVER_ACTION intent if it is an app-only SMS. */ Loading src/java/com/android/internal/telephony/LocaleTracker.java +7 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.telephony.CellInfoLte; import android.telephony.CellInfoWcdma; import android.telephony.Rlog; import android.telephony.ServiceState; import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.LocalLog; Loading Loading @@ -434,6 +435,12 @@ public class LocaleTracker extends Handler { // broadcast on forbidden channels. ((WifiManager) mPhone.getContext().getSystemService(Context.WIFI_SERVICE)) .setCountryCode(countryIso); Intent intent = new Intent(TelephonyManager.ACTION_NETWORK_COUNTRY_CHANGED); intent.putExtra(TelephonyManager.EXTRA_NETWORK_COUNTRY, countryIso); SubscriptionManager.putPhoneIdAndSubIdExtra(intent, mPhone.getPhoneId()); mPhone.getContext().sendBroadcast(intent); countryChanged = true; } Loading src/java/com/android/internal/telephony/RIL.java +20 −11 Original line number Diff line number Diff line Loading @@ -1335,8 +1335,8 @@ public class RIL extends BaseCommands implements CommandsInterface { dpi.profileId = dp.getProfileId(); dpi.apn = dp.getApn(); dpi.protocol = dp.getProtocol(); dpi.roamingProtocol = dp.getRoamingProtocol(); dpi.protocol = ApnSetting.getProtocolStringFromInt(dp.getProtocol()); dpi.roamingProtocol = ApnSetting.getProtocolStringFromInt(dp.getRoamingProtocol()); dpi.authType = dp.getAuthType(); dpi.user = dp.getUserName(); dpi.password = dp.getPassword(); Loading @@ -1346,7 +1346,11 @@ public class RIL extends BaseCommands implements CommandsInterface { dpi.waitTime = dp.getWaitTime(); dpi.enabled = dp.isEnabled(); dpi.supportedApnTypesBitmap = dp.getSupportedApnTypesBitmap(); dpi.bearerBitmap = dp.getBearerBitmap(); // Shift by 1 bit due to the discrepancy between // android.hardware.radio.V1_0.RadioAccessFamily and the bitmask version of // ServiceState.RIL_RADIO_TECHNOLOGY_XXXX. dpi.bearerBitmap = ServiceState.convertNetworkTypeBitmaskToBearerBitmask( dp.getBearerBitmap()) << 1; dpi.mtu = dp.getMtu(); dpi.mvnoType = MvnoType.NONE; dpi.mvnoMatchData = ""; Loading @@ -1365,8 +1369,8 @@ public class RIL extends BaseCommands implements CommandsInterface { new android.hardware.radio.V1_4.DataProfileInfo(); dpi.apn = dp.getApn(); dpi.protocol = ApnSetting.getProtocolIntFromString(dp.getProtocol()); dpi.roamingProtocol = ApnSetting.getProtocolIntFromString(dp.getRoamingProtocol()); dpi.protocol = dp.getProtocol(); dpi.roamingProtocol = dp.getRoamingProtocol(); dpi.authType = dp.getAuthType(); dpi.user = dp.getUserName(); dpi.password = dp.getPassword(); Loading @@ -1376,7 +1380,11 @@ public class RIL extends BaseCommands implements CommandsInterface { dpi.waitTime = dp.getWaitTime(); dpi.enabled = dp.isEnabled(); dpi.supportedApnTypesBitmap = dp.getSupportedApnTypesBitmap(); dpi.bearerBitmap = dp.getBearerBitmap(); // Shift by 1 bit due to the discrepancy between // android.hardware.radio.V1_0.RadioAccessFamily and the bitmask version of // ServiceState.RIL_RADIO_TECHNOLOGY_XXXX. dpi.bearerBitmap = ServiceState.convertNetworkTypeBitmaskToBearerBitmask( dp.getBearerBitmap()) << 1; dpi.mtu = dp.getMtu(); dpi.persistent = dp.isPersistent(); dpi.preferred = dp.isPreferred(); Loading Loading @@ -5677,7 +5685,8 @@ public class RIL extends BaseCommands implements CommandsInterface { if (dcResult == null) return null; int status, suggestedRetryTime, cid, active, mtu; String type, ifname; String ifname; int protocolType; String[] addresses = null; String[] dnses = null; String[] gateways = null; Loading @@ -5689,7 +5698,7 @@ public class RIL extends BaseCommands implements CommandsInterface { suggestedRetryTime = result.suggestedRetryTime; cid = result.cid; active = result.active; type = result.type; protocolType = ApnSetting.getProtocolIntFromString(result.type); ifname = result.ifname; if (!TextUtils.isEmpty(result.addresses)) { addresses = result.addresses.split("\\s+"); Loading @@ -5709,7 +5718,7 @@ public class RIL extends BaseCommands implements CommandsInterface { suggestedRetryTime = result.suggestedRetryTime; cid = result.cid; active = result.active; type = ApnSetting.getProtocolStringFromInt(result.type); protocolType = result.type; ifname = result.ifname; addresses = result.addresses.stream().toArray(String[]::new); dnses = result.dnses.stream().toArray(String[]::new); Loading Loading @@ -5776,8 +5785,8 @@ public class RIL extends BaseCommands implements CommandsInterface { } } return new DataCallResponse(status, suggestedRetryTime, cid, active, type, ifname, laList, dnsList, gatewayList, pcscfs, mtu); return new DataCallResponse(status, suggestedRetryTime, cid, active, protocolType, ifname, laList, dnsList, gatewayList, pcscfs, mtu); } /** Loading src/java/com/android/internal/telephony/UiccSmsController.java +9 −0 Original line number Diff line number Diff line Loading @@ -26,8 +26,10 @@ import android.app.PendingIntent; import android.content.Context; import android.net.Uri; import android.os.Binder; import android.os.Bundle; import android.os.ServiceManager; import android.provider.Telephony.Sms.Intents; import android.telephony.IFinancialSmsCallback; import android.telephony.Rlog; import android.telephony.SmsManager; import android.telephony.SubscriptionInfo; Loading Loading @@ -407,6 +409,13 @@ public class UiccSmsController extends ISmsImplBase { return getPhone(subId).getAppSmsManager().createAppSpecificSmsToken(callingPkg, intent); } @Override public void getSmsMessagesForFinancialApp( int subId, String callingPkg, Bundle params, IFinancialSmsCallback callback) { getPhone(subId).getAppSmsManager().getSmsMessagesForFinancialApp( callingPkg, params, callback); } @Override protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { if (!checkDumpPermission(mContext, LOG_TAG, pw)) { Loading src/java/com/android/internal/telephony/dataconnection/DataConnection.java +1 −1 Original line number Diff line number Diff line Loading @@ -543,7 +543,7 @@ public class DataConnection extends StateMachine { if (mDcTesterFailBringUpAll.getDcFailBringUp().mCounter > 0) { DataCallResponse response = new DataCallResponse( mDcTesterFailBringUpAll.getDcFailBringUp().mFailCause, mDcTesterFailBringUpAll.getDcFailBringUp().mSuggestedRetryTime, 0, 0, "", "", mDcTesterFailBringUpAll.getDcFailBringUp().mSuggestedRetryTime, 0, 0, 0, "", null, null, null, null, PhoneConstants.UNSET_MTU); Message msg = obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE, cp); Loading Loading
src/java/com/android/internal/telephony/AppSmsManager.java +25 −1 Original line number Diff line number Diff line Loading @@ -20,10 +20,16 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.app.AppOpsManager; import android.app.PendingIntent; import android.app.role.IRoleManager; import android.content.Context; import android.content.Intent; import android.os.Binder; import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceManager.ServiceNotFoundException; import android.provider.Telephony.Sms.Intents; import android.telephony.IFinancialSmsCallback; import android.telephony.SmsManager; import android.telephony.SmsMessage; import android.telephony.SubscriptionManager; Loading @@ -42,7 +48,7 @@ import java.util.concurrent.TimeUnit; /** * Manager for app specific incoming SMS requests. This can be used to implement SMS based * Manager for app specific SMS requests. This can be used to implement SMS based * communication channels (e.g. for SMS based phone number verification) without needing the * {@link Manifest.permission#RECEIVE_SMS} permission. * Loading Loading @@ -140,6 +146,24 @@ public class AppSmsManager { return token; } /** * Get filtered SMS messages for financial app. */ public void getSmsMessagesForFinancialApp( String callingPkg, Bundle params, final IFinancialSmsCallback callback) { try { IRoleManager roleManager = IRoleManager.Stub.asInterface( ServiceManager.getServiceOrThrow(Context.ROLE_SERVICE)); roleManager.getSmsMessagesForFinancialApp(callingPkg, params, callback); } catch (RemoteException e) { Log.e(LOG_TAG, "Receive RemoteException."); // do nothing } catch (ServiceNotFoundException e) { Log.e(LOG_TAG, "Service not found."); // do nothing } } /** * Handle an incoming SMS_DELIVER_ACTION intent if it is an app-only SMS. */ Loading
src/java/com/android/internal/telephony/LocaleTracker.java +7 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.telephony.CellInfoLte; import android.telephony.CellInfoWcdma; import android.telephony.Rlog; import android.telephony.ServiceState; import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.LocalLog; Loading Loading @@ -434,6 +435,12 @@ public class LocaleTracker extends Handler { // broadcast on forbidden channels. ((WifiManager) mPhone.getContext().getSystemService(Context.WIFI_SERVICE)) .setCountryCode(countryIso); Intent intent = new Intent(TelephonyManager.ACTION_NETWORK_COUNTRY_CHANGED); intent.putExtra(TelephonyManager.EXTRA_NETWORK_COUNTRY, countryIso); SubscriptionManager.putPhoneIdAndSubIdExtra(intent, mPhone.getPhoneId()); mPhone.getContext().sendBroadcast(intent); countryChanged = true; } Loading
src/java/com/android/internal/telephony/RIL.java +20 −11 Original line number Diff line number Diff line Loading @@ -1335,8 +1335,8 @@ public class RIL extends BaseCommands implements CommandsInterface { dpi.profileId = dp.getProfileId(); dpi.apn = dp.getApn(); dpi.protocol = dp.getProtocol(); dpi.roamingProtocol = dp.getRoamingProtocol(); dpi.protocol = ApnSetting.getProtocolStringFromInt(dp.getProtocol()); dpi.roamingProtocol = ApnSetting.getProtocolStringFromInt(dp.getRoamingProtocol()); dpi.authType = dp.getAuthType(); dpi.user = dp.getUserName(); dpi.password = dp.getPassword(); Loading @@ -1346,7 +1346,11 @@ public class RIL extends BaseCommands implements CommandsInterface { dpi.waitTime = dp.getWaitTime(); dpi.enabled = dp.isEnabled(); dpi.supportedApnTypesBitmap = dp.getSupportedApnTypesBitmap(); dpi.bearerBitmap = dp.getBearerBitmap(); // Shift by 1 bit due to the discrepancy between // android.hardware.radio.V1_0.RadioAccessFamily and the bitmask version of // ServiceState.RIL_RADIO_TECHNOLOGY_XXXX. dpi.bearerBitmap = ServiceState.convertNetworkTypeBitmaskToBearerBitmask( dp.getBearerBitmap()) << 1; dpi.mtu = dp.getMtu(); dpi.mvnoType = MvnoType.NONE; dpi.mvnoMatchData = ""; Loading @@ -1365,8 +1369,8 @@ public class RIL extends BaseCommands implements CommandsInterface { new android.hardware.radio.V1_4.DataProfileInfo(); dpi.apn = dp.getApn(); dpi.protocol = ApnSetting.getProtocolIntFromString(dp.getProtocol()); dpi.roamingProtocol = ApnSetting.getProtocolIntFromString(dp.getRoamingProtocol()); dpi.protocol = dp.getProtocol(); dpi.roamingProtocol = dp.getRoamingProtocol(); dpi.authType = dp.getAuthType(); dpi.user = dp.getUserName(); dpi.password = dp.getPassword(); Loading @@ -1376,7 +1380,11 @@ public class RIL extends BaseCommands implements CommandsInterface { dpi.waitTime = dp.getWaitTime(); dpi.enabled = dp.isEnabled(); dpi.supportedApnTypesBitmap = dp.getSupportedApnTypesBitmap(); dpi.bearerBitmap = dp.getBearerBitmap(); // Shift by 1 bit due to the discrepancy between // android.hardware.radio.V1_0.RadioAccessFamily and the bitmask version of // ServiceState.RIL_RADIO_TECHNOLOGY_XXXX. dpi.bearerBitmap = ServiceState.convertNetworkTypeBitmaskToBearerBitmask( dp.getBearerBitmap()) << 1; dpi.mtu = dp.getMtu(); dpi.persistent = dp.isPersistent(); dpi.preferred = dp.isPreferred(); Loading Loading @@ -5677,7 +5685,8 @@ public class RIL extends BaseCommands implements CommandsInterface { if (dcResult == null) return null; int status, suggestedRetryTime, cid, active, mtu; String type, ifname; String ifname; int protocolType; String[] addresses = null; String[] dnses = null; String[] gateways = null; Loading @@ -5689,7 +5698,7 @@ public class RIL extends BaseCommands implements CommandsInterface { suggestedRetryTime = result.suggestedRetryTime; cid = result.cid; active = result.active; type = result.type; protocolType = ApnSetting.getProtocolIntFromString(result.type); ifname = result.ifname; if (!TextUtils.isEmpty(result.addresses)) { addresses = result.addresses.split("\\s+"); Loading @@ -5709,7 +5718,7 @@ public class RIL extends BaseCommands implements CommandsInterface { suggestedRetryTime = result.suggestedRetryTime; cid = result.cid; active = result.active; type = ApnSetting.getProtocolStringFromInt(result.type); protocolType = result.type; ifname = result.ifname; addresses = result.addresses.stream().toArray(String[]::new); dnses = result.dnses.stream().toArray(String[]::new); Loading Loading @@ -5776,8 +5785,8 @@ public class RIL extends BaseCommands implements CommandsInterface { } } return new DataCallResponse(status, suggestedRetryTime, cid, active, type, ifname, laList, dnsList, gatewayList, pcscfs, mtu); return new DataCallResponse(status, suggestedRetryTime, cid, active, protocolType, ifname, laList, dnsList, gatewayList, pcscfs, mtu); } /** Loading
src/java/com/android/internal/telephony/UiccSmsController.java +9 −0 Original line number Diff line number Diff line Loading @@ -26,8 +26,10 @@ import android.app.PendingIntent; import android.content.Context; import android.net.Uri; import android.os.Binder; import android.os.Bundle; import android.os.ServiceManager; import android.provider.Telephony.Sms.Intents; import android.telephony.IFinancialSmsCallback; import android.telephony.Rlog; import android.telephony.SmsManager; import android.telephony.SubscriptionInfo; Loading Loading @@ -407,6 +409,13 @@ public class UiccSmsController extends ISmsImplBase { return getPhone(subId).getAppSmsManager().createAppSpecificSmsToken(callingPkg, intent); } @Override public void getSmsMessagesForFinancialApp( int subId, String callingPkg, Bundle params, IFinancialSmsCallback callback) { getPhone(subId).getAppSmsManager().getSmsMessagesForFinancialApp( callingPkg, params, callback); } @Override protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { if (!checkDumpPermission(mContext, LOG_TAG, pw)) { Loading
src/java/com/android/internal/telephony/dataconnection/DataConnection.java +1 −1 Original line number Diff line number Diff line Loading @@ -543,7 +543,7 @@ public class DataConnection extends StateMachine { if (mDcTesterFailBringUpAll.getDcFailBringUp().mCounter > 0) { DataCallResponse response = new DataCallResponse( mDcTesterFailBringUpAll.getDcFailBringUp().mFailCause, mDcTesterFailBringUpAll.getDcFailBringUp().mSuggestedRetryTime, 0, 0, "", "", mDcTesterFailBringUpAll.getDcFailBringUp().mSuggestedRetryTime, 0, 0, 0, "", null, null, null, null, PhoneConstants.UNSET_MTU); Message msg = obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE, cp); Loading