Skip to content

Commit

Permalink
Move kotlin lib onboardingpayload to package matter (project-chip#29623)
Browse files Browse the repository at this point in the history
* Move kotlin lib onboardingpayload to package matter

* Restyled by google-java-format

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
yufengwangca and restyled-commits authored Oct 16, 2023
1 parent e6f0134 commit a9d7401
Show file tree
Hide file tree
Showing 26 changed files with 96 additions and 96 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/java-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ jobs:
chip.tlv.TlvReadWriteTest \
chip.tlv.TlvReaderTest \
chip.jsontlv.JsonToTlvToJsonTest \
chip.onboardingpayload.ManualCodeTest \
chip.onboardingpayload.QRCodeTest
matter.onboardingpayload.ManualCodeTest \
matter.onboardingpayload.QRCodeTest
- name: Build Java Matter Controller and all clusters app
run: |
scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import chip.onboardingpayload.OnboardingPayload
import chip.onboardingpayload.OnboardingPayloadParser
import chip.onboardingpayload.UnrecognizedQrCodeException
import com.google.chip.chiptool.provisioning.AddressCommissioningFragment
import com.google.chip.chiptool.provisioning.DeviceProvisioningFragment
import com.google.chip.chiptool.provisioning.EnterNetworkFragment
Expand All @@ -40,6 +37,9 @@ import com.google.chip.chiptool.setuppayloadscanner.CHIPDeviceDetailsFragment
import com.google.chip.chiptool.setuppayloadscanner.CHIPDeviceInfo
import com.google.chip.chiptool.setuppayloadscanner.CHIPLedgerDetailsFragment
import com.google.chip.chiptool.util.DeviceIdUtil
import matter.onboardingpayload.OnboardingPayload
import matter.onboardingpayload.OnboardingPayloadParser
import matter.onboardingpayload.UnrecognizedQrCodeException
import org.json.JSONObject

class CHIPToolActivity :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ import androidx.camera.lifecycle.ProcessCameraProvider
import androidx.core.content.ContextCompat
import androidx.core.content.ContextCompat.checkSelfPermission
import androidx.fragment.app.Fragment
import chip.onboardingpayload.OnboardingPayloadParser
import chip.onboardingpayload.UnrecognizedQrCodeException
import com.google.chip.chiptool.R
import com.google.chip.chiptool.SelectActionFragment
import com.google.chip.chiptool.databinding.BarcodeFragmentBinding
Expand All @@ -50,6 +48,8 @@ import java.util.concurrent.Executors
import kotlin.math.abs
import kotlin.math.max
import kotlin.math.min
import matter.onboardingpayload.OnboardingPayloadParser
import matter.onboardingpayload.UnrecognizedQrCodeException

/** Launches the camera to scan for QR code. */
class BarcodeFragment : Fragment() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
package com.google.chip.chiptool.setuppayloadscanner

import android.os.Parcelable
import chip.onboardingpayload.DiscoveryCapability
import chip.onboardingpayload.OnboardingPayload
import kotlinx.parcelize.Parcelize
import matter.onboardingpayload.DiscoveryCapability
import matter.onboardingpayload.OnboardingPayload

/** Class to hold the CHIP device information. */
@Parcelize
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.google.chip.chiptool.setuppayloadscanner

import android.os.Parcelable
import chip.onboardingpayload.OptionalQRCodeInfoType
import kotlinx.parcelize.Parcelize
import matter.onboardingpayload.OptionalQRCodeInfoType

@Parcelize
data class QrCodeInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
import android.widget.SeekBar;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import chip.onboardingpayload.DiscoveryCapability;
import chip.onboardingpayload.OnboardingPayload;
import chip.onboardingpayload.OnboardingPayloadException;
import chip.onboardingpayload.OnboardingPayloadParser;
import com.matter.tv.server.QRUtils;
import com.matter.tv.server.R;
import com.matter.tv.server.service.MatterServant;
import java.util.HashSet;
import matter.onboardingpayload.DiscoveryCapability;
import matter.onboardingpayload.OnboardingPayload;
import matter.onboardingpayload.OnboardingPayloadException;
import matter.onboardingpayload.OnboardingPayloadParser;

/**
* A simple {@link Fragment} subclass. Use the {@link QrCodeFragment#newInstance} factory method to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.matter.virtual.device.app.core.matter

import chip.onboardingpayload.OnboardingPayloadException
import chip.onboardingpayload.OnboardingPayloadParser
import com.matter.virtual.device.app.core.matter.model.asSetupPayload
import com.matter.virtual.device.app.core.model.Payload
import javax.inject.Inject
import javax.inject.Singleton
import matter.onboardingpayload.OnboardingPayloadException
import matter.onboardingpayload.OnboardingPayloadParser
import timber.log.Timber

@Singleton
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.matter.virtual.device.app.core.matter.model

import chip.onboardingpayload.DiscoveryCapability
import chip.onboardingpayload.OnboardingPayload
import com.matter.virtual.device.app.core.common.MatterConstants
import com.matter.virtual.device.app.core.model.OnboardingType
import com.matter.virtual.device.app.core.model.Payload
import matter.onboardingpayload.DiscoveryCapability
import matter.onboardingpayload.OnboardingPayload
import timber.log.Timber

fun Payload.asSetupPayload(): OnboardingPayload {
Expand Down
Loading

0 comments on commit a9d7401

Please sign in to comment.