Remove support fragments

pull/384/head
Alex Baker 9 years ago
parent efe6d5e91a
commit 9472c796db

@ -5,10 +5,10 @@
*/
package com.todoroo.astrid.gtasks.auth;
import android.app.FragmentManager;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.widget.Toast;
import com.todoroo.andlib.utility.DialogUtilities;
@ -52,11 +52,11 @@ public class GtasksLoginActivity extends InjectingAppCompatActivity implements A
Toast.makeText(this, R.string.gtasks_GLA_noaccounts, Toast.LENGTH_LONG).show();
finish();
} else {
FragmentManager supportFragmentManager = getSupportFragmentManager();
AccountSelectionDialog fragmentByTag = (AccountSelectionDialog) supportFragmentManager.findFragmentByTag(FRAG_TAG_ACCOUNT_SELECTION_DIALOG);
FragmentManager fragmentManager = getFragmentManager();
AccountSelectionDialog fragmentByTag = (AccountSelectionDialog) fragmentManager.findFragmentByTag(FRAG_TAG_ACCOUNT_SELECTION_DIALOG);
if (fragmentByTag == null) {
fragmentByTag = new AccountSelectionDialog();
fragmentByTag.show(supportFragmentManager, FRAG_TAG_ACCOUNT_SELECTION_DIALOG);
fragmentByTag.show(fragmentManager, FRAG_TAG_ACCOUNT_SELECTION_DIALOG);
}
fragmentByTag.setAccountSelectionHandler(this);
}

@ -5,9 +5,9 @@
*/
package com.todoroo.astrid.actfm;
import android.app.Fragment;
import android.content.DialogInterface;
import android.content.Intent;
import android.support.v4.app.Fragment;
import android.widget.ArrayAdapter;
import com.todoroo.astrid.activity.TaskEditFragment;

@ -5,9 +5,9 @@
*/
package com.todoroo.astrid.activity;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import com.todoroo.andlib.utility.AndroidUtilities;
@ -48,12 +48,12 @@ public abstract class AstridActivity extends InjectingAppCompatActivity
protected int fragmentLayout = LAYOUT_SINGLE;
public TaskListFragment getTaskListFragment() {
return (TaskListFragment) getSupportFragmentManager()
return (TaskListFragment) getFragmentManager()
.findFragmentByTag(TaskListFragment.TAG_TASKLIST_FRAGMENT);
}
public TaskEditFragment getTaskEditFragment() {
return (TaskEditFragment) getSupportFragmentManager()
return (TaskEditFragment) getFragmentManager()
.findFragmentByTag(TaskEditFragment.TAG_TASKEDIT_FRAGMENT);
}
@ -117,7 +117,7 @@ public abstract class AstridActivity extends InjectingAppCompatActivity
if(editActivity == null) {
editActivity = new TaskEditFragment();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
FragmentTransaction transaction = getFragmentManager().beginTransaction();
transaction.add(R.id.taskedit_fragment_container, editActivity, TaskEditFragment.TAG_TASKEDIT_FRAGMENT);
transaction.addToBackStack(null);
transaction.commit();
@ -125,7 +125,7 @@ public abstract class AstridActivity extends InjectingAppCompatActivity
@Override
public void run() {
// Force the transaction to occur so that we can be guaranteed of the fragment existing if we try to present it
getSupportFragmentManager().executePendingTransactions();
getFragmentManager().executePendingTransactions();
}
});
} else {

@ -5,9 +5,9 @@
*/
package com.todoroo.astrid.activity;
import android.app.Fragment;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
@ -51,14 +51,11 @@ public class TaskEditActivity extends AstridActivity {
}
}
/* (non-Javadoc)
* @see android.support.v4.app.FragmentActivity#onResume()
*/
@Override
protected void onResume() {
super.onResume();
Fragment frag = getSupportFragmentManager()
Fragment frag = getFragmentManager()
.findFragmentByTag(TaskListFragment.TAG_TASKLIST_FRAGMENT);
if (frag == null) {
fragmentLayout = LAYOUT_SINGLE;
@ -67,7 +64,7 @@ public class TaskEditActivity extends AstridActivity {
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
TaskEditFragment frag = (TaskEditFragment) getSupportFragmentManager()
TaskEditFragment frag = (TaskEditFragment) getFragmentManager()
.findFragmentByTag(TaskEditFragment.TAG_TASKEDIT_FRAGMENT);
if (frag != null && frag.isInLayout()) {
return frag.onKeyDown(keyCode);

@ -6,13 +6,13 @@
package com.todoroo.astrid.activity;
import android.app.Activity;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v4.view.MenuItemCompat;
import android.support.v4.widget.DrawerLayout;
@ -162,7 +162,7 @@ public class TaskListActivity extends AstridActivity implements OnFilterItemClic
}
public NavigationDrawerFragment getNavigationDrawerFragment() {
return (NavigationDrawerFragment) getSupportFragmentManager()
return (NavigationDrawerFragment) getFragmentManager()
.findFragmentById(NavigationDrawerFragment.FRAGMENT_NAVIGATION_DRAWER);
}
@ -295,14 +295,14 @@ public class TaskListActivity extends AstridActivity implements OnFilterItemClic
TaskListFragment newFragment = TaskListFragment.instantiateWithFilterAndExtras(filter, extras, customTaskList);
try {
FragmentManager manager = getSupportFragmentManager();
FragmentManager manager = getFragmentManager();
FragmentTransaction transaction = manager.beginTransaction();
transaction.replace(R.id.tasklist_fragment_container, newFragment, TaskListFragment.TAG_TASKLIST_FRAGMENT);
transaction.commit();
runOnUiThread(new Runnable() {
@Override
public void run() {
getSupportFragmentManager().executePendingTransactions();
getFragmentManager().executePendingTransactions();
}
});
} catch (Exception e) {

@ -6,6 +6,7 @@
package com.todoroo.astrid.activity;
import android.app.Activity;
import android.app.Fragment;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
@ -15,7 +16,6 @@ import android.content.res.Resources;
import android.database.Cursor;
import android.database.sqlite.SQLiteException;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.text.TextUtils;
import android.view.ContextMenu;
@ -254,13 +254,6 @@ public class TaskListFragment extends InjectingListFragment implements SwipeRefr
}
}
/*
* (non-Javadoc)
*
* @see
* android.support.v4.app.Fragment#onCreateView(android.view.LayoutInflater,
* android.view.ViewGroup, android.os.Bundle)
*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {

@ -6,13 +6,13 @@
package com.todoroo.astrid.files;
import android.app.Activity;
import android.app.Fragment;
import android.content.ActivityNotFoundException;
import android.content.ClipData;
import android.content.DialogInterface;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.support.v4.app.Fragment;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;

@ -5,12 +5,12 @@
*/
package com.todoroo.astrid.gcal;
import android.app.FragmentManager;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.support.v4.app.FragmentManager;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;

@ -5,8 +5,8 @@
*/
package com.todoroo.astrid.helper;
import android.app.Activity;
import android.content.Intent;
import android.support.v4.app.FragmentActivity;
import com.todoroo.andlib.utility.DateUtilities;
import com.todoroo.astrid.activity.TaskListFragment;
@ -39,7 +39,7 @@ public class SyncActionHelper {
// --- boilerplate
public SyncActionHelper(GtasksPreferenceService gtasksPreferenceService, SyncV2Service syncService, final FragmentActivity activity, Preferences preferences) {
public SyncActionHelper(GtasksPreferenceService gtasksPreferenceService, SyncV2Service syncService, final Activity activity, Preferences preferences) {
this.syncService = syncService;
this.preferences = preferences;
syncResultCallback = new IndeterminateProgressBarSyncResultCallback(gtasksPreferenceService, activity, new Runnable() {

@ -5,7 +5,7 @@
*/
package com.todoroo.astrid.helper;
import android.support.v4.app.FragmentActivity;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
@ -23,7 +23,7 @@ import static org.tasks.preferences.ResourceResolver.getData;
*/
public abstract class TaskEditControlSetBase implements TaskEditControlSet {
protected final FragmentActivity activity;
protected final Activity activity;
private final int viewLayout;
private boolean useTemplate;
private View view;
@ -32,11 +32,11 @@ public abstract class TaskEditControlSetBase implements TaskEditControlSet {
protected final int themeColor;
protected final int unsetColor;
public TaskEditControlSetBase(FragmentActivity activity, int viewLayout) {
public TaskEditControlSetBase(Activity activity, int viewLayout) {
this(activity, viewLayout, true);
}
public TaskEditControlSetBase(FragmentActivity activity, int viewLayout, boolean useTemplate) {
public TaskEditControlSetBase(Activity activity, int viewLayout, boolean useTemplate) {
this.activity = activity;
this.viewLayout = viewLayout;
this.useTemplate = useTemplate;

@ -6,11 +6,11 @@
package com.todoroo.astrid.notes;
import android.app.Activity;
import android.app.Fragment;
import android.content.Intent;
import android.database.sqlite.SQLiteException;
import android.graphics.Color;
import android.net.Uri;
import android.support.v4.app.Fragment;
import android.text.Editable;
import android.text.Html;
import android.text.Spanned;

@ -5,9 +5,9 @@
*/
package com.todoroo.astrid.repeats;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.support.v4.app.FragmentActivity;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;
import android.view.View;
@ -96,7 +96,7 @@ public class RepeatControlSet extends PopupControlSet {
// --- implementation
public RepeatControlSet(ActivityPreferences preferences, FragmentActivity activity, DialogBuilder dialogBuilder) {
public RepeatControlSet(ActivityPreferences preferences, Activity activity, DialogBuilder dialogBuilder) {
super(preferences, activity, R.layout.control_set_repeat, R.layout.control_set_repeat_display, R.string.repeat_enabled, dialogBuilder);
}

@ -5,7 +5,7 @@
*/
package com.todoroo.astrid.tags;
import android.support.v4.app.FragmentActivity;
import android.app.Activity;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
@ -77,7 +77,7 @@ public final class TagsControlSet extends PopupControlSet {
private final TagDataDao tagDataDao;
private final TagService tagService;
public TagsControlSet(MetadataDao metadataDao, TagDataDao tagDataDao, ActivityPreferences preferences, TagService tagService, FragmentActivity activity, DialogBuilder dialogBuilder) {
public TagsControlSet(MetadataDao metadataDao, TagDataDao tagDataDao, ActivityPreferences preferences, TagService tagService, Activity activity, DialogBuilder dialogBuilder) {
super(preferences, activity, R.layout.control_set_tag_list, R.layout.control_set_tags, R.string.TEA_tags_label_long, dialogBuilder);
this.metadataDao = metadataDao;
this.tagDataDao = tagDataDao;

@ -5,8 +5,8 @@
*/
package com.todoroo.astrid.timers;
import android.app.Activity;
import android.os.SystemClock;
import android.support.v4.app.FragmentActivity;
import android.text.format.DateFormat;
import android.view.View;
import android.view.View.OnClickListener;
@ -33,7 +33,7 @@ public class TimerActionControlSet extends TaskEditControlSetBase {
private boolean timerActive;
private final List<TimerActionListener> listeners = new LinkedList<>();
public TimerActionControlSet(final NotificationManager notificationManager, final TaskService taskService, final FragmentActivity activity, View parent) {
public TimerActionControlSet(final NotificationManager notificationManager, final TaskService taskService, final Activity activity, View parent) {
super(activity, -1);
LinearLayout timerContainer = (LinearLayout) parent.findViewById(R.id.timer_container);

@ -5,7 +5,7 @@
*/
package com.todoroo.astrid.timers;
import android.support.v4.app.FragmentActivity;
import android.app.Activity;
import android.text.TextUtils;
import android.text.format.DateUtils;
import android.view.View;
@ -34,7 +34,7 @@ public class TimerControlSet extends PopupControlSet implements TimerActionListe
private final TextView displayEdit;
private ActivityPreferences preferences;
public TimerControlSet(ActivityPreferences preferences, final FragmentActivity activity, DialogBuilder dialogBuilder) {
public TimerControlSet(ActivityPreferences preferences, final Activity activity, DialogBuilder dialogBuilder) {
super(preferences, activity, R.layout.control_set_timers_dialog, R.layout.control_set_timers, R.string.TEA_timer_controls, dialogBuilder);
this.preferences = preferences;
@ -81,7 +81,7 @@ public class TimerControlSet extends PopupControlSet implements TimerActionListe
private final TimeDurationControlSet controlSet;
private final IntegerProperty property;
public TimeDurationTaskEditControlSet(FragmentActivity activity, View v, IntegerProperty property, int timeButtonId) {
public TimeDurationTaskEditControlSet(Activity activity, View v, IntegerProperty property, int timeButtonId) {
super(activity, -1);
this.property = property;
this.controlSet = new TimeDurationControlSet(activity, v, property, timeButtonId, preferences);

@ -5,7 +5,7 @@
*/
package com.todoroo.astrid.ui;
import android.support.v4.app.FragmentActivity;
import android.app.Activity;
import android.widget.EditText;
import com.todoroo.astrid.data.Task;
@ -17,7 +17,7 @@ public class DescriptionControlSet extends TaskEditControlSetBase {
protected EditText editText;
public DescriptionControlSet(FragmentActivity activity) {
public DescriptionControlSet(Activity activity) {
super(activity, R.layout.control_set_description);
}

@ -5,7 +5,7 @@
*/
package com.todoroo.astrid.ui;
import android.support.v4.app.FragmentActivity;
import android.app.Activity;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
@ -40,7 +40,7 @@ public class ImportanceControlSet extends TaskEditControlSetBase {
void importanceChanged(int i);
}
public ImportanceControlSet(FragmentActivity activity) {
public ImportanceControlSet(Activity activity) {
super(activity, R.layout.control_set_importance);
colors = Task.getImportanceColors(activity.getResources());
}

@ -5,9 +5,9 @@
*/
package com.todoroo.astrid.ui;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.support.v4.app.FragmentActivity;
import android.support.v7.app.AlertDialog;
import android.view.View;
import android.view.View.OnClickListener;
@ -45,7 +45,7 @@ public abstract class PopupControlSet extends TaskEditControlSetBase {
}
};
public PopupControlSet(ActivityPreferences preferences, FragmentActivity activity, int viewLayout,
public PopupControlSet(ActivityPreferences preferences, Activity activity, int viewLayout,
int taskEditViewLayout, final int title, DialogBuilder dialogBuilder) {
super(activity, viewLayout, false);
this.preferences = preferences;

@ -1,12 +1,12 @@
package org.tasks.activities;
import android.app.FragmentManager;
import android.content.ContentResolver;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.support.v4.app.FragmentManager;
import android.webkit.MimeTypeMap;
import android.widget.Toast;
@ -43,11 +43,11 @@ public class AddAttachmentActivity extends InjectingAppCompatActivity implements
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FragmentManager supportFragmentManager = getSupportFragmentManager();
AddAttachmentDialog dialog = (AddAttachmentDialog) supportFragmentManager.findFragmentByTag(FRAG_TAG_ATTACHMENT_DIALOG);
FragmentManager fragmentManager = getFragmentManager();
AddAttachmentDialog dialog = (AddAttachmentDialog) fragmentManager.findFragmentByTag(FRAG_TAG_ATTACHMENT_DIALOG);
if (dialog == null) {
dialog = new AddAttachmentDialog();
dialog.show(supportFragmentManager, FRAG_TAG_ATTACHMENT_DIALOG);
dialog.show(fragmentManager, FRAG_TAG_ATTACHMENT_DIALOG);
}
dialog.setOnCancelListener(this);
dialog.setAddAttachmentCallback(this);

@ -1,8 +1,8 @@
package org.tasks.activities;
import android.app.FragmentManager;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import com.todoroo.astrid.gcal.AndroidCalendar;
@ -19,12 +19,12 @@ public class CalendarSelectionActivity extends InjectingAppCompatActivity implem
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FragmentManager supportFragmentManager = getSupportFragmentManager();
CalendarSelectionDialog fragmentByTag = (CalendarSelectionDialog) supportFragmentManager.findFragmentByTag(FRAG_TAG_CALENDAR_PREFERENCE_SELECTION);
FragmentManager fragmentManager = getFragmentManager();
CalendarSelectionDialog fragmentByTag = (CalendarSelectionDialog) fragmentManager.findFragmentByTag(FRAG_TAG_CALENDAR_PREFERENCE_SELECTION);
if (fragmentByTag == null) {
fragmentByTag = new CalendarSelectionDialog();
fragmentByTag.enableNone();
fragmentByTag.show(supportFragmentManager, FRAG_TAG_CALENDAR_PREFERENCE_SELECTION);
fragmentByTag.show(fragmentManager, FRAG_TAG_CALENDAR_PREFERENCE_SELECTION);
}
fragmentByTag.setCalendarSelectionHandler(this);
}

@ -38,12 +38,12 @@ public class TimePickerActivity extends InjectingAppCompatActivity implements Ti
initial = new DateTime(getIntent().getLongExtra(EXTRA_TIMESTAMP, currentTimeMillis()));
FragmentManager supportFragmentManager = getFragmentManager();
MyTimePickerDialog dialog = (MyTimePickerDialog) supportFragmentManager.findFragmentByTag(FRAG_TAG_TIME_PICKER);
FragmentManager fragmentManager = getFragmentManager();
MyTimePickerDialog dialog = (MyTimePickerDialog) fragmentManager.findFragmentByTag(FRAG_TAG_TIME_PICKER);
if (dialog == null) {
dialog = new MyTimePickerDialog();
dialog.initialize(null, initial.getHourOfDay(), initial.getMinuteOfHour(), 0, DateFormat.is24HourFormat(this));
dialog.show(supportFragmentManager, FRAG_TAG_TIME_PICKER);
dialog.show(fragmentManager, FRAG_TAG_TIME_PICKER);
}
dialog.setOnDismissListener(this);
dialog.setOnTimeSetListener(this);

@ -1,8 +1,7 @@
package org.tasks.injection;
import android.app.Activity;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentActivity;
import android.app.DialogFragment;
import org.tasks.activities.CalendarSelectionDialog;
import org.tasks.dialogs.AccountSelectionDialog;
@ -31,11 +30,6 @@ public class DialogFragmentModule {
this.dialogFragment = dialogFragment;
}
@Provides
public FragmentActivity getFragmentActivity() {
return dialogFragment.getActivity();
}
@Provides
public Activity getActivity() {
return dialogFragment.getActivity();

@ -1,8 +1,8 @@
package org.tasks.injection;
import android.app.Activity;
import android.app.Fragment;
import android.content.Context;
import android.support.v4.app.Fragment;
import com.todoroo.astrid.actfm.TagViewFragment;
import com.todoroo.astrid.activity.TaskEditFragment;
@ -12,7 +12,6 @@ import com.todoroo.astrid.subtasks.SubtasksListFragment;
import com.todoroo.astrid.subtasks.SubtasksTagListFragment;
import com.todoroo.astrid.ui.QuickAddBar;
import org.tasks.reminders.MissedCallDialog;
import org.tasks.ui.NavigationDrawerFragment;
import javax.inject.Singleton;

@ -1,7 +1,7 @@
package org.tasks.injection;
import android.app.Activity;
import android.support.v4.app.DialogFragment;
import android.app.DialogFragment;
public class InjectingDialogFragment extends DialogFragment {
private boolean injected;

@ -1,7 +1,7 @@
package org.tasks.injection;
import android.app.Activity;
import android.support.v4.app.Fragment;
import android.app.Fragment;
import dagger.ObjectGraph;

@ -1,7 +1,7 @@
package org.tasks.injection;
import android.app.Activity;
import android.support.v4.app.ListFragment;
import android.app.ListFragment;
import dagger.ObjectGraph;

@ -1,9 +1,9 @@
package org.tasks.reminders;
import android.app.FragmentManager;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.text.TextUtils;
import com.todoroo.astrid.data.Task;
@ -55,11 +55,11 @@ public class MissedCallActivity extends InjectingAppCompatActivity implements Mi
} else if (intent.getBooleanExtra(EXTRA_CALL_LATER, false)) {
callLater();
} else {
FragmentManager supportFragmentManager = getSupportFragmentManager();
MissedCallDialog fragment = (MissedCallDialog) supportFragmentManager.findFragmentByTag(FRAG_TAG_MISSED_CALL_FRAGMENT);
FragmentManager fragmentManager = getFragmentManager();
MissedCallDialog fragment = (MissedCallDialog) fragmentManager.findFragmentByTag(FRAG_TAG_MISSED_CALL_FRAGMENT);
if (fragment == null) {
fragment = new MissedCallDialog();
fragment.show(supportFragmentManager, FRAG_TAG_MISSED_CALL_FRAGMENT);
fragment.show(fragmentManager, FRAG_TAG_MISSED_CALL_FRAGMENT);
}
fragment.setTitle(intent.getStringExtra(EXTRA_TITLE));
}

@ -1,8 +1,8 @@
package org.tasks.reminders;
import android.app.FragmentManager;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import org.tasks.Broadcaster;
import org.tasks.injection.InjectingAppCompatActivity;
@ -40,11 +40,11 @@ public class NotificationActivity extends InjectingAppCompatActivity implements
taskId = intent.getLongExtra(EXTRA_TASK_ID, 0L);
FragmentManager supportFragmentManager = getSupportFragmentManager();
NotificationDialog fragment = (NotificationDialog) supportFragmentManager.findFragmentByTag(FRAG_TAG_NOTIFICATION_FRAGMENT);
FragmentManager fragmentManager = getFragmentManager();
NotificationDialog fragment = (NotificationDialog) fragmentManager.findFragmentByTag(FRAG_TAG_NOTIFICATION_FRAGMENT);
if (fragment == null) {
fragment = new NotificationDialog();
fragment.show(supportFragmentManager, FRAG_TAG_NOTIFICATION_FRAGMENT);
fragment.show(fragmentManager, FRAG_TAG_NOTIFICATION_FRAGMENT);
}
fragment.setTitle(intent.getStringExtra(EXTRA_TITLE));
}

@ -1,9 +1,9 @@
package org.tasks.reminders;
import android.app.FragmentManager;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.reminders.SnoozeCallback;
@ -59,11 +59,11 @@ public class SnoozeActivity extends InjectingAppCompatActivity implements Snooze
startupService.onStartupApplication(this);
FragmentManager supportFragmentManager = getSupportFragmentManager();
SnoozeDialog fragmentByTag = (SnoozeDialog) supportFragmentManager.findFragmentByTag(FRAG_TAG_SNOOZE_DIALOG);
FragmentManager fragmentManager = getFragmentManager();
SnoozeDialog fragmentByTag = (SnoozeDialog) fragmentManager.findFragmentByTag(FRAG_TAG_SNOOZE_DIALOG);
if (fragmentByTag == null) {
fragmentByTag = new SnoozeDialog();
fragmentByTag.show(supportFragmentManager, FRAG_TAG_SNOOZE_DIALOG);
fragmentByTag.show(fragmentManager, FRAG_TAG_SNOOZE_DIALOG);
}
fragmentByTag.setOnCancelListener(this);
fragmentByTag.setSnoozeCallback(this);

@ -1,6 +1,6 @@
package org.tasks.sync;
import android.support.v4.app.FragmentActivity;
import android.app.Activity;
import com.todoroo.astrid.gtasks.GtasksPreferenceService;
@ -8,10 +8,10 @@ import timber.log.Timber;
public class IndeterminateProgressBarSyncResultCallback extends RecordSyncStatusCallback {
private final FragmentActivity activity;
private final Activity activity;
private Runnable onFinished;
public IndeterminateProgressBarSyncResultCallback(GtasksPreferenceService gtasksPreferenceService, FragmentActivity activity, Runnable onFinished) {
public IndeterminateProgressBarSyncResultCallback(GtasksPreferenceService gtasksPreferenceService, Activity activity, Runnable onFinished) {
super(gtasksPreferenceService);
this.activity = activity;

@ -1,8 +1,8 @@
package org.tasks.ui;
import android.app.Activity;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.support.v4.app.FragmentActivity;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.text.format.DateFormat;
import android.view.LayoutInflater;
@ -53,7 +53,7 @@ public class DeadlineControlSet extends TaskEditControlSetBase {
private final String todayString;
private final String tomorrowString;
private FragmentActivity activity;
private Activity activity;
private ActivityPreferences preferences;
private Spinner dueDateSpinner;
private Spinner dueTimeSpinner;
@ -63,7 +63,7 @@ public class DeadlineControlSet extends TaskEditControlSetBase {
private long date = 0;
private int time = -1;
public DeadlineControlSet(FragmentActivity activity, ActivityPreferences preferences) {
public DeadlineControlSet(Activity activity, ActivityPreferences preferences) {
super(activity, R.layout.control_set_deadline);
this.activity = activity;
this.preferences = preferences;

Loading…
Cancel
Save