diff --git a/astrid/AndroidManifest.xml b/astrid/AndroidManifest.xml index 97148bc03..837f2cb0a 100644 --- a/astrid/AndroidManifest.xml +++ b/astrid/AndroidManifest.xml @@ -644,11 +644,7 @@ - - - + diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/SyncUpgradePrompt.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/SyncUpgradePrompt.java deleted file mode 100644 index ebe3549f3..000000000 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/SyncUpgradePrompt.java +++ /dev/null @@ -1,137 +0,0 @@ -package com.todoroo.astrid.actfm.sync; - -import android.app.Activity; -import android.app.Dialog; -import android.content.Intent; -import android.util.TypedValue; -import android.view.View; -import android.view.View.OnClickListener; -import android.widget.Button; -import android.widget.TextView; -import android.widget.Toast; - -import com.timsu.astrid.R; -import com.todoroo.andlib.utility.DateUtilities; -import com.todoroo.andlib.utility.Preferences; -import com.todoroo.astrid.actfm.ActFmLoginActivity; -import com.todoroo.astrid.core.PluginServices; - -public class SyncUpgradePrompt { - - private static final String P_SYNC_UPGRADE_PROMPT = "p_sync_upgr_prompt"; //$NON-NLS-1$ - private static long lastPromptDate = -1; - - public static void showSyncUpgradePrompt(final Activity activity) { - if (lastPromptDate == -1) { - lastPromptDate = Preferences.getLong(P_SYNC_UPGRADE_PROMPT, 0L); - } - - Dialog d = null; - if (DateUtilities.now() - lastPromptDate > DateUtilities.ONE_WEEK * 3) { - if (!PluginServices.getActFmPreferenceService().isLoggedIn()) { - if (PluginServices.getGtasksPreferenceService().isLoggedIn()) { - // Logged into google but not astrid - d = getDialog(activity, R.string.sync_upgr_gtasks_only_title, R.string.sync_upgr_gtasks_only_body, - R.string.sync_upgr_gtasks_only_btn1, new Runnable() { - @Override - public void run() { - activity.startActivity(new Intent(activity, ActFmLoginActivity.class)); - } - }, - R.string.sync_upgr_gtasks_only_btn2, - null); - } else { - // Logged into neither - d = getDialog(activity, R.string.sync_upgr_neither_title, R.string.sync_upgr_neither_body, - R.string.sync_upgr_neither_btn1, new Runnable() { - @Override - public void run() { - activity.startActivity(new Intent(activity, ActFmLoginActivity.class)); - } - }); - } - setLastPromptDate(DateUtilities.now()); - } else if (PluginServices.getGtasksPreferenceService().isLoggedIn()) { - // Logged into both - d = getDialog(activity, R.string.sync_upgr_both_title, R.string.sync_upgr_both_body, - R.string.sync_upgr_both_btn1, - null, - R.string.sync_upgr_both_btn2, new Runnable() { - @Override - public void run() { - new ActFmSyncV2Provider().signOut(activity); - Toast.makeText(activity, R.string.sync_upgr_logged_out, Toast.LENGTH_LONG).show(); - } - }); - setLastPromptDate(Long.MAX_VALUE); - } else { - // Logged into just astrid--don't need to show prompts anymore - setLastPromptDate(Long.MAX_VALUE); - } - } - - if (d != null) { - d.show(); - } - } - - private static void setLastPromptDate(long date) { - lastPromptDate = date; - Preferences.setLong(P_SYNC_UPGRADE_PROMPT, lastPromptDate); - } - - private static Dialog getDialog(Activity activity, int title, int body, Object... buttonsAndListeners) { - final Dialog d = new Dialog(activity, R.style.ReminderDialog); - d.setContentView(R.layout.astrid_reminder_view_portrait); - ((TextView) d.findViewById(R.id.reminder_title)).setText(title); - ((TextView) d.findViewById(R.id.reminder_message)).setText(body); - - d.findViewById(R.id.dismiss).setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - d.dismiss(); - } - }); - - d.findViewById(R.id.reminder_complete).setVisibility(View.GONE); - TypedValue tv = new TypedValue(); - activity.getTheme().resolveAttribute(R.attr.asThemeTextColor, tv, false); - - int button1 = (Integer) buttonsAndListeners[0]; - final Runnable listener1 = (Runnable) buttonsAndListeners[1]; - Button b1 = (Button) d.findViewById(R.id.reminder_edit); - b1.setText(button1); - b1.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - d.dismiss(); - if (listener1 != null) { - listener1.run(); - } - } - }); - b1.setBackgroundColor(activity.getResources().getColor(tv.data)); - - if (buttonsAndListeners.length < 3) { - d.findViewById(R.id.reminder_snooze).setVisibility(View.GONE); - } else { - int button2 = (Integer) buttonsAndListeners[2]; - final Runnable listener2 = (Runnable) buttonsAndListeners[3]; - Button b2 = (Button) d.findViewById(R.id.reminder_snooze); - b2.setText(button2); - b2.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - d.dismiss(); - if (listener2 != null) { - listener2.run(); - } - } - }); - b2.setBackgroundColor(activity.getResources().getColor(tv.data)); - } - - return d; - } - -} diff --git a/astrid/res/drawable/welcome_walkthrough_2.png b/astrid/res/drawable/welcome_walkthrough_2.png deleted file mode 100644 index 673d3e661..000000000 Binary files a/astrid/res/drawable/welcome_walkthrough_2.png and /dev/null differ diff --git a/astrid/res/drawable/welcome_walkthrough_3.png b/astrid/res/drawable/welcome_walkthrough_3.png deleted file mode 100644 index 7b1c20667..000000000 Binary files a/astrid/res/drawable/welcome_walkthrough_3.png and /dev/null differ diff --git a/astrid/res/drawable/welcome_walkthrough_4.png b/astrid/res/drawable/welcome_walkthrough_4.png deleted file mode 100644 index fad9e4b60..000000000 Binary files a/astrid/res/drawable/welcome_walkthrough_4.png and /dev/null differ diff --git a/astrid/res/drawable/welcome_walkthrough_5.png b/astrid/res/drawable/welcome_walkthrough_5.png deleted file mode 100644 index bbc0b736a..000000000 Binary files a/astrid/res/drawable/welcome_walkthrough_5.png and /dev/null differ diff --git a/astrid/res/drawable/welcome_walkthrough_6.png b/astrid/res/drawable/welcome_walkthrough_6.png deleted file mode 100644 index c52027997..000000000 Binary files a/astrid/res/drawable/welcome_walkthrough_6.png and /dev/null differ diff --git a/astrid/res/layout/welcome_walkthrough.xml b/astrid/res/layout/welcome_walkthrough.xml deleted file mode 100644 index fa829e881..000000000 --- a/astrid/res/layout/welcome_walkthrough.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/astrid/res/layout/welcome_walkthrough_login_page.xml b/astrid/res/layout/welcome_walkthrough_login_page.xml deleted file mode 100644 index 0c81978bf..000000000 --- a/astrid/res/layout/welcome_walkthrough_login_page.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - -