Rename path to endpoint

This commit is contained in:
Laiteux
2025-11-05 20:11:50 +04:00
parent a1b05d907f
commit 62aefb4197

View File

@@ -80,14 +80,14 @@ public class LpaProvider extends ContentProvider
{ {
MatrixCursor rows; MatrixCursor rows;
final String path = uri.getLastPathSegment(); final String endpoint = uri.getLastPathSegment();
final Map<String, String> args = getArgsFromUri(uri); final Map<String, String> args = getArgsFromUri(uri);
boolean[] json = new boolean[1]; boolean[] json = new boolean[1];
if (path == null) if (endpoint == null)
{ {
rows = error("no_path"); rows = error("no_endpoint");
} }
else else
{ {
@@ -109,7 +109,7 @@ public class LpaProvider extends ContentProvider
try try
{ {
rows = switch (path) rows = switch (endpoint)
{ {
// out: string ping=pong // out: string ping=pong
case "ping" -> handlePing(args); case "ping" -> handlePing(args);
@@ -147,7 +147,7 @@ public class LpaProvider extends ContentProvider
// 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 "setNickname" -> handleSetNickname(args); case "setNickname" -> handleSetNickname(args);
default -> error("unknown_path"); default -> error("unknown_endpoint");
}; };
} }
catch (Exception ex) catch (Exception ex)