#SD-207 - send more data for ack to occur
This commit is contained in:
parent
2540b5f511
commit
8127caa949
@ -155,12 +155,12 @@ public abstract class AbstractSDParentActivity extends TabActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean sendAlarmAcknowledge(int alarm_id, int type)
|
public boolean sendAlarmAcknowledge(int alarm_id, int type, String unitName)
|
||||||
{
|
{
|
||||||
if(tcp == null)
|
if(tcp == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
boolean res = tcp.Write("0.0", "#28#" + alarm_id + "#" + type + "#");
|
boolean res = tcp.Write("0.0", "#28#" + alarm_id + "#" + type + "#" + AppParams.USERID + "#" + unitName + "#");
|
||||||
if(res)
|
if(res)
|
||||||
SM.Debug("Message [sendAlarmAcknowledge] sent to app server alarm_id:" + alarm_id + " type:" + type);
|
SM.Debug("Message [sendAlarmAcknowledge] sent to app server alarm_id:" + alarm_id + " type:" + type);
|
||||||
else
|
else
|
||||||
|
@ -3,7 +3,6 @@ package com.safemobile.dispatch;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
/** fix import*/
|
|
||||||
import com.safemobile.adapters.AlertGridViewAdapter;
|
import com.safemobile.adapters.AlertGridViewAdapter;
|
||||||
import com.safemobile.adapters.AlertGridViewAdapter.ViewHolder;
|
import com.safemobile.adapters.AlertGridViewAdapter.ViewHolder;
|
||||||
|
|
||||||
@ -15,11 +14,11 @@ import com.safemobile.lib.SM;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@ -28,232 +27,213 @@ import android.widget.GridView;
|
|||||||
|
|
||||||
public class AlarmActivity extends Activity {
|
public class AlarmActivity extends Activity {
|
||||||
private Context context;
|
private Context context;
|
||||||
public TabLayoutActivity parentTab;
|
private TabLayoutActivity parentTab;
|
||||||
public ArrayList<Alarm> allAlarms = new ArrayList<Alarm>();
|
private ArrayList<Alarm> allAlarms = new ArrayList<>();
|
||||||
private ArrayList<Boolean> acknowledged = new ArrayList<Boolean>();
|
private ArrayList<Boolean> acknowledged = new ArrayList<>();
|
||||||
private AlertGridViewAdapter adapter;
|
private AlertGridViewAdapter adapter;
|
||||||
|
|
||||||
/* Visual resources */
|
/* Visual resources */
|
||||||
private GridView gridView;
|
private GridView gridView;
|
||||||
public View convertViewAlarm;
|
private View convertViewAlarm;
|
||||||
|
|
||||||
private int ack_position;
|
private int ackPosition;
|
||||||
|
private Bundle savedInstanceState;
|
||||||
public Bundle savedInstanceState;
|
|
||||||
|
|
||||||
// Need handler for callbacks to the UI thread
|
// Need handler for callbacks to the UI thread
|
||||||
private final Handler myHandler = new Handler();
|
private final Handler myHandler = new Handler(Looper.getMainLooper());
|
||||||
|
|
||||||
/** Called when the activity is first created. */
|
private static final String ALARM = "alarm";
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
|
|
||||||
this.savedInstanceState = savedInstanceState;
|
/**
|
||||||
// get parentTab
|
* Called when the activity is first created.
|
||||||
parentTab = (TabLayoutActivity)getParent();
|
*/
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
Locale locale = new Locale(AppParams.LANGUAGETMP);
|
this.setSavedInstanceState(savedInstanceState);
|
||||||
Locale.setDefault(locale);
|
// get parentTab
|
||||||
Configuration config = new Configuration();
|
setParentTab((TabLayoutActivity) getParent());
|
||||||
config.locale = locale;
|
|
||||||
getBaseContext().getResources().updateConfiguration(config,
|
Locale locale = new Locale(AppParams.LANGUAGETMP);
|
||||||
getBaseContext().getResources().getDisplayMetrics());
|
Locale.setDefault(locale);
|
||||||
|
Configuration config = new Configuration();
|
||||||
|
config.locale = locale;
|
||||||
|
getBaseContext().getResources().updateConfiguration(config,
|
||||||
|
getBaseContext().getResources().getDisplayMetrics());
|
||||||
|
|
||||||
|
context = this;
|
||||||
|
setContentView(R.layout.tabalarm);
|
||||||
|
|
||||||
|
gridView = findViewById(R.id.gridViewAlarms);
|
||||||
|
adapter = new AlertGridViewAdapter(this, getAllAlarms(), context, acknowledged);
|
||||||
|
gridView.setAdapter(adapter);
|
||||||
|
|
||||||
|
gridView.setOnItemClickListener(onItemClickListener);
|
||||||
|
|
||||||
|
// change tab header fontFace
|
||||||
|
TextView textView1 = findViewById(R.id.textView1);
|
||||||
|
textView1.setTypeface(Typeface.createFromAsset(getAssets(), "Sketch_Block.ttf"));
|
||||||
|
textView1.setTextSize(24);
|
||||||
|
|
||||||
|
getParentTab().alarmActivity = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
|
builder.setMessage(getString(R.string.exit))
|
||||||
|
.setCancelable(false)
|
||||||
|
.setNeutralButton(getString(R.string.logout), (dialog, id) -> getParentTab().whenBackPressed(AppParams.ActivityResult.logout))
|
||||||
|
.setPositiveButton(getString(R.string.ext), (dialog, id) -> getParentTab().whenBackPressed(AppParams.ActivityResult.exit))
|
||||||
|
.setNegativeButton(getString(R.string.cancel), (dialog, id) -> dialog.cancel());
|
||||||
|
AlertDialog alert = builder.create();
|
||||||
|
alert.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
SM.Debug("onPause");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (!AppParams.DEMO)
|
||||||
|
getAlarms();
|
||||||
|
else {
|
||||||
|
for (int i = getAllAlarms().size() - 1; i >= 0; i--) {
|
||||||
|
Alarm alarm = getAllAlarms().get(i);
|
||||||
|
if (alarm.ack == 1)
|
||||||
|
getAllAlarms().remove(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
acknowledged = new ArrayList<>();
|
||||||
|
|
||||||
|
for (int i = 0; i < getAllAlarms().size(); i++)
|
||||||
|
acknowledged.add(false);
|
||||||
|
updateResultsInUi(ALARM);
|
||||||
|
}
|
||||||
|
SM.Debug("onResume");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
context = this;
|
private final OnItemClickListener onItemClickListener = new OnItemClickListener() {
|
||||||
setContentView(R.layout.tabalarm);
|
|
||||||
|
|
||||||
gridView = (GridView) findViewById(R.id.gridViewAlarms);
|
|
||||||
adapter = new AlertGridViewAdapter(this, allAlarms, context, acknowledged);
|
|
||||||
gridView.setAdapter(adapter);
|
|
||||||
|
|
||||||
gridView.setOnItemClickListener(onItemClickListener);
|
|
||||||
|
|
||||||
// change tab header fontface
|
|
||||||
TextView textView1 = (TextView) findViewById(R.id.textView1);
|
|
||||||
textView1.setTypeface(Typeface.createFromAsset(getAssets(), "Sketch_Block.ttf"));
|
|
||||||
textView1.setTextSize(24);
|
|
||||||
|
|
||||||
parentTab.alarmActivity = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBackPressed()
|
|
||||||
{
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
|
||||||
builder.setMessage(getString(R.string.exit))
|
|
||||||
.setCancelable(false)
|
|
||||||
.setNeutralButton(getString(R.string.logout), new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
|
||||||
parentTab.whenBackPressed(AppParams.ActivityResult.logout);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setPositiveButton(getString(R.string.ext), new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
|
||||||
parentTab.whenBackPressed(AppParams.ActivityResult.exit);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
|
||||||
dialog.cancel();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
AlertDialog alert = builder.create();
|
|
||||||
alert.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPause()
|
|
||||||
{
|
|
||||||
super.onPause();
|
|
||||||
SM.Debug("onPause");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResume()
|
|
||||||
{
|
|
||||||
super.onResume();
|
|
||||||
if(!AppParams.DEMO)
|
|
||||||
GetAlarms();
|
|
||||||
else if (AppParams.DEMO)
|
|
||||||
{
|
|
||||||
for(int i=allAlarms.size()-1; i>=0; i--)
|
|
||||||
{
|
|
||||||
Alarm alarm = allAlarms.get(i);
|
|
||||||
if(alarm.ack==1)
|
|
||||||
allAlarms.remove(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
acknowledged = new ArrayList<Boolean>();
|
|
||||||
|
|
||||||
for(int i=0;i<allAlarms.size();i++)
|
|
||||||
acknowledged.add(false);
|
|
||||||
updateResultsInUi("alarm");
|
|
||||||
}
|
|
||||||
SM.Debug("onResume");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private OnItemClickListener onItemClickListener = new OnItemClickListener() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> arg0, View arg1, int position,
|
public void onItemClick(AdapterView<?> arg0, View arg1, int position,
|
||||||
long arg3) {
|
long arg3) {
|
||||||
SM.Debug(" ### CLICK Alarm : " + position);
|
SM.Debug(" ### CLICK Alarm : " + position);
|
||||||
convertViewAlarm = arg1;
|
setConvertViewAlarm(arg1);
|
||||||
// save position
|
// save position
|
||||||
ack_position = position;
|
ackPosition = position;
|
||||||
//Toast.makeText(context, "SETACK " + idx, 1000).show();
|
if (!AppParams.DEMO)
|
||||||
if(!AppParams.DEMO)
|
setACK(getAllAlarms().get(position).idx, getAllAlarms().get(position).type, getAllAlarms().get(position).unitName);
|
||||||
setACK(allAlarms.get(position).idx,allAlarms.get(position).type);
|
else {
|
||||||
else
|
getAllAlarms().get(position).ack = 1;
|
||||||
{
|
|
||||||
allAlarms.get(position).ack = 1;
|
|
||||||
updateResultsInUi("else");
|
updateResultsInUi("else");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// send ACK to AppServer
|
||||||
|
private void setACK(int idx, int type, String unitName) {
|
||||||
|
getParentTab().executeNetworkStuff(new String[]{OperationCodes.SendAlarmAcknoledge + "", idx + "", type + "", unitName});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Update Alarms received from AppServer
|
// Update Alarms received from AppServer
|
||||||
public void UpdateAlarms(ArrayList<Alarm> list)
|
public void updateAlarms(ArrayList<Alarm> list) {
|
||||||
{
|
SM.Debug("## updateAlarms: " + list.size());
|
||||||
SM.Debug("## UpdateAlarms: " + list.size());
|
setAllAlarms(list);
|
||||||
allAlarms = list;
|
acknowledged = new ArrayList<>();
|
||||||
acknowledged = new ArrayList<Boolean>();
|
|
||||||
// set acknowledged based on alarm.ack value
|
// set acknowledged based on alarm.ack value
|
||||||
|
|
||||||
for(Alarm alarm: allAlarms)
|
for (Alarm alarm : getAllAlarms()) {
|
||||||
{
|
acknowledged.add(alarm.ack == 1);
|
||||||
acknowledged.add((alarm.ack == 1)? true: false);
|
SM.Debug("ALARM", "SC_ID> " + alarm.sc_id + " | "
|
||||||
SM.Debug("ALARM", "SC_ID> " + alarm.sc_id + " | "
|
+ (getParentTab().getVehHashByScId().get(alarm.sc_id) == null ? "null" : getParentTab().getVehHashByScId().get(alarm.sc_id).name));
|
||||||
+ (parentTab.getVehHashByScId().get(alarm.sc_id) == null ? "null" : parentTab.getVehHashByScId().get(alarm.sc_id).name ));
|
|
||||||
|
|
||||||
|
|
||||||
if (parentTab.getVehHashByScId().get(alarm.sc_id)!=null)
|
if (getParentTab().getVehHashByScId().get(alarm.sc_id) != null)
|
||||||
alarm.unitName = parentTab.getVehHashByScId().get(alarm.sc_id).name;
|
alarm.unitName = getParentTab().getVehHashByScId().get(alarm.sc_id).name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*Enumeration<Long> keylist = parentTab.SuperVehHash.keys();
|
|
||||||
while(keylist.hasMoreElements())
|
|
||||||
{
|
|
||||||
SuperVehicle tmp = (SuperVehicle)((parentTab.SuperVehHash.get((long)keylist.nextElement())));
|
|
||||||
if (tmp.sc_id==alarm.sc_id)
|
|
||||||
{
|
|
||||||
alarm.unitName = tmp.name;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
myHandler.post(updateResultsRUN);
|
||||||
|
}
|
||||||
|
|
||||||
myHandler.post(UpdateResultsRUN);
|
// Create runnable for posting
|
||||||
|
final Runnable updateResultsRUN = () -> updateResultsInUi(ALARM);
|
||||||
|
|
||||||
}
|
private void updateResultsInUi(String param) {
|
||||||
|
if (param.equals(ALARM)) {
|
||||||
|
// set adapter
|
||||||
|
adapter = new AlertGridViewAdapter(this, getAllAlarms(), context, acknowledged);
|
||||||
|
gridView.setAdapter(adapter);
|
||||||
|
} else {
|
||||||
|
adapter.changeACK(ackPosition);
|
||||||
|
SM.Debug("Set ACK: " + ackPosition + " | " + (Boolean.TRUE.equals(acknowledged.get(ackPosition)) ? "true" : "false"));
|
||||||
|
|
||||||
// Create runnable for posting
|
ViewHolder viewAlarm;
|
||||||
final Runnable UpdateResultsRUN = new Runnable() {
|
viewAlarm = (ViewHolder) getConvertViewAlarm().getTag();
|
||||||
public void run() {
|
|
||||||
updateResultsInUi("alarm");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private void updateResultsInUi(String param)
|
switch (Boolean.TRUE.equals(acknowledged.get(ackPosition)) ? 1 : 0) {
|
||||||
{
|
|
||||||
if(param.equals("alarm"))
|
|
||||||
{
|
|
||||||
// set adapter
|
|
||||||
adapter = new AlertGridViewAdapter(this, allAlarms, context, acknowledged);
|
|
||||||
gridView.setAdapter(adapter);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
adapter.changeACK(ack_position);
|
|
||||||
SM.Debug("Set ACK: " + ack_position + " | " + (acknowledged.get(ack_position) ? "true": "false"));
|
|
||||||
|
|
||||||
ViewHolder viewAlarm = new ViewHolder();
|
|
||||||
viewAlarm = (ViewHolder) convertViewAlarm.getTag();
|
|
||||||
|
|
||||||
switch(acknowledged.get(ack_position) ? 1 : 0)
|
|
||||||
{
|
|
||||||
case 1:
|
case 1:
|
||||||
viewAlarm.imageViewAlert.setImageResource(R.drawable.alert_off);
|
viewAlarm.imageViewAlert.setImageResource(R.drawable.alert_off);
|
||||||
//view.imgViewIcon.setImageDrawable(adapter.convertToGrayscale(activity.getResources().getDrawable(liveVehicle.get(position).getSmallIcon())));
|
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
//view.imgViewAlarm.setImageResource(R.drawable.siren);
|
viewAlarm.imageViewAlert.setImageResource(R.drawable.siren);
|
||||||
//view.imgViewIcon.setImageResource(liveVehicle.get(position).getSmallIcon());
|
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
throw new IllegalStateException("Unexpected value: " + (Boolean.TRUE.equals(acknowledged.get(ackPosition)) ? 1 : 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// update ACK received from AppServer
|
// update ACK received from AppServer
|
||||||
public void UpdateACK()
|
public void updateACK() {
|
||||||
{
|
myHandler.post(updateAckRUN);
|
||||||
myHandler.post(UpdateAckRUN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create runnable for posting
|
// Create runnable for posting
|
||||||
final Runnable UpdateAckRUN = new Runnable() {
|
final Runnable updateAckRUN = () -> {
|
||||||
public void run() {
|
SM.Debug(" updateACK: ");
|
||||||
SM.Debug(" UpdateACK: ");
|
updateResultsInUi("adapter");
|
||||||
updateResultsInUi("adapter");
|
};
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
// send to AppServer
|
||||||
// send to AppServer
|
private void getAlarms() {
|
||||||
private void GetAlarms()
|
getParentTab().executeNetworkStuff(new String[]{OperationCodes.GetAlarms + "", AppParams.USERID + ""});
|
||||||
{
|
|
||||||
parentTab.executeNetworkStuff(new String[]{OperationCodes.GetAlarms +"", AppParams.USERID + ""});
|
|
||||||
//parentTab.getAlarms(AppParams.USERID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// send ACK to AppServer
|
public TabLayoutActivity getParentTab() {
|
||||||
private void setACK(int idx, int type)
|
return parentTab;
|
||||||
{
|
}
|
||||||
parentTab.executeNetworkStuff(new String[]{OperationCodes.SendAlarmAcknoledge +"", idx + "", type + ""});
|
|
||||||
//parentTab.sendAlarmAcknowledge(idx, type);
|
public void setParentTab(TabLayoutActivity parentTab) {
|
||||||
}
|
this.parentTab = parentTab;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<Alarm> getAllAlarms() {
|
||||||
|
return allAlarms;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAllAlarms(ArrayList<Alarm> allAlarms) {
|
||||||
|
this.allAlarms = allAlarms;
|
||||||
|
}
|
||||||
|
|
||||||
|
public View getConvertViewAlarm() {
|
||||||
|
return convertViewAlarm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConvertViewAlarm(View convertViewAlarm) {
|
||||||
|
this.convertViewAlarm = convertViewAlarm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bundle getSavedInstanceState() {
|
||||||
|
return savedInstanceState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSavedInstanceState(Bundle savedInstanceState) {
|
||||||
|
this.savedInstanceState = savedInstanceState;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -535,7 +535,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity{
|
|||||||
AppParams.crtTab = AppParams.Tabs.alarms;
|
AppParams.crtTab = AppParams.Tabs.alarms;
|
||||||
|
|
||||||
|
|
||||||
if(AppParams.DEMO && alarmActivity!=null && alarmActivity.allAlarms != null && alarmActivity.allAlarms.size() ==0 )
|
if(AppParams.DEMO && alarmActivity!=null && alarmActivity.getAllAlarms() != null && alarmActivity.getAllAlarms().size() ==0 )
|
||||||
{
|
{
|
||||||
ArrayList<Alarm> listAlarms = new ArrayList<Alarm>();
|
ArrayList<Alarm> listAlarms = new ArrayList<Alarm>();
|
||||||
Alarm alarm = new Alarm();
|
Alarm alarm = new Alarm();
|
||||||
@ -578,7 +578,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity{
|
|||||||
alarm.typestr = "Emergency";
|
alarm.typestr = "Emergency";
|
||||||
listAlarms.add(alarm);
|
listAlarms.add(alarm);
|
||||||
|
|
||||||
alarmActivity.UpdateAlarms(listAlarms);
|
alarmActivity.updateAlarms(listAlarms);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1023,7 +1023,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity{
|
|||||||
if(recordingsActivity!=null)
|
if(recordingsActivity!=null)
|
||||||
recordingsActivity.onCreate(recordingsActivity.savedInstanceState);
|
recordingsActivity.onCreate(recordingsActivity.savedInstanceState);
|
||||||
if(alarmActivity!=null)
|
if(alarmActivity!=null)
|
||||||
alarmActivity.onCreate(alarmActivity.savedInstanceState);
|
alarmActivity.onCreate(alarmActivity.getSavedInstanceState());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1408,7 +1408,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity{
|
|||||||
{
|
{
|
||||||
SM.Debug("currentActivity instanceof AlarmActivity");
|
SM.Debug("currentActivity instanceof AlarmActivity");
|
||||||
if(alarmActivity != null)
|
if(alarmActivity != null)
|
||||||
alarmActivity.UpdateAlarms(Alarms.alarmList);
|
alarmActivity.updateAlarms(Alarms.alarmList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1422,7 +1422,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity{
|
|||||||
if (Integer.parseInt(tempArr[0])==1 && AppParams.crtTab == AppParams.Tabs.alarms)
|
if (Integer.parseInt(tempArr[0])==1 && AppParams.crtTab == AppParams.Tabs.alarms)
|
||||||
{
|
{
|
||||||
if(alarmActivity != null)
|
if(alarmActivity != null)
|
||||||
alarmActivity.UpdateACK();
|
alarmActivity.updateACK();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2548,7 +2548,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity{
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OperationCodes.SendAlarmAcknoledge:
|
case OperationCodes.SendAlarmAcknoledge:
|
||||||
sendAlarmAcknowledge(Integer.parseInt(params[1]), Integer.parseInt(params[2]));
|
sendAlarmAcknowledge(Integer.parseInt(params[1]), Integer.parseInt(params[2]), params[3]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OperationCodes.GetHistoryPositions:
|
case OperationCodes.GetHistoryPositions:
|
||||||
|
Loading…
Reference in New Issue
Block a user