Skip to content

Commit

Permalink
Restyled by google-java-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and yunhanw-google committed Aug 16, 2023
1 parent 3d2a9ee commit 47fb385
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ class MultiAdminClientFragment : Fragment() {
ADMINISTRATOR_COMMISSIONING_CLUSTER_ENDPOINT_ID,
AdministratorCommissioning.ID,
AdministratorCommissioning.Command.RevokeCommissioning.id,
tlvWriter.getEncoded()
tlvWriter.getEncoded(),
null
)

deviceController.invoke(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ class OnOffClientFragment : Fragment() {
addressUpdateFragment.endpointId,
LevelControl.ID,
LevelControl.Command.MoveToLevel.id,
tlvWriter.getEncoded()
tlvWriter.getEncoded(),
null
)

deviceController.invoke(
Expand Down Expand Up @@ -292,7 +293,8 @@ class OnOffClientFragment : Fragment() {
addressUpdateFragment.endpointId,
OnOff.ID,
commandId.id,
tlvWriter.getEncoded()
tlvWriter.getEncoded(),
null
)

deviceController.invoke(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ class OpCredClientFragment : Fragment() {
addressUpdateFragment.endpointId,
OperationalCredentials.ID,
OperationalCredentials.Command.RemoveFabric.id,
tlvWriter.getEncoded()
tlvWriter.getEncoded(),
null
)

deviceController.invoke(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ class WildcardFragment : Fragment() {
}
tlvWriter.endStructure()
val invokeElement =
InvokeElement.newInstance(endpointId, clusterId, commandId, tlvWriter.getEncoded())
InvokeElement.newInstance(endpointId, clusterId, commandId, tlvWriter.getEncoded(), null)
deviceController.invoke(
invokeCallback,
ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ class PairOnNetworkLongImInvokeCommand(
/* endpointId= */ 0,
CLUSTER_ID_IDENTIFY,
IDENTIFY_COMMAND,
tlvWriter.getEncoded()
tlvWriter.getEncoded(),
null
)

currentCommissioner()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ public JSONObject getJson() {

@Nullable
public String getJsonString() {
if (json == null)
return null;
if (json == null) return null;
return json.toString();
}

Expand Down Expand Up @@ -133,7 +132,8 @@ public String toString() {

public static AttributeWriteRequest newInstance(
ChipPathId endpointId, ChipPathId clusterId, ChipPathId attributeId, byte[] tlv) {
return new AttributeWriteRequest(endpointId, clusterId, attributeId, tlv, null, Optional.empty());
return new AttributeWriteRequest(
endpointId, clusterId, attributeId, tlv, null, Optional.empty());
}

public static AttributeWriteRequest newInstance(
Expand All @@ -159,11 +159,7 @@ public static AttributeWriteRequest newInstance(

/** Create a new {@link AttributeWriteRequest} with only concrete ids. */
public static AttributeWriteRequest newInstance(
int endpointId,
long clusterId,
long attributeId,
byte[] tlv,
Optional<Integer> dataVersion) {
int endpointId, long clusterId, long attributeId, byte[] tlv, Optional<Integer> dataVersion) {
return new AttributeWriteRequest(
ChipPathId.forId(endpointId),
ChipPathId.forId(clusterId),
Expand All @@ -174,20 +170,14 @@ public static AttributeWriteRequest newInstance(
}

public static AttributeWriteRequest newInstance(
ChipPathId endpointId,
ChipPathId clusterId,
ChipPathId attributeId,
String jsonString) {
ChipPathId endpointId, ChipPathId clusterId, ChipPathId attributeId, String jsonString) {
return new AttributeWriteRequest(
endpointId, clusterId, attributeId, null, jsonString, Optional.empty());
}

/** Create a new {@link AttributeWriteRequest} with only concrete ids. */
public static AttributeWriteRequest newInstance(
int endpointId,
long clusterId,
long attributeId,
String jsonString) {
int endpointId, long clusterId, long attributeId, String jsonString) {
return new AttributeWriteRequest(
ChipPathId.forId(endpointId),
ChipPathId.forId(clusterId),
Expand All @@ -198,13 +188,13 @@ public static AttributeWriteRequest newInstance(
}

public static AttributeWriteRequest newInstance(
ChipPathId endpointId,
ChipPathId clusterId,
ChipPathId attributeId,
String jsonString,
Optional<Integer> dataVersion) {
return new AttributeWriteRequest(
endpointId, clusterId, attributeId, null, jsonString, dataVersion);
ChipPathId endpointId,
ChipPathId clusterId,
ChipPathId attributeId,
String jsonString,
Optional<Integer> dataVersion) {
return new AttributeWriteRequest(
endpointId, clusterId, attributeId, null, jsonString, dataVersion);
}

/** Create a new {@link AttributeWriteRequest} with only concrete ids. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,43 +119,23 @@ public static InvokeElement newInstance(
ChipPathId endpointId,
ChipPathId clusterId,
ChipPathId commandId,
byte[] tlv) {
return new InvokeElement(endpointId, clusterId, commandId, tlv, null);
}

/** Create a new {@link InvokeElement} with only concrete ids. */
public static InvokeElement newInstance(
int endpointId,
long clusterId,
long commandId,
byte[] tlv) {
return new InvokeElement(
ChipPathId.forId(endpointId),
ChipPathId.forId(clusterId),
ChipPathId.forId(commandId),
tlv,
null);
}

public static InvokeElement newInstance(
ChipPathId endpointId,
ChipPathId clusterId,
ChipPathId commandId,
String jsonString) {
return new InvokeElement(endpointId, clusterId, commandId, null, jsonString);
@Nullable byte[] tlv,
@Nullable String jsonString) {
return new InvokeElement(endpointId, clusterId, commandId, tlv, jsonString);
}

/** Create a new {@link InvokeElement} with only concrete ids. */
public static InvokeElement newInstance(
int endpointId,
long clusterId,
long commandId,
String jsonString) {
@Nullable byte[] tlv,
@Nullable String jsonString) {
return new InvokeElement(
ChipPathId.forId(endpointId),
ChipPathId.forId(clusterId),
ChipPathId.forId(commandId),
null,
tlv,
jsonString);
}
}

0 comments on commit 47fb385

Please sign in to comment.