|
|
|
@ -57,6 +57,7 @@ import com.safemobile.services.TCPService.TCPBinder;
|
|
|
|
|
|
|
|
|
|
import android.Manifest;
|
|
|
|
|
import android.annotation.SuppressLint;
|
|
|
|
|
import android.app.Activity;
|
|
|
|
|
import android.app.Dialog;
|
|
|
|
|
import android.app.Notification;
|
|
|
|
|
import android.app.NotificationManager;
|
|
|
|
@ -1395,7 +1396,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
|
|
|
|
|
|
|
|
|
|
HistCountmsg histCountMsg = new HistCountmsg(msg);
|
|
|
|
|
SM.Debug("Message Count:" + histCountMsg.histcountValue.count);
|
|
|
|
|
if (histCountMsg.histcountValue.count >= 2000 && AppParams.crtTab == AppParams.Tabs.history) {
|
|
|
|
|
if (AppParams.crtTab != AppParams.Tabs.history) {
|
|
|
|
|
//list for live
|
|
|
|
|
SM.Debug("currentActivity instanceof HistoryActivity");
|
|
|
|
|
try {
|
|
|
|
@ -1406,6 +1407,44 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
SM.Debug(HASH_ERROR_MESSAGE + ex);
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (histCountMsg.histcountValue.count >= 2000) {
|
|
|
|
|
try {
|
|
|
|
|
if (getHistoryActivity() != null) {
|
|
|
|
|
getHistoryActivity().UpdateCancel();
|
|
|
|
|
getHistoryActivity().UpdateUnableDisp();
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
SM.Debug(HASH_ERROR_MESSAGE + ex);
|
|
|
|
|
}
|
|
|
|
|
runOnUiThread(new Runnable() {
|
|
|
|
|
public void run() {
|
|
|
|
|
DialogService dialogService = new DialogService();
|
|
|
|
|
dialogService.showError(getHistoryActivity(), getString(R.string.too_many_positions, String.valueOf(histCountMsg.histcountValue.count)));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (histCountMsg.histcountValue.count == 0) {
|
|
|
|
|
try {
|
|
|
|
|
if (getHistoryActivity() != null) {
|
|
|
|
|
getHistoryActivity().UpdateCancel();
|
|
|
|
|
getHistoryActivity().UpdateUnableDisp();
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
SM.Debug(HASH_ERROR_MESSAGE + ex);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
runOnUiThread(new Runnable() {
|
|
|
|
|
public void run() {
|
|
|
|
|
DialogService dialogService = new DialogService();
|
|
|
|
|
dialogService.showError(getHistoryActivity(), getString(R.string.no_data_for_interval));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|