backup out of ppack

pull/14/head
Tim Su 14 years ago
parent 543bebfc4a
commit 3310285b90

@ -13,10 +13,8 @@ import android.view.ViewGroup.OnHierarchyChangeListener;
import com.timsu.astrid.R; import com.timsu.astrid.R;
import com.todoroo.andlib.utility.DateUtilities; import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.andlib.utility.DialogUtilities; import com.todoroo.andlib.utility.DialogUtilities;
import com.todoroo.andlib.widget.TodorooPreferences;
import com.todoroo.astrid.activity.AddOnActivity;
import com.todoroo.astrid.core.PluginServices;
import com.todoroo.andlib.utility.Preferences; import com.todoroo.andlib.utility.Preferences;
import com.todoroo.andlib.widget.TodorooPreferences;
/** /**
* Displays synchronization preferences and an action panel so users can * Displays synchronization preferences and an action panel so users can
@ -55,22 +53,6 @@ public class BackupPreferences extends TodorooPreferences {
view.setBackgroundColor(statusColor); view.setBackgroundColor(statusColor);
} }
}); });
if(!PluginServices.getAddOnService().hasPowerPack()) {
Preference restorePreference = new Preference(this);
restorePreference.setTitle(R.string.backup_BPr_how_to_restore);
restorePreference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
DialogUtilities.okCancelDialog(BackupPreferences.this,
getString(R.string.DLG_information_title),
getString(R.string.backup_BPr_how_to_restore_dialog),
AddOnActivity.createAddOnClicker(BackupPreferences.this, false), null);
return false;
}
});
getPreferenceScreen().addPreference(restorePreference);
}
} }
@Override @Override

@ -3,9 +3,9 @@ package com.todoroo.astrid.activity;
import java.util.Date; import java.util.Date;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.Map.Entry;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;
import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import android.app.AlertDialog; import android.app.AlertDialog;
@ -27,28 +27,28 @@ import android.text.Editable;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.view.ContextMenu; import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnKeyListener;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.View.OnClickListener;
import android.view.View.OnKeyListener;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.widget.AbsListView; import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollListener;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast;
import android.widget.AbsListView.OnScrollListener;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.TextView.OnEditorActionListener; import android.widget.TextView.OnEditorActionListener;
import android.widget.Toast;
import com.timsu.astrid.R; import com.timsu.astrid.R;
import com.todoroo.andlib.data.Property; import com.todoroo.andlib.data.Property;
@ -70,7 +70,6 @@ import com.todoroo.astrid.api.PermaSql;
import com.todoroo.astrid.api.SyncAction; import com.todoroo.astrid.api.SyncAction;
import com.todoroo.astrid.api.TaskAction; import com.todoroo.astrid.api.TaskAction;
import com.todoroo.astrid.api.TaskDecoration; import com.todoroo.astrid.api.TaskDecoration;
import com.todoroo.astrid.backup.BackupActivity;
import com.todoroo.astrid.core.CoreFilterExposer; import com.todoroo.astrid.core.CoreFilterExposer;
import com.todoroo.astrid.dao.Database; import com.todoroo.astrid.dao.Database;
import com.todoroo.astrid.dao.TaskDao.TaskCriteria; import com.todoroo.astrid.dao.TaskDao.TaskCriteria;
@ -275,10 +274,6 @@ public class TaskListActivity extends ListActivity implements OnScrollListener,
for(int i = 0; i < length; i++) { for(int i = 0; i < length; i++) {
ResolveInfo resolveInfo = resolveInfoList.get(i); ResolveInfo resolveInfo = resolveInfoList.get(i);
if(!addOnService.hasPowerPack() &&
BackupActivity.class.getName().equals(resolveInfo.activityInfo.name))
continue;
item = menu.add(Menu.NONE, MENU_ADDON_INTENT_ID, Menu.NONE, item = menu.add(Menu.NONE, MENU_ADDON_INTENT_ID, Menu.NONE,
resolveInfo.loadLabel(pm)); resolveInfo.loadLabel(pm));
item.setIcon(resolveInfo.loadIcon(pm)); item.setIcon(resolveInfo.loadIcon(pm));

Loading…
Cancel
Save