Remove /switchProfile (not what I expected, just a toggle)

This commit is contained in:
Laiteux
2025-11-06 21:02:04 +04:00
parent 3c1dc93490
commit 77920f04e1

View File

@@ -140,9 +140,6 @@ public class LpaProvider extends ContentProvider
// in: int slotId, int portId, bool refresh=true // in: int slotId, int portId, bool refresh=true
// out: bool success // out: bool success
case "disableActiveProfile" -> handleDisableActiveProfile(args); case "disableActiveProfile" -> handleDisableActiveProfile(args);
// in: int slotId, int portId, string iccid, bool enable=true, bool refresh=true
// out: bool success
case "switchProfile" -> handleSwitchProfile(args);
// in: int slotId, int portId, string iccid, string nickname // in: int slotId, int portId, string iccid, string nickname
// out: bool success // out: bool success
case "setProfileNickname" -> handleSetProfileNickname(args); case "setProfileNickname" -> handleSetProfileNickname(args);
@@ -521,30 +518,6 @@ public class LpaProvider extends ContentProvider
// return profile(profile); // return profile(profile);
} }
private MatrixCursor handleSwitchProfile(Map<String, String> args) throws Exception
{
String[] iccid = new String[1];
boolean[] enable = new boolean[1];
boolean[] refresh = new boolean[1];
if (!tryGetArgAsString(args, "iccid", iccid))
return missingArgError("iccid");
if (!tryGetArgAsBoolean(args, "enable", enable))
enable[0] = true;
if (!tryGetArgAsBoolean(args, "refresh", refresh))
refresh[0] = true;
boolean success = withEuiccChannel
(
args,
(channel, _) -> LPAUtilsKt.switchProfile(channel.getLpa(), iccid[0], enable[0], refresh[0])
);
return success(success);
}
private MatrixCursor handleSetProfileNickname(Map<String, String> args) throws Exception private MatrixCursor handleSetProfileNickname(Map<String, String> args) throws Exception
{ {
String[] iccid = new String[1]; String[] iccid = new String[1];