diff --git a/MyTracks/res/values/strings.xml b/MyTracks/res/values/strings.xml index d7b8b0dfe..1c4cb895a 100644 --- a/MyTracks/res/values/strings.xml +++ b/MyTracks/res/values/strings.xml @@ -3081,16 +3081,4 @@ limitations under the License. completion suggestion for a waypoint."> waypoint - - - - Welcome to My Tracks. Use this app to record your GPS tracks, aggregate your stats over time, - and share your paths with friends.\n\nHappy Exploring,\nThe My Tracks Team - - - Welcome to My Tracks - diff --git a/MyTracks/src/com/google/android/apps/mytracks/TrackListActivity.java b/MyTracks/src/com/google/android/apps/mytracks/TrackListActivity.java index 3e0c23296..c738846ae 100644 --- a/MyTracks/src/com/google/android/apps/mytracks/TrackListActivity.java +++ b/MyTracks/src/com/google/android/apps/mytracks/TrackListActivity.java @@ -32,8 +32,6 @@ import com.google.android.apps.mytracks.fragments.EnableSyncDialogFragment; import com.google.android.apps.mytracks.fragments.EnableSyncDialogFragment.EnableSyncCaller; import com.google.android.apps.mytracks.fragments.EulaDialogFragment; import com.google.android.apps.mytracks.fragments.EulaDialogFragment.EulaCaller; -import com.google.android.apps.mytracks.fragments.WelcomeDialogFragment; -import com.google.android.apps.mytracks.fragments.WelcomeDialogFragment.WelcomeCaller; import com.google.android.apps.mytracks.io.file.ImportActivity; import com.google.android.apps.mytracks.io.file.SaveActivity; import com.google.android.apps.mytracks.io.file.TrackFileFormat; @@ -98,7 +96,7 @@ import java.util.Locale; * @author Leif Hendrik Wilden */ public class TrackListActivity extends AbstractSendToGoogleActivity - implements EulaCaller, WelcomeCaller, EnableSyncCaller, ConfirmCaller, DeleteOneTrackCaller { + implements EulaCaller, EnableSyncCaller, ConfirmCaller, DeleteOneTrackCaller { private static final String TAG = TrackListActivity.class.getSimpleName(); private static final String START_GPS_KEY = "start_gps_key"; @@ -692,13 +690,6 @@ public class TrackListActivity extends AbstractSendToGoogleActivity EulaDialogFragment.newInstance(false) .show(getSupportFragmentManager(), EulaDialogFragment.EULA_DIALOG_TAG); } - } else if (EulaUtils.getShowWelcome(this)) { - Fragment fragment = getSupportFragmentManager() - .findFragmentByTag(WelcomeDialogFragment.WELCOME_DIALOG_TAG); - if (fragment == null) { - new WelcomeDialogFragment().show( - getSupportFragmentManager(), WelcomeDialogFragment.WELCOME_DIALOG_TAG); - } } else { /* * Before the welcome sequence, the empty view is not visible so that it @@ -719,12 +710,6 @@ public class TrackListActivity extends AbstractSendToGoogleActivity finish(); } - @Override - public void onWelcomeDone() { - EulaUtils.setShowWelcome(this); - showStartupDialogs(); - } - private void checkGooglePlayServices() { int code = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); if (code != ConnectionResult.SUCCESS) { diff --git a/MyTracks/src/com/google/android/apps/mytracks/fragments/WelcomeDialogFragment.java b/MyTracks/src/com/google/android/apps/mytracks/fragments/WelcomeDialogFragment.java deleted file mode 100644 index b1fbeda6c..000000000 --- a/MyTracks/src/com/google/android/apps/mytracks/fragments/WelcomeDialogFragment.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2012 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.fragments; - -import com.google.android.maps.mytracks.R; - -import android.app.Activity; -import android.app.AlertDialog; -import android.app.Dialog; -import android.content.DialogInterface; -import android.os.Bundle; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentActivity; - -/** - * A DialogFrament to show the welcome info. - * - * @author Jimmy Shih - */ -public class WelcomeDialogFragment extends DialogFragment { - - /** - * Interface for caller of this dialog fragment. - * - * @author Jimmy Shih - */ - public interface WelcomeCaller { - - /** - * Called when choose account is done. - */ - public void onWelcomeDone(); - } - - public static final String WELCOME_DIALOG_TAG = "welcomeDialog"; - - private WelcomeCaller caller; - private FragmentActivity fragmentActivity; - - @Override - public void onAttach(Activity activity) { - super.onAttach(activity); - try { - caller = (WelcomeCaller) activity; - } catch (ClassCastException e) { - throw new ClassCastException( - activity.toString() + " must implement " + WelcomeCaller.class.getSimpleName()); - } - } - - @Override - public Dialog onCreateDialog(Bundle savedInstanceState) { - fragmentActivity = getActivity(); - return new AlertDialog.Builder(fragmentActivity).setPositiveButton( - R.string.generic_ok, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - caller.onWelcomeDone(); - } - }).setTitle(R.string.welcome_title).setMessage(R.string.welcome_message).create(); - } - - @Override - public void onCancel(DialogInterface arg0) { - caller.onWelcomeDone(); - } -} diff --git a/MyTracks/src/com/google/android/apps/mytracks/util/EulaUtils.java b/MyTracks/src/com/google/android/apps/mytracks/util/EulaUtils.java index 9186c5108..2a612385d 100644 --- a/MyTracks/src/com/google/android/apps/mytracks/util/EulaUtils.java +++ b/MyTracks/src/com/google/android/apps/mytracks/util/EulaUtils.java @@ -30,7 +30,6 @@ public class EulaUtils { // Accepting Google mobile terms of service private static final String ACCEPT_EULA_PREFERENCE_KEY = "eula.google_mobile_tos_accepted"; - private static final String SHOW_WELCOME_PREFERENCE_KEY = "showWelcome"; private static final String SHOW_ENABLE_SYNC_PREFERENCE_KEY = "showEnableSync"; private EulaUtils() {} @@ -43,14 +42,6 @@ public class EulaUtils { setValue(context, ACCEPT_EULA_PREFERENCE_KEY, true); } - public static boolean getShowWelcome(Context context) { - return getValue(context, SHOW_WELCOME_PREFERENCE_KEY, true); - } - - public static void setShowWelcome(Context context) { - setValue(context, SHOW_WELCOME_PREFERENCE_KEY, false); - } - public static boolean getShowEnableSync(Context context) { return getValue(context, SHOW_ENABLE_SYNC_PREFERENCE_KEY, true); }