summaryrefslogtreecommitdiffstats
path: root/src/com/android/mail/ui/MailActivity.java
diff options
context:
space:
mode:
authorRégis Décamps <regisd@google.com>2014-06-23 11:04:38 +0200
committerRégis Décamps <regisd@google.com>2014-06-26 09:33:39 +0000
commit62e1496cb42c21b5348ebe795cd2fabd7574d3e1 (patch)
tree594bea77fb456fef045a4274c3f39481fc88e854 /src/com/android/mail/ui/MailActivity.java
parent543dcb2880915bc1d1563a2df2399805f550a89b (diff)
downloadandroid_packages_apps_UnifiedEmail-62e1496cb42c21b5348ebe795cd2fabd7574d3e1.tar.gz
android_packages_apps_UnifiedEmail-62e1496cb42c21b5348ebe795cd2fabd7574d3e1.tar.bz2
android_packages_apps_UnifiedEmail-62e1496cb42c21b5348ebe795cd2fabd7574d3e1.zip
Refactor how the warm welcome is triggered.
- The welcome tour is an independent activity. AbstractActivityController doesn't need a specific ViewMode (this should also fix b/15747390) and doesn't implement WelcomeTourCompletionListener anymore. - MailActivity returns the warm welcome loader callback. - The MailActivityEmail, FolderSelectionActivity don't implement onWelcomeTourRequested anymore. - ControllableActivty implements WelcomeTourListener. - OnePaneController and TwoPaneController transition to the inbox as they used to. - WelcomeTourListener renamed onWelcomeTourComplete to onWelcomeTourFinished and returns a status (completed, discarded, or not shown). b/15705426 Change-Id: I9af1f7c2ee5a5819d5df2d860547a2668f1d5cf6
Diffstat (limited to 'src/com/android/mail/ui/MailActivity.java')
-rw-r--r--src/com/android/mail/ui/MailActivity.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/com/android/mail/ui/MailActivity.java b/src/com/android/mail/ui/MailActivity.java
index 97179090f..30e4cc5da 100644
--- a/src/com/android/mail/ui/MailActivity.java
+++ b/src/com/android/mail/ui/MailActivity.java
@@ -18,6 +18,7 @@
package com.android.mail.ui;
import android.app.Dialog;
+import android.app.LoaderManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@@ -42,7 +43,6 @@ import com.android.mail.providers.Account;
import com.android.mail.providers.Folder;
import com.android.mail.utils.StorageLowState;
import com.android.mail.utils.Utils;
-import com.android.mail.welcome.WelcomeTourCompletionListener;
import com.android.oldbitmap.AltBitmapCache;
import com.android.oldbitmap.BitmapCache;
@@ -476,9 +476,15 @@ public class MailActivity extends AbstractMailActivity implements ControllableAc
Utils.showHelp(this, account, getString(helpContext));
}
- @Override
- public void onWelcomeTourRequested(
- WelcomeTourCompletionListener completionListener) {
- // Do nothing.
+ /**
+ * Returns the loader callback that can create a
+ * {@link AbstractActivityController#LOADER_WELCOME_TOUR} which determines whether the welcome
+ * tour should be displayed.
+ *
+ * The base implementation returns {@code null} and subclasses should return an actual
+ * implementation if they want to be invoked at appropriate time.
+ */
+ public LoaderManager.LoaderCallbacks<Boolean> getWelcomeCallbacks() {
+ return null;
}
}