diff --git a/MyTracks/src/com/google/android/apps/mytracks/AccountChooser.java b/MyTracks/src/com/google/android/apps/mytracks/AccountChooser.java index ff2a2d0ea..817c1401c 100644 --- a/MyTracks/src/com/google/android/apps/mytracks/AccountChooser.java +++ b/MyTracks/src/com/google/android/apps/mytracks/AccountChooser.java @@ -44,7 +44,7 @@ public class AccountChooser { * Handle the account being selected. * @param account The selected account or null if none could be found */ - public void handleAccountSelected(Account account); + public void onAccountSelected(Account account); } /** @@ -65,13 +65,13 @@ public class AccountChooser { return; } if (accounts.length == 1) { - handler.handleAccountSelected(accounts[0]); + handler.onAccountSelected(accounts[0]); return; } // TODO This should be read out of a preference. if (selectedAccount != null) { - handler.handleAccountSelected(selectedAccount); + handler.onAccountSelected(selectedAccount); return; } @@ -89,14 +89,14 @@ public class AccountChooser { selectedAccount = accounts[selectedAccountIndex]; } - handler.handleAccountSelected(selectedAccount); + handler.onAccountSelected(selectedAccount); } }); builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); - handler.handleAccountSelected(null); + handler.onAccountSelected(null); } }); String[] choices = new String[accounts.length]; @@ -127,7 +127,7 @@ public class AccountChooser { new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); - handler.handleAccountSelected(null); + handler.onAccountSelected(null); } }); builder.show(); diff --git a/MyTracks/src/com/google/android/apps/mytracks/MyMapsList.java b/MyTracks/src/com/google/android/apps/mytracks/MyMapsList.java index 3e3f0096c..d0df15b0f 100644 --- a/MyTracks/src/com/google/android/apps/mytracks/MyMapsList.java +++ b/MyTracks/src/com/google/android/apps/mytracks/MyMapsList.java @@ -84,7 +84,7 @@ public class MyMapsList extends Activity implements MapsFacade.MapsListCallback MyMapsList.this, new AccountChooser.AccountHandler() { @Override - public void handleAccountSelected(Account account) { + public void onAccountSelected(Account account) { // Account selection happens in the UI thread. if (account != null) { // The user did not quit and there was a valid google diff --git a/MyTracks/src/com/google/android/apps/mytracks/io/AuthManager.java b/MyTracks/src/com/google/android/apps/mytracks/io/AuthManager.java index a1a7fd1ea..388717b73 100644 --- a/MyTracks/src/com/google/android/apps/mytracks/io/AuthManager.java +++ b/MyTracks/src/com/google/android/apps/mytracks/io/AuthManager.java @@ -1,12 +1,12 @@ /* * Copyright 2010 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 @@ -20,11 +20,10 @@ import android.content.Intent; /** * This interface describes a class that will fetch and maintain a Google * authentication token. - * + * * @author Sandor Dornbush */ public interface AuthManager { - /** * Initializes the login process. The user should be asked to login if they * haven't already. The {@link Runnable} provided will be executed when the @@ -34,7 +33,7 @@ public interface AuthManager { * has been successfully fetched and is available via * {@link #getAuthToken()} */ - public abstract void doLogin(Runnable whenFinished, Object o); + void doLogin(Runnable whenFinished, Object o); /** * The {@link android.app.Activity} owner of this class should call this @@ -53,7 +52,7 @@ public interface AuthManager { * the auth token, or False if there was an error or the request was * canceled */ - public abstract boolean authResult(int resultCode, Intent results); + boolean authResult(int resultCode, Intent results); /** * Returns the current auth token. Response may be null if no valid auth @@ -62,7 +61,7 @@ public interface AuthManager { * @return The current auth token or null if no auth token has been * fetched */ - public abstract String getAuthToken(); + String getAuthToken(); /** * Invalidates the existing auth token and request a new one. The @@ -72,6 +71,5 @@ public interface AuthManager { * @param whenFinished A {@link Runnable} to execute when a new auth token * is successfully fetched */ - public abstract void invalidateAndRefresh(Runnable whenFinished); - + void invalidateAndRefresh(Runnable whenFinished); } diff --git a/MyTracks/src/com/google/android/apps/mytracks/io/ModernAuthManager.java b/MyTracks/src/com/google/android/apps/mytracks/io/ModernAuthManager.java index 8048f4fab..6d5c206ec 100644 --- a/MyTracks/src/com/google/android/apps/mytracks/io/ModernAuthManager.java +++ b/MyTracks/src/com/google/android/apps/mytracks/io/ModernAuthManager.java @@ -187,7 +187,7 @@ public class ModernAuthManager implements AuthManager { accountChooser.chooseAccount(activity, new AccountChooser.AccountHandler() { @Override - public void handleAccountSelected(Account account) { + public void onAccountSelected(Account account) { if (account != null) { doLogin(whenFinished, account); } else { diff --git a/MyTracks/src/com/google/android/apps/mytracks/io/sendtogoogle/SendActivity.java b/MyTracks/src/com/google/android/apps/mytracks/io/sendtogoogle/SendActivity.java index d19367402..06876b5c0 100644 --- a/MyTracks/src/com/google/android/apps/mytracks/io/sendtogoogle/SendActivity.java +++ b/MyTracks/src/com/google/android/apps/mytracks/io/sendtogoogle/SendActivity.java @@ -533,7 +533,7 @@ public class SendActivity extends Activity implements ProgressIndicator { accountChooser.chooseAccount(SendActivity.this, new AccountChooser.AccountHandler() { @Override - public void handleAccountSelected(Account account) { + public void onAccountSelected(Account account) { if (account == null) { progressDialog.dismiss(); progressDialog = null;