Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLiuZhuoCheng committed Oct 29, 2021
1 parent e5ff0d5 commit 1c859a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.google.chip.chiptool.clusterclient.clusterinteraction

import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand All @@ -17,11 +16,9 @@ import kotlinx.coroutines.Job
import kotlinx.coroutines.cancel

/**
* ClusterDetailFragment is the next displayed fragment after clicking on the list of available
* endpoints. ClusterDetailFragment allows user to pick cluster, command, specify parameters and see
* ClusterDetailFragment allows user to pick cluster, command, specify parameters and see
* the callback result.
*/

class ClusterDetailFragment : Fragment(){
private val deviceController: ChipDeviceController
get() = ChipClient.getDeviceController(requireContext())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ class ClusterInteractionFragment : Fragment() {
private val scope = CoroutineScope(Dispatchers.Main + Job())
private lateinit var addressUpdateFragment: AddressUpdateFragment
private lateinit var clusterMap: Map<String, ClusterInfo>
private var devicePtr = 0L


override fun onCreateView(
inflater: LayoutInflater,
Expand All @@ -42,8 +40,6 @@ class ClusterInteractionFragment : Fragment() {
deviceController.setCompletionListener(ChipControllerCallback())
getEndpointListBtn.setOnClickListener {
scope.launch {
devicePtr =
ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId)
showMessage("Retrieving endpoints")
endpointList.visibility = View.VISIBLE
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import androidx.recyclerview.widget.RecyclerView
import com.google.chip.chiptool.R

/**
* EndpointAdapter implements the endpointList(RecycleView) Adapter
* EndpointAdapter implements the endpointList(RecycleView) Adapter and associates different
* endpoint with the same onClick function provided in [ClusterInteractionFragment.EndpointListener]
*/
class EndpointAdapter(
private val endpointList: List<EndpointItem>,
private val listener: OnItemClickListener

) : RecyclerView.Adapter<EndpointAdapter.EndpointViewHolder>() {

inner class EndpointViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView),
Expand Down

0 comments on commit 1c859a5

Please sign in to comment.