Skip to content

Commit

Permalink
Fix typo and disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
changliu98 committed Dec 11, 2020
1 parent 8285751 commit c685e14
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.cns.encom"
minSdkVersion 21
targetSdkVersion 30
versionCode 7
versionName "2.1.1"
versionCode 8
versionName "2.1.2"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
10 changes: 7 additions & 3 deletions Android/app/src/main/java/com/cns/encom/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ protected void onCreate(Bundle savedInstanceState) {
}


public void clear_oncliek(View view){
public void clear_onclick(View view){
Toast.makeText(view.getContext(), "Console cleared", Toast.LENGTH_SHORT).show();
TextView logsWindows = findViewById(R.id.textView);
logsWindows.setText("");
Expand Down Expand Up @@ -232,23 +232,27 @@ public void connect_onclick(View view){
}

public void disconnect_onclick(View view) {
TextView logsWindows = findViewById(R.id.textView);

if(connectionUp) {
try{
if (mConnThread != null) {
try {
mConnThread.join();
} catch (InterruptedException e) {
mConnThread.interrupt();
}
}
TextView logsWindows = findViewById(R.id.textView);
logsWindows.append("You have disconnected\n");
TextView indicator_host = findViewById(R.id.Indicator_hostip);
indicator_host.setText("Host: 0.0.0.0");
mConnThread = null;
switchCam = false;
connectionUp = false;
} catch(Exception err){
Log.d("Disconnect", "disconnect_onclick: "+err.getMessage());
logsWindows.append(err.getMessage()+"\n");
}

}

public class connectionThread extends Thread{
Expand Down
2 changes: 1 addition & 1 deletion Android/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="12dp"
android:onClick="clear_oncliek"
android:onClick="clear_onclick"
android:text="@string/button4"
app:layout_constraintBottom_toTopOf="@+id/ip_form"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Software compatibility:
![](https://img.shields.io/badge/-OK-black?style=flat&logo=Firefox&logoColor=ff6611)
![](https://img.shields.io/badge/-OK-black?style=flat&logo=Google%20Chrome&logoColor=4285F4)
![](https://img.shields.io/badge/-OK-black?style=flat&logo=microsoft%20edge&logoColor=0078D7)
![](https://img.shields.io/badge/-OK-black?style=flat&logo=zoom&logoColor=blue)
![](https://img.shields.io/badge/Zoom-OK-black?style=flat&labelColor=black)
![](https://img.shields.io/badge/-OK-black?style=flat&logo=discord&logoColor=7289d9)
![](https://img.shields.io/badge/-INCOMPATIBLE-black?style=flat&logo=skype&logoColor=00aff0)
![](https://img.shields.io/badge/-INCOMPATIBLE-black?style=flat&logo=Telegram)
Expand Down

0 comments on commit c685e14

Please sign in to comment.