diff options
author | keyboardr <keyboardr@google.com> | 2017-06-26 15:16:26 -0700 |
---|---|---|
committer | Brandon Maxwell <maxwelb@google.com> | 2017-06-30 14:33:17 -0700 |
commit | a60579e8f6abff88814d940f9da51e22788d6007 (patch) | |
tree | 188bdb9ec664a2d572efef0f87841958fa966c9d /java/com/android/dialer/app/voicemail | |
parent | 4b499669dde98f485199fd38883ad0dc26d1f0f3 (diff) |
All Fragments are now support library Fragments.
Switch a bunch of imports to support library Fragments (and Loaders) instead of framework Fragments (and Loaders). This was needed to use FragmentManager.isStateSaved() instead of manually tracking that state. This should reduce errors around committing after state is saved.
Also adds METADATA presubmit to prevent new usages of framework Fragments or Loaders.
Bug: 38241305
Test: Covered by existing tests.
PiperOrigin-RevId: 160202511
Change-Id: I5dc0b467da984ca571e49b4dfa0deea44eb372b2
Diffstat (limited to 'java/com/android/dialer/app/voicemail')
-rw-r--r-- | java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java b/java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java index 5c9bc01c2..856767c59 100644 --- a/java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java +++ b/java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java @@ -37,6 +37,7 @@ import android.provider.VoicemailContract.Voicemails; import android.support.annotation.MainThread; import android.support.annotation.Nullable; import android.support.annotation.VisibleForTesting; +import android.support.v4.app.FragmentActivity; import android.support.v4.content.FileProvider; import android.text.TextUtils; import android.util.Pair; @@ -127,7 +128,7 @@ public class VoicemailPlaybackPresenter protected MediaPlayer mMediaPlayer; // Used to run async tasks that need to interact with the UI. protected AsyncTaskExecutor mAsyncTaskExecutor; - private Activity mActivity; + private FragmentActivity mActivity; private PlaybackView mView; private int mPosition; private boolean mIsPlaying; @@ -175,7 +176,7 @@ public class VoicemailPlaybackPresenter */ @MainThread public static VoicemailPlaybackPresenter getInstance( - Activity activity, Bundle savedInstanceState) { + FragmentActivity activity, Bundle savedInstanceState) { if (sInstance == null) { sInstance = new VoicemailPlaybackPresenter(activity); } @@ -193,7 +194,7 @@ public class VoicemailPlaybackPresenter /** Update variables which are activity-dependent or state-dependent. */ @MainThread - protected void init(Activity activity, Bundle savedInstanceState) { + protected void init(FragmentActivity activity, Bundle savedInstanceState) { Assert.isMainThread(); mActivity = activity; mContext = activity; @@ -220,7 +221,7 @@ public class VoicemailPlaybackPresenter } shareVoicemailExecutor = DialerExecutors.createUiTaskBuilder( - mActivity.getFragmentManager(), "test", new ShareVoicemailWorker()) + mActivity.getSupportFragmentManager(), "test", new ShareVoicemailWorker()) .onSuccess( output -> { if (output == null) { |