|
|
@@ -536,26 +536,28 @@ public class ApexDriverApplication extends Application {
|
|
|
break;
|
|
|
case BackgroundReportTypeAlways: {
|
|
|
|
|
|
- new AlertDialog.Builder(mCurActivity)
|
|
|
- .setTitle("Warning")
|
|
|
- .setMessage("Report Location For Order:" + orderId)
|
|
|
- .setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(DialogInterface dialog, int which) {
|
|
|
-
|
|
|
- String location = null;
|
|
|
- reportLocationForOrder(location,orderId);
|
|
|
- }
|
|
|
- })
|
|
|
- .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(DialogInterface dialog, int which) {
|
|
|
+ if (mCurActivity != null) {
|
|
|
+ new AlertDialog.Builder(mCurActivity)
|
|
|
+ .setTitle("Warning")
|
|
|
+ .setMessage("Report Location For Order:" + orderId)
|
|
|
+ .setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
|
- String reason = "Driver " + user +" cancel to report location";
|
|
|
- rejectReportLocation(reason,orderId);
|
|
|
- }
|
|
|
- })
|
|
|
- .show();
|
|
|
+ String location = null;
|
|
|
+ reportLocationForOrder(location,orderId);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(DialogInterface dialog, int which) {
|
|
|
+
|
|
|
+ String reason = "Driver " + user +" cancel to report location";
|
|
|
+ rejectReportLocation(reason,orderId);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .show();
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
break;
|