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

Commit 13bb6797 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/35620474'] into 25Q2-release.

Change-Id: I9dee6a0a42d01c2e0849b95747385d4b1f8dd993
parents c4041d9e fee68bcd
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import static com.android.internal.telephony.cat.CatCmdMessage.SetupEventListCon
import static com.android.internal.telephony.cat.CatCmdMessage.SetupEventListConstants.LANGUAGE_SELECTION_EVENT;
import static com.android.internal.telephony.cat.CatCmdMessage.SetupEventListConstants.USER_ACTIVITY_EVENT;

import android.app.KeyguardManager;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources.NotFoundException;
@@ -95,6 +96,7 @@ public class CommandParamsFactory extends Handler {
            UUID.fromString("c2b85688-516e-11ee-be56-0242ac120002");
    public static final String NPE_WHEN_CALLED_SEND_CMD_PARAMS_ERROR_MSG =
            "mCaller[RilMessageDecoder] is Null when called SendCmdParams";
    private Context mContext;
    /**
     * Returns a singleton instance of CommandParamsFactory
     * @param caller Class used for queuing raw ril messages, decoding them into
@@ -116,6 +118,7 @@ public class CommandParamsFactory extends Handler {

    private CommandParamsFactory(RilMessageDecoder caller, IccFileHandler fh, Context context) {
        mCaller = caller;
        mContext = context;
        mIconLoader = IconLoader.getInstance(this, fh);
        try {
            mNoAlphaUsrCnf = context.getResources().getBoolean(
@@ -888,7 +891,12 @@ public class CommandParamsFactory extends Handler {
     */
    private boolean processLaunchBrowser(CommandDetails cmdDet,
            List<ComprehensionTlv> ctlvs) throws ResultException {

        KeyguardManager keyguardManager = mContext.getSystemService(KeyguardManager.class);
        if (keyguardManager != null && keyguardManager.isDeviceLocked()) {
            CatLog.d(this, "The device is locked, cannot launch the Browser");
            throw new ResultException(ResultCode.LAUNCH_BROWSER_ERROR,
                    "The device is locked, unable to process the command.");
        }
        CatLog.d(this, "process LaunchBrowser");

        TextMessage confirmMsg = new TextMessage();
+1 −2
Original line number Diff line number Diff line
@@ -34,13 +34,12 @@ public class ResultException extends CatException {
    public ResultException(ResultCode result) {
        super();

        // ETSI TS 102 223, 8.12 -- For the general results '20', '21', '26',
        // ETSI TS 102 223, 8.12 -- For the general results '20', '21',
        // '38', '39', '3A', '3C', and '3D', it is mandatory for the terminal
        // to provide a specific cause value as additional information.
        switch (result) {
            case TERMINAL_CRNTLY_UNABLE_TO_PROCESS:    // 0x20
            case NETWORK_CRNTLY_UNABLE_TO_PROCESS:     // 0x21
            case LAUNCH_BROWSER_ERROR:                 // 0x26
            case MULTI_CARDS_CMD_ERROR:                // 0x38
            case USIM_CALL_CONTROL_PERMANENT:          // 0x39
            case BIP_ERROR:                            // 0x3a