#SD-188 - fix merge conflicts
This commit is contained in:
parent
c07986d604
commit
3268286e76
@ -5,7 +5,7 @@ import android.app.AlertDialog;
|
||||
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import com.safemobile.dispatch.R;
|
||||
import com.safemobile.safedispatch.R;
|
||||
import com.safemobile.interfaces.IDialogService;
|
||||
|
||||
public class DialogService implements IDialogService {
|
||||
|
@ -60,7 +60,7 @@ public class HistoryActivity extends AppCompatActivity implements OnMapReadyCall
|
||||
setContentView(R.layout.tabhistory);
|
||||
|
||||
parentTab = (TabLayoutActivity) getParent();
|
||||
parentTab.historyActivity = this;
|
||||
parentTab.setHistoryActivity(this);
|
||||
|
||||
Locale locale = new Locale(AppParams.LANGUAGETMP);
|
||||
Locale.setDefault(locale);
|
||||
@ -85,17 +85,17 @@ public class HistoryActivity extends AppCompatActivity implements OnMapReadyCall
|
||||
displayButton.setOnClickListener(view -> {
|
||||
googleMap.clear();
|
||||
if (!AppParams.DEMO) {
|
||||
parentTab.dropAllData =false;
|
||||
parentTab.firstHistData = true;
|
||||
parentTab.HistMsgList.clear();
|
||||
parentTab.HistPosList.clear();
|
||||
parentTab.setDropAllData(false);
|
||||
parentTab.setFirstHistoryData(true);
|
||||
parentTab.clearHistoryMessageList();
|
||||
parentTab.clearHistoryPositionList();
|
||||
|
||||
// request history
|
||||
parentTab.executeNetworkStuff(new String[] {OperationCodes.GetHistoryPositions + "", allVehicle.get(spinnerVehicle.getSelectedItemPosition()).sc_id + "",
|
||||
(startDate.getTime()/ 1000L) + "", (endDate.getTime()/ 1000L) + ""});
|
||||
} else {
|
||||
parentTab.demoPositionsList();
|
||||
displayHistory(parentTab.demoPositions);
|
||||
displayHistory(parentTab.getDemoPositions());
|
||||
}
|
||||
});
|
||||
|
||||
@ -204,10 +204,10 @@ public class HistoryActivity extends AppCompatActivity implements OnMapReadyCall
|
||||
|
||||
final Runnable UpdateMapResults = new Runnable() {
|
||||
public void run() {
|
||||
Log.v("updateMap", parentTab.HistPosList.toString());
|
||||
Log.v("updateMap", parentTab.getHistoryPositionList().toString());
|
||||
SM.Debug("Do the Display");
|
||||
infoBubble.setHistoryPositions(parentTab.HistPosList);
|
||||
displayHistory(parentTab.HistPosList);
|
||||
infoBubble.setHistoryPositions(parentTab.getHistoryPositionList());
|
||||
displayHistory(parentTab.getHistoryPositionList());
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.safemobile.dispatch;
|
||||
package com.safemobile.safedispatch;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
@ -20,6 +20,7 @@ import com.safemobile.activities.AbstractLiveActivity;
|
||||
import com.safemobile.activities.AbstractMessagesActivity;
|
||||
import com.safemobile.activities.AbstractRadioActivity;
|
||||
import com.safemobile.activities.AbstractSDParentActivity;
|
||||
import com.safemobile.safedispatch.R;
|
||||
import com.safemobile.enums.AuthorizationCode;
|
||||
import com.safemobile.enums.AuthorizationStatus;
|
||||
import com.safemobile.enums.ProviderSettingsStatus;
|
||||
@ -260,6 +261,10 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
|
||||
this.historyPositionList = historyPositionList;
|
||||
}
|
||||
|
||||
public void clearHistoryPositionList() {
|
||||
this.historyPositionList.clear();
|
||||
}
|
||||
|
||||
public Boolean getFirstHistoryData() {
|
||||
return firstHistoryData;
|
||||
}
|
||||
@ -284,6 +289,10 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
|
||||
this.historyMessageList = historyMessageList;
|
||||
}
|
||||
|
||||
public void clearHistoryMessageList() {
|
||||
this.historyMessageList.clear();
|
||||
}
|
||||
|
||||
public ArrayList<SMS> getDemoSmsList() {
|
||||
return demoSmsList;
|
||||
}
|
||||
@ -465,7 +474,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
|
||||
// add radio tab
|
||||
intent[6] = new Intent(context, AbstractEmptyActivity.class);
|
||||
tabSpecs[6] = tabHost.newTabSpec(ABOUT)
|
||||
.setIndicator(ABOUT, res.getDrawable(AppParams.DEMO ? R.drawable.icon_demo : R.drawable.ic_launcher))
|
||||
.setIndicator(ABOUT, res.getDrawable(AppParams.DEMO ? R.drawable.icon_demo : R.mipmap.ic_launcher))
|
||||
.setContent(intent[6]);
|
||||
|
||||
// add history tab
|
||||
@ -744,7 +753,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
|
||||
dialog.setTitle(AppParams.DEMO ? getString(R.string.app_name_demo) : getString(R.string.app_name));
|
||||
dialog.setContentView(R.layout.dialog);
|
||||
ImageView image = dialog.findViewById(R.id.image);
|
||||
image.setImageResource(AppParams.DEMO ? R.drawable.icon_demo : R.drawable.ic_launcher);
|
||||
image.setImageResource(AppParams.DEMO ? R.drawable.icon_demo : R.mipmap.ic_launcher);
|
||||
TextView text = dialog.findViewById(R.id.text);
|
||||
TextView text2 = dialog.findViewById(R.id.text2);
|
||||
text.setText(String.format("%s1.0.8", getString(R.string.version)));
|
||||
@ -935,7 +944,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
|
||||
}
|
||||
}
|
||||
|
||||
private void demoPositionsList() {
|
||||
public void demoPositionsList() {
|
||||
AssetManager assetManager = res.getAssets();
|
||||
SM.Debug("TRY 2 OPEN demo_positions.txt");
|
||||
InputStream input = null;
|
||||
|
Loading…
Reference in New Issue
Block a user