Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d8f30f0 authored by Craig Mautner's avatar Craig Mautner
Browse files

Add debug to help with b6829431.

Change-Id: Id65f5c7c187072f5a5c1418c83e06c4a6767c658
parent 2eeeec24
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@ import android.animation.AnimatorListenerAdapter;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.os.Bundle;
// TODO(cmautner): remove after fixing 6829431.
import android.os.Debug;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcel;
@@ -383,7 +385,8 @@ final class FragmentManagerState implements Parcelable {
 * Container for fragments associated with an activity.
 */
final class FragmentManagerImpl extends FragmentManager {
    static boolean DEBUG = false;
    // TODO(cmautner): restore to false after fixing 6829431.
    static boolean DEBUG = true;
    static final String TAG = "FragmentManager";
    
    static final String TARGET_REQUEST_CODE_STATE_TAG = "android:target_req_state";
@@ -732,6 +735,10 @@ final class FragmentManagerImpl extends FragmentManager {

    void moveToState(Fragment f, int newState, int transit, int transitionStyle,
            boolean keepActive) {
        // TODO(cmautner): remove after fixing 6829431.
        if (DEBUG) Log.v(TAG, "moveToState: " + f
            + " oldState=" + f.mState + " newState=" + newState
            + " mRemoving=" + f.mRemoving + " Callers=" + Debug.getCallers(5));
        // Fragments that are not currently added will sit in the onCreate() state.
        if (!f.mAdded && newState > Fragment.CREATED) {
            newState = Fragment.CREATED;