solve PR issues

This commit is contained in:
CiufudeanDani 2022-05-03 10:44:37 +03:00
parent 6fda464ed8
commit b17ba94950
3 changed files with 218 additions and 451 deletions

View File

@ -102,10 +102,8 @@ public class TCPService extends Service {
/** Stop TCP Connection */
public void stopTCPConnection()
{
if(tcp != null)
{
public void stopTCPConnection() {
if(tcp != null) {
tcp.Stop();
tcp = null;
}

View File

@ -593,18 +593,10 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
// network available
Log.v(TAG, "network available");
Log.v(TAG, "tcp: " + (tcp != null));
// if (tcp == null)
// getApplicationContext().bindService(new Intent(context, TCPService.class), serviceConnection, Context.BIND_AUTO_CREATE);
// if (myService != null)
// tcp = myService.getTCPConnection();
if (tcp != null) {
if (tcp.isConnectionUP) {
if (tcp.isConnectionUP)
tcp.isConnectionUP = false;
tcp.Stop();
}
// tcp = null;
uiHandler.post(() -> {
Log.v(TAG, "myService: " + (myService != null));
@ -614,7 +606,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
getApplicationContext().bindService(new Intent(context, TCPService.class), serviceConnection, Context.BIND_AUTO_CREATE);
if (getRadioActivity() != null)
getRadioActivity().onCreate(getRadioActivity().savedInstanceState);
getRadioActivity().onCreate(getRadioActivity().getSavedInstanceState());
if (getMessageActivity() != null)
getMessageActivity().onCreate(getMessageActivity().getSavedInstanceState());
if (getRecordingsActivity() != null)
@ -817,7 +809,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
if (getHistoryActivity() != null)
getHistoryActivity().setLanguage();
if (getRadioActivity() != null)
getRadioActivity().onCreate(getRadioActivity().savedInstanceState);
getRadioActivity().onCreate(getRadioActivity().getSavedInstanceState());
if (getMessageActivity() != null)
getMessageActivity().onCreate(getMessageActivity().getSavedInstanceState());
if (getRecordingsActivity() != null)
@ -2136,7 +2128,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
getApplicationContext().bindService(new Intent(context, TCPService.class), serviceConnection, Context.BIND_AUTO_CREATE);
if (getRadioActivity() != null)
getRadioActivity().onCreate(getRadioActivity().savedInstanceState);
getRadioActivity().onCreate(getRadioActivity().getSavedInstanceState());
if (getMessageActivity() != null)
getMessageActivity().onCreate(getMessageActivity().getSavedInstanceState());
if (getRecordingsActivity() != null)