diff --git a/src/im/angry/openeuicc/bridge/LpaBridgeProvider.java b/src/im/angry/openeuicc/bridge/LpaBridgeProvider.java index 8c6a5d8..e077422 100644 --- a/src/im/angry/openeuicc/bridge/LpaBridgeProvider.java +++ b/src/im/angry/openeuicc/bridge/LpaBridgeProvider.java @@ -106,11 +106,6 @@ public class LpaBridgeProvider extends ContentProvider // out (many, can be empty): string iccid, bool isEnabled, string name, string nickname rows = handleGetProfiles(args); break; - case "activeProfile": - // in: int slotId, int portId - // out (single, can be empty): string iccid, bool isEnabled, string name, string nickname - rows = handleGetActiveProfile(args); - break; case "downloadProfile": // in: int slotId, int portId, (either {string activationCode} or {string address, string? matchingId}), string? confirmationCode, string? imei // out (single, can be empty): string iccid, bool isEnabled, string name, string nickname @@ -131,11 +126,6 @@ public class LpaBridgeProvider extends ContentProvider // out: bool success rows = handleDisableProfile(args); break; - case "disableActiveProfile": - // in: int slotId, int portId, bool refresh=true - // out: bool success - rows = handleDisableActiveProfile(args); - break; case "switchProfile": // in: int slotId, int portId, string iccid, bool enable=true, bool refresh=true // out: bool success @@ -245,22 +235,6 @@ public class LpaBridgeProvider extends ContentProvider return profiles(profiles); } - private MatrixCursor handleGetActiveProfile(Map args) throws Exception - { - List profiles = withEuiccChannel - ( - args, - (channel, _) -> channel.getLpa().getProfiles() - ); - - var enabledProfile = LPAUtilsKt.getEnabled(profiles); - - if (enabledProfile == null) - return empty(); - - return profile(enabledProfile); - } - private MatrixCursor handleDownloadProfile(Map args) throws Exception { String[] address = new String[1]; @@ -421,41 +395,6 @@ public class LpaBridgeProvider extends ContentProvider return success(success); } - private MatrixCursor handleDisableActiveProfile(Map args) throws Exception - { - boolean[] refresh = new boolean[1]; - - if (!tryGetArgAsBoolean(args, "refresh", refresh)) - refresh[0] = true; - - String iccid = withEuiccChannel - ( - args, - (channel, _) -> LPAUtilsKt.disableActiveProfileKeepIccId(channel.getLpa(), refresh[0]) - ); - - return success(); - - // if (iccid == null) - // return empty(); - - // List profiles = withEuiccChannel - // ( - // args, - // (channel, _) -> channel.getLpa().getProfiles() - // ); - - // var profile = profiles.stream() - // .filter(p -> iccid.equals(p.getIccid())) - // .findFirst() - // .get(); - - // if (profile == null) - // return empty(); - - // return profile(profile); - } - private MatrixCursor handleSwitchProfile(Map args) throws Exception { String[] iccid = new String[1];