Fix comments on 5f0afb81a4d6

Remove SendResult.java. Should have been part of this CL.
Fix a bug. Should be UploadResultActivity.FUSION_TABLES_URL.
This commit is contained in:
Jimmy Shih
2012-01-19 09:41:43 -08:00
parent e23c2bcfb2
commit aa7fb772a0
2 changed files with 16 additions and 58 deletions
@@ -479,18 +479,22 @@ public class SendActivity extends Activity implements ProgressIndicator {
private SendState onSendToGoogleDone() {
tracker.dispatch();
Intent intent = new Intent(this, UploadResultActivity.class);
intent.putExtra(UploadResultActivity.HAS_MAPS_RESULT, sendToMaps)
.putExtra(UploadResultActivity.HAS_FUSION_TABLES_RESULT, sendToFusionTables)
.putExtra(UploadResultActivity.HAS_DOCS_RESULT, sendToDocs)
.putExtra(UploadResultActivity.MAPS_SUCCESS, sendToMapsSuccess)
.putExtra(UploadResultActivity.FUSION_TABLES_SUCCESS, sendToFusionTablesSuccess)
.putExtra(UploadResultActivity.DOCS_SUCCESS, sendToDocsSuccess)
.putExtra(UploadResultActivity.SHARE_REQUEST, shareRequest)
.putExtra(UploadResultActivity.MAPS_URL,
sendToMaps && sendToMapsSuccess ? MapsFacade.buildMapUrl(sendToMapsMapId) : null)
.putExtra(UploadResultActivity.FUSION_TABLES_SUCCESS,
sendToFusionTables && sendToFusionTablesSuccess ? getFusionTablesUrl(sendTrackId) : null);
String mapsUrl = sendToMaps && sendToMapsSuccess
? MapsFacade.buildMapUrl(sendToMapsMapId)
: null;
String fusionTablesUrl = sendToFusionTables && sendToFusionTablesSuccess
? getFusionTablesUrl(sendTrackId)
: null;
Intent intent = new Intent(this, UploadResultActivity.class)
.putExtra(UploadResultActivity.HAS_MAPS_RESULT, sendToMaps)
.putExtra(UploadResultActivity.HAS_FUSION_TABLES_RESULT, sendToFusionTables)
.putExtra(UploadResultActivity.HAS_DOCS_RESULT, sendToDocs)
.putExtra(UploadResultActivity.MAPS_SUCCESS, sendToMapsSuccess)
.putExtra(UploadResultActivity.FUSION_TABLES_SUCCESS, sendToFusionTablesSuccess)
.putExtra(UploadResultActivity.DOCS_SUCCESS, sendToDocsSuccess)
.putExtra(UploadResultActivity.SHARE_REQUEST, shareRequest)
.putExtra(UploadResultActivity.MAPS_URL, mapsUrl)
.putExtra(UploadResultActivity.FUSION_TABLES_URL, fusionTablesUrl);
startActivity(intent);
return SendState.FINISH;
}
@@ -1,46 +0,0 @@
/*
* Copyright 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.android.apps.mytracks.io.sendtogoogle;
/**
* This class represents the the result of the uploading of track data to a
* single service.
*
* @author Matthew Simmons
*/
public class SendResult {
private final SendType type;
private final boolean success;
/**
* @param type the service to which track data was uploaded
* @param success true if the uploading succeeded
*/
public SendResult(SendType type, boolean success) {
this.type = type;
this.success = success;
}
/** Returns the service to which the track data was uploaded */
public SendType getType() {
return type;
}
/** Returns true if the uploading succeeded */
public boolean isSuccess() {
return success;
}
}