Merge heads

This commit is contained in:
youtaol
2013-07-03 11:19:22 +08:00
parent 7bee6470bd
commit b4e94b9af1
53 changed files with 135 additions and 60 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2013 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/btn_pause_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/btn_pause"/>
</selector>
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2013 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/btn_record_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/btn_record"/>
</selector>
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2013 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/btn_stop_1_pressed" android:state_pressed="true"/>
<item android:drawable="@drawable/btn_stop_1"/>
</selector>
@@ -61,7 +61,7 @@ limitations under the License.
android:layout_height="0dp"
android:layout_weight="10"
android:layout_width="match_parent"
android:src="@drawable/btn_stop_1" />
android:src="@drawable/btn_stop_0" />
<View
android:layout_height="0dp"
android:layout_weight="1"
+1 -1
View File
@@ -62,7 +62,7 @@ limitations under the License.
android:layout_height="wrap_content"
android:layout_weight="10"
android:layout_width="0dp"
android:src="@drawable/btn_stop_1" />
android:src="@drawable/btn_stop_0" />
<View
android:layout_height="match_parent"
android:layout_weight="1"
+4 -2
View File
@@ -27,7 +27,8 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_record_track"
android:id="@+id/track_widget_record_button"
style="@style/TrackWidgetButtonRecord" />
android:src="@drawable/record_button"
style="@style/TrackWidgetButton" />
<LinearLayout
android:id="@+id/track_widget_stats_container"
android:layout_height="match_parent"
@@ -91,7 +92,8 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_stop_recording"
android:id="@+id/track_widget_stop_button"
style="@style/TrackWidgetButtonStop" />
android:src="@drawable/btn_stop_0"
style="@style/TrackWidgetButton" />
<LinearLayout
android:layout_weight="1"
style="@style/TrackWidgetVerticalSpacer" />
+4 -2
View File
@@ -140,7 +140,8 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_record_track"
android:id="@+id/track_widget_record_button"
style="@style/TrackWidgetButtonRecord" />
android:src="@drawable/record_button"
style="@style/TrackWidgetButton" />
<TextView
android:id="@+id/track_widget_record_status"
android:layout_gravity="center_vertical"
@@ -152,7 +153,8 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_stop_recording"
android:id="@+id/track_widget_stop_button"
style="@style/TrackWidgetButtonStop" />
android:src="@drawable/btn_stop_0"
style="@style/TrackWidgetButton" />
<LinearLayout
android:layout_weight="1"
style="@style/TrackWidgetVerticalSpacer" />
+4 -2
View File
@@ -140,7 +140,8 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_record_track"
android:id="@+id/track_widget_record_button"
style="@style/TrackWidgetButtonRecord" />
android:src="@drawable/record_button"
style="@style/TrackWidgetButton" />
<TextView
android:id="@+id/track_widget_record_status"
android:layout_gravity="center_vertical"
@@ -152,7 +153,8 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_stop_recording"
android:id="@+id/track_widget_stop_button"
style="@style/TrackWidgetButtonStop" />
android:src="@drawable/btn_stop_0"
style="@style/TrackWidgetButton" />
<LinearLayout
android:layout_weight="1"
style="@style/TrackWidgetVerticalSpacer" />
+4 -2
View File
@@ -144,7 +144,8 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_record_track"
android:id="@+id/track_widget_record_button"
style="@style/TrackWidgetButtonRecord" />
android:src="@drawable/record_button"
style="@style/TrackWidgetButton" />
<TextView
android:id="@+id/track_widget_record_status"
android:layout_gravity="center_vertical"
@@ -156,7 +157,8 @@ limitations under the License.
<ImageButton
android:contentDescription="@string/icon_stop_recording"
android:id="@+id/track_widget_stop_button"
style="@style/TrackWidgetButtonStop" />
android:src="@drawable/btn_stop_0"
style="@style/TrackWidgetButton" />
<LinearLayout
android:layout_weight="1"
style="@style/TrackWidgetVerticalSpacer" />
+1
View File
@@ -18,6 +18,7 @@ limitations under the License.
<item
android:icon="@drawable/menu_map_layer"
android:orderInCategory="5"
android:showAsAction="ifRoom"
android:title="@string/menu_map_layer">
<menu>
<group android:checkableBehavior="single" >
+2 -12
View File
@@ -254,6 +254,8 @@ limitations under the License.
<style name="TrackWidgetButton">
<item name="android:background">@android:color/transparent</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_height">63dp</item>
<item name="android:layout_width">63dp</item>
<item name="android:scaleType">fitXY</item>
</style>
<!-- track widget button container -->
@@ -266,18 +268,6 @@ limitations under the License.
<item name="android:paddingBottom">4dp</item>
<item name="android:paddingTop">4dp</item>
</style>
<!-- track widget button record -->
<style name="TrackWidgetButtonRecord" parent="@style/TrackWidgetButton">
<item name="android:layout_height">63dp</item>
<item name="android:layout_width">75dp</item>
<item name="android:src">@drawable/btn_record</item>
</style>
<!-- track widget button stop -->
<style name="TrackWidgetButtonStop" parent="@style/TrackWidgetButton">
<item name="android:layout_height">63dp</item>
<item name="android:layout_width">63dp</item>
<item name="android:src">@drawable/btn_stop_0</item>
</style>
<!-- track widget config spiner -->
<style name="TrackWidgetConfigSpinner">
<item name="android:layout_gravity">center_horizontal</item>
@@ -103,7 +103,7 @@ public abstract class AbstractSendToGoogleActivity extends AbstractMyTracksActiv
* @param trackId the track id
*/
protected void shareTrack(long trackId) {
AnalyticsUtils.sendPageViews(this, "/action/share_drive");
AnalyticsUtils.sendPageViews(this, AnalyticsUtils.ACTION_SHARE_DRIVE);
SendRequest newRequest;
newRequest = new SendRequest(trackId);
newRequest.setSendDrive(true);
@@ -365,6 +365,7 @@ public abstract class AbstractSendToGoogleActivity extends AbstractMyTracksActiv
* @param trackIds the track ids
*/
protected void confirmPlay(long[] trackIds) {
AnalyticsUtils.sendPageViews(this, AnalyticsUtils.ACTION_PLAY);
if (GoogleEarthUtils.isEarthInstalled(this)) {
if (PreferencesUtils.getBoolean(
this, R.string.confirm_play_earth_key, PreferencesUtils.CONFIRM_PLAY_EARTH_DEFAULT)) {
@@ -381,12 +382,11 @@ public abstract class AbstractSendToGoogleActivity extends AbstractMyTracksActiv
@Override
public void onConfirmPlayDone(long[] trackIds) {
AnalyticsUtils.sendPageViews(this, "/action/play");
Intent intent = IntentUtils.newIntent(this, SaveActivity.class)
.putExtra(SaveActivity.EXTRA_TRACK_IDS, trackIds)
.putExtra(SaveActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) TrackFileFormat.KML)
.putExtra(SaveActivity.EXTRA_PLAY_TRACK, true);
startActivity(intent);
Intent intent = IntentUtils.newIntent(this, SaveActivity.class)
.putExtra(SaveActivity.EXTRA_TRACK_IDS, trackIds)
.putExtra(SaveActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) TrackFileFormat.KML)
.putExtra(SaveActivity.EXTRA_PLAY_TRACK, true);
startActivity(intent);
}
protected void deleteTrack(long[] trackIds) {
@@ -101,11 +101,11 @@ public class TrackController {
}
recordImageButton.setImageResource(
isRecording && !isPaused ? R.drawable.btn_pause : R.drawable.btn_record);
isRecording && !isPaused ? R.drawable.pause_button : R.drawable.record_button);
recordImageButton.setContentDescription(activity.getString(
isRecording && !isPaused ? R.string.icon_pause_recording : R.string.icon_record_track));
stopImageButton.setImageResource(isRecording ? R.drawable.btn_stop_1 : R.drawable.btn_stop_0);
stopImageButton.setImageResource(isRecording ? R.drawable.stop_1_button : R.drawable.btn_stop_0);
stopImageButton.setEnabled(isRecording);
statusTextView.setVisibility(isRecording ? View.VISIBLE : View.INVISIBLE);
@@ -58,8 +58,6 @@ import android.view.View.OnClickListener;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;
import java.util.Locale;
/**
* An activity to show the track detail.
*
@@ -151,13 +149,13 @@ public class TrackDetailActivity extends AbstractSendToGoogleActivity implements
public void onClick(View v) {
if (recordingTrackPaused) {
// Paused -> Resume
AnalyticsUtils.sendPageViews(TrackDetailActivity.this, "/action/resume_track");
AnalyticsUtils.sendPageViews(TrackDetailActivity.this, AnalyticsUtils.ACTION_RESUME_TRACK);
updateMenuItems(true, false);
TrackRecordingServiceConnectionUtils.resumeTrack(trackRecordingServiceConnection);
trackController.update(true, false);
} else {
// Recording -> Paused
AnalyticsUtils.sendPageViews(TrackDetailActivity.this, "/action/pause_track");
AnalyticsUtils.sendPageViews(TrackDetailActivity.this, AnalyticsUtils.ACTION_PAUSE_TRACK);
updateMenuItems(true, true);
TrackRecordingServiceConnectionUtils.pauseTrack(trackRecordingServiceConnection);
trackController.update(true, true);
@@ -168,7 +166,7 @@ public class TrackDetailActivity extends AbstractSendToGoogleActivity implements
private final OnClickListener stopListener = new OnClickListener() {
@Override
public void onClick(View v) {
AnalyticsUtils.sendPageViews(TrackDetailActivity.this, "/action/stop_recording");
AnalyticsUtils.sendPageViews(TrackDetailActivity.this, AnalyticsUtils.ACTION_STOP_RECORDING);
updateMenuItems(false, true);
TrackRecordingServiceConnectionUtils.stopRecording(
TrackDetailActivity.this, trackRecordingServiceConnection, true);
@@ -228,7 +226,7 @@ public class TrackDetailActivity extends AbstractSendToGoogleActivity implements
TrackRecordingServiceConnectionUtils.startConnection(this, trackRecordingServiceConnection);
trackDataHub.start();
AnalyticsUtils.sendPageViews(this, "/page/track_detail");
AnalyticsUtils.sendPageViews(this, AnalyticsUtils.PAGE_TRACK_DETAIL);
}
@Override
@@ -329,7 +327,7 @@ public class TrackDetailActivity extends AbstractSendToGoogleActivity implements
Intent intent;
switch (item.getItemId()) {
case R.id.track_detail_insert_marker:
AnalyticsUtils.sendPageViews(this, "/action/insert_marker");
AnalyticsUtils.sendPageViews(this, AnalyticsUtils.ACTION_INSERT_MARKER);
intent = IntentUtils.newIntent(this, MarkerEditActivity.class)
.putExtra(MarkerEditActivity.EXTRA_TRACK_ID, trackId);
startActivity(intent);
@@ -356,7 +354,6 @@ public class TrackDetailActivity extends AbstractSendToGoogleActivity implements
.show(getSupportFragmentManager(), FrequencyDialogFragment.FREQUENCY_DIALOG_TAG);
return true;
case R.id.track_detail_export:
AnalyticsUtils.sendPageViews(this, "/export");
new ExportDialogFragment().show(getSupportFragmentManager(),
ExportDialogFragment.EXPORT_DIALOG_TAG);
return true;
@@ -403,27 +400,27 @@ public class TrackDetailActivity extends AbstractSendToGoogleActivity implements
@Override
public void onExportDone(ExportType exportType, TrackFileFormat trackFileFormat) {
String pageView;
if (exportType == ExportType.EXTERNAL_STORAGE) {
pageView = "/export/external_storage_" + trackFileFormat.name().toLowerCase(Locale.US);
AnalyticsUtils.sendPageViews(this, pageView);
AnalyticsUtils.sendPageViews(this,
AnalyticsUtils.ACTION_EXPORT_PREFIX + trackFileFormat.getExtension());
Intent intent = IntentUtils.newIntent(this, SaveActivity.class)
.putExtra(SaveActivity.EXTRA_TRACK_IDS, new long[] { trackId })
.putExtra(SaveActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) trackFileFormat);
startActivity(intent);
} else {
SendRequest sendRequest = new SendRequest(trackId);
String pageView;
switch (exportType) {
case GOOGLE_MAPS:
pageView = "/export/maps";
pageView = AnalyticsUtils.ACTION_EXPORT_MAPS;
sendRequest.setSendMaps(true);
break;
case GOOGLE_FUSION_TABLES:
pageView = "/export/fusion_tables";
pageView = AnalyticsUtils.ACTION_EXPORT_FUSION_TABLES;
sendRequest.setSendFusionTables(true);
break;
default:
pageView = "/export/spreadsheets";
pageView = AnalyticsUtils.ACTION_EXPORT_SPREADSHEETS;
sendRequest.setSendSpreadsheets(true);
}
AnalyticsUtils.sendPageViews(this, pageView);
@@ -84,8 +84,6 @@ import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.Toast;
import java.util.Locale;
/**
* An activity displaying a list of tracks.
*
@@ -242,19 +240,19 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
public void onClick(View v) {
if (recordingTrackId == PreferencesUtils.RECORDING_TRACK_ID_DEFAULT) {
// Not recording -> Recording
AnalyticsUtils.sendPageViews(TrackListActivity.this, "/action/record_track");
AnalyticsUtils.sendPageViews(TrackListActivity.this, AnalyticsUtils.ACTION_RECORD_TRACK);
updateMenuItems(false, true);
startRecording();
} else {
if (recordingTrackPaused) {
// Paused -> Resume
AnalyticsUtils.sendPageViews(TrackListActivity.this, "/action/resume_track");
AnalyticsUtils.sendPageViews(TrackListActivity.this, AnalyticsUtils.ACTION_RESUME_TRACK);
updateMenuItems(false, true);
TrackRecordingServiceConnectionUtils.resumeTrack(trackRecordingServiceConnection);
trackController.update(true, false);
} else {
// Recording -> Paused
AnalyticsUtils.sendPageViews(TrackListActivity.this, "/action/pause_track");
AnalyticsUtils.sendPageViews(TrackListActivity.this, AnalyticsUtils.ACTION_PAUSE_TRACK);
updateMenuItems(false, true);
TrackRecordingServiceConnectionUtils.pauseTrack(trackRecordingServiceConnection);
trackController.update(true, true);
@@ -266,7 +264,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
private final OnClickListener stopListener = new OnClickListener() {
@Override
public void onClick(View v) {
AnalyticsUtils.sendPageViews(TrackListActivity.this, "/action/stop_recording");
AnalyticsUtils.sendPageViews(TrackListActivity.this, AnalyticsUtils.ACTION_STOP_RECORDING);
updateMenuItems(false, false);
TrackRecordingServiceConnectionUtils.stopRecording(
TrackListActivity.this, trackRecordingServiceConnection, true);
@@ -406,7 +404,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
// Update track recording service connection
TrackRecordingServiceConnectionUtils.startConnection(this, trackRecordingServiceConnection);
AnalyticsUtils.sendPageViews(this, "/page/track_list");
AnalyticsUtils.sendPageViews(this, AnalyticsUtils.PAGE_TRACK_LIST);
}
@Override
@@ -625,7 +623,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
switch (menuId) {
case R.id.track_list_export_all:
AnalyticsUtils.sendPageViews(
this, "/action/save_all_" + trackFileFormat.name().toLowerCase(Locale.US));
this, AnalyticsUtils.ACTION_EXPORT_ALL_PREFIX + trackFileFormat.getExtension());
intent = IntentUtils.newIntent(this, SaveActivity.class)
.putExtra(SaveActivity.EXTRA_TRACK_IDS, new long[] {-1L})
.putExtra(SaveActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) trackFileFormat);
@@ -633,7 +631,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
break;
case R.id.track_list_import_all:
AnalyticsUtils.sendPageViews(
this, "/action/import_all_" + trackFileFormat.name().toLowerCase(Locale.US));
this, AnalyticsUtils.ACTION_IMPORT_ALL_PREFIX + trackFileFormat.getExtension());
intent = IntentUtils.newIntent(this, ImportActivity.class)
.putExtra(ImportActivity.EXTRA_IMPORT_ALL, true)
.putExtra(ImportActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) trackFileFormat);
@@ -98,17 +98,17 @@ public class SensorManagerFactory {
if (sensorType.equals(context.getString(R.string.sensor_type_value_ant))) {
if (sendPageViews) {
AnalyticsUtils.sendPageViews(context, "/sensor/ant");
AnalyticsUtils.sendPageViews(context, AnalyticsUtils.SENSOR_ANT);
}
return new AntSensorManager(context);
} else if (sensorType.equals(context.getString(R.string.sensor_type_value_zephyr))) {
if (sendPageViews) {
AnalyticsUtils.sendPageViews(context, "/sensor/zephyr");
AnalyticsUtils.sendPageViews(context, AnalyticsUtils.SENSOR_ZEPHYR);
}
return new ZephyrSensorManager(context);
} else if (sensorType.equals(context.getString(R.string.sensor_type_value_polar))) {
if (sendPageViews) {
AnalyticsUtils.sendPageViews(context, "/sensor/polar");
AnalyticsUtils.sendPageViews(context, AnalyticsUtils.SENSOR_POLAR);
}
return new PolarSensorManager(context);
}
@@ -27,6 +27,27 @@ import android.content.Context;
*/
public class AnalyticsUtils {
public static final String ACTION_EXPORT_ALL_PREFIX = "/action/export_all_";
public static final String ACTION_EXPORT_PREFIX = "/action/export_";
public static final String ACTION_EXPORT_FUSION_TABLES = "/action/export_fusion_tables";
public static final String ACTION_EXPORT_MAPS = "/action/export_maps";
public static final String ACTION_EXPORT_SPREADSHEETS = "/action/export_spreadsheets";
public static final String ACTION_IMPORT_ALL_PREFIX = "/action/import_all_";
public static final String ACTION_INSERT_MARKER = "/action/insert_marker";
public static final String ACTION_PAUSE_TRACK = "/action/pause_track";
public static final String ACTION_PLAY = "/action/play";
public static final String ACTION_RECORD_TRACK = "/action/record_track";
public static final String ACTION_RESUME_TRACK = "/action/resume_track";
public static final String ACTION_SHARE_DRIVE = "/action/share_drive";
public static final String ACTION_STOP_RECORDING = "/action/stop_recording";
public static final String PAGE_TRACK_DETAIL = "/page/track_detail";
public static final String PAGE_TRACK_LIST = "/page/track_list";
public static final String SENSOR_ANT = "/sensor/ant";
public static final String SENSOR_POLAR = "/sensor/polar";
public static final String SENSOR_ZEPHYR = "/sensor/zephyr";
private static final String UA = "UA-7222692-2";
private static final String PRODUCT_NAME = "android-mytracks";
private static GoogleAnalyticsTracker tracker;
@@ -53,4 +74,4 @@ public class AnalyticsUtils {
tracker.dispatch();
}
}
}
}
@@ -433,7 +433,7 @@ public class TrackWidgetProvider extends AppWidgetProvider {
private static void updateRecordButton(
Context context, RemoteViews remoteViews, boolean isRecording, boolean recordingTrackPaused) {
remoteViews.setImageViewResource(R.id.track_widget_record_button,
isRecording && !recordingTrackPaused ? R.drawable.btn_pause : R.drawable.btn_record);
isRecording && !recordingTrackPaused ? R.drawable.pause_button : R.drawable.record_button);
int recordActionId;
if (isRecording) {
recordActionId = recordingTrackPaused ? R.string.track_action_resume
@@ -458,7 +458,7 @@ public class TrackWidgetProvider extends AppWidgetProvider {
private static void updateStopButton(
Context context, RemoteViews remoteViews, boolean isRecording) {
remoteViews.setImageViewResource(
R.id.track_widget_stop_button, isRecording ? R.drawable.btn_stop_1 : R.drawable.btn_stop_0);
R.id.track_widget_stop_button, isRecording ? R.drawable.stop_1_button : R.drawable.btn_stop_0);
remoteViews.setBoolean(R.id.track_widget_stop_button, "setEnabled", isRecording);
if (isRecording) {
Intent intent = new Intent(context, ControlRecordingService.class).setAction(