Skip to content

Commit

Permalink
[android] fix gradle lint issues of the Android App (#3332)
Browse files Browse the repository at this point in the history
  • Loading branch information
wgtdkp authored and pull[bot] committed Nov 27, 2020
1 parent 5897595 commit 1082823
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 104 deletions.
8 changes: 2 additions & 6 deletions src/android/CHIPTool/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".OnOffActivity"
android:exported="false"
android:screenOrientation="portrait"/>

<activity
android:name="com.google.chip.chiptool.commissioner.CommissionerActivity"
android:label="@string/commissioner_name">
android:label="@string/commissioner_name"
android:exported="false">
</activity>
</application>

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ public ThreadNetworkCredential(@NonNull byte[] activeOperationalDataset) {
this.activeOperationalDataset = activeOperationalDataset;
}

protected ThreadNetworkCredential(Parcel in) {
activeOperationalDataset = in.createByteArray();
}

public static final Creator<ThreadNetworkCredential> CREATOR =
new Creator<ThreadNetworkCredential>() {
@Override
public ThreadNetworkCredential createFromParcel(Parcel in) {
return new ThreadNetworkCredential(in);
}

@Override
public ThreadNetworkCredential[] newArray(int size) {
return new ThreadNetworkCredential[size];
}
};

public byte[] getActiveOperationalDataset() {
return activeOperationalDataset;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
errorImage = view.findViewById(R.id.error_image);
statusText = view.findViewById(R.id.status_text);
progressBar = view.findViewById(R.id.commissioning_progress);
progressBar.setMin(0);
progressBar.setMax(100);

view.findViewById(R.id.cancel_button)
.setOnClickListener(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,24 @@ public ThreadNetworkInfoHolder(BorderAgentInfo borderAgent) {
borderAgents.add(borderAgent);
}

protected ThreadNetworkInfoHolder(Parcel in) {
networkInfo = in.readParcelable(ThreadNetworkInfo.class.getClassLoader());
borderAgents = in.createTypedArrayList(BorderAgentInfo.CREATOR);
}

public static final Creator<ThreadNetworkInfoHolder> CREATOR =
new Creator<ThreadNetworkInfoHolder>() {
@Override
public ThreadNetworkInfoHolder createFromParcel(Parcel in) {
return new ThreadNetworkInfoHolder(in);
}

@Override
public ThreadNetworkInfoHolder[] newArray(int size) {
return new ThreadNetworkInfoHolder[size];
}
};

public ThreadNetworkInfo getNetworkInfo() {
return networkInfo;
}
Expand Down
16 changes: 0 additions & 16 deletions src/android/CHIPTool/app/src/main/res/layout/on_off_activity.xml

This file was deleted.

0 comments on commit 1082823

Please sign in to comment.