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

Commit a49fc068 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5264762 from c472eeef to qt-release

Change-Id: If0fff2cfe32b5825d40245c7a03257e1f8cd7c68
parents 5de606b4 c472eeef
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -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;
@@ -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.
 *
@@ -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.
     */
+7 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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;
        }

+20 −11
Original line number Diff line number Diff line
@@ -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();
@@ -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 = "";
@@ -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();
@@ -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();
@@ -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;
@@ -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+");
@@ -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);
@@ -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);
    }

    /**
+9 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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)) {
+1 −1
Original line number Diff line number Diff line
@@ -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