Loading src/java/com/android/internal/telephony/cat/CommandParamsFactory.java +9 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -86,6 +87,7 @@ class CommandParamsFactory extends Handler { private static final int MAX_GSM7_DEFAULT_CHARS = 239; private static final int MAX_UCS2_CHARS = 118; private Context mContext; static synchronized CommandParamsFactory getInstance(RilMessageDecoder caller, IccFileHandler fh, Context context) { if (sInstance != null) { Loading @@ -99,6 +101,7 @@ 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( Loading Loading @@ -797,7 +800,12 @@ 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(); Loading src/java/com/android/internal/telephony/cat/ResultException.java +1 −2 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
src/java/com/android/internal/telephony/cat/CommandParamsFactory.java +9 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -86,6 +87,7 @@ class CommandParamsFactory extends Handler { private static final int MAX_GSM7_DEFAULT_CHARS = 239; private static final int MAX_UCS2_CHARS = 118; private Context mContext; static synchronized CommandParamsFactory getInstance(RilMessageDecoder caller, IccFileHandler fh, Context context) { if (sInstance != null) { Loading @@ -99,6 +101,7 @@ 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( Loading Loading @@ -797,7 +800,12 @@ 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(); Loading
src/java/com/android/internal/telephony/cat/ResultException.java +1 −2 Original line number Diff line number Diff line Loading @@ -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 Loading