android.support.v4.util.LogWriter Java Examples

The following examples show how to use android.support.v4.util.LogWriter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BackStackRecord.java    From letv with Apache License 2.0 6 votes vote down vote up
int commitInternal(boolean allowStateLoss) {
    if (this.mCommitted) {
        throw new IllegalStateException("commit already called");
    }
    if (FragmentManagerImpl.DEBUG) {
        Log.v(TAG, "Commit: " + this);
        dump("  ", null, new PrintWriter(new LogWriter(TAG)), null);
    }
    this.mCommitted = true;
    if (this.mAddToBackStack) {
        this.mIndex = this.mManager.allocBackStackIndex(this);
    } else {
        this.mIndex = -1;
    }
    this.mManager.enqueueAction(this, allowStateLoss);
    return this.mIndex;
}
 
Example #2
Source File: l.java    From MiBandDecompiled with Apache License 2.0 6 votes vote down vote up
int a(boolean flag)
{
    if (w)
    {
        throw new IllegalStateException("commit already called");
    }
    if (v.a)
    {
        Log.v("FragmentManager", (new StringBuilder()).append("Commit: ").append(this).toString());
        a("  ", ((FileDescriptor) (null)), new PrintWriter(new LogWriter("FragmentManager")), ((String []) (null)));
    }
    w = true;
    if (t)
    {
        x = b.a(this);
    } else
    {
        x = -1;
    }
    b.a(this, flag);
    return x;
}
 
Example #3
Source File: BackStackRecord.java    From CodenameOne with GNU General Public License v2.0 6 votes vote down vote up
int commitInternal(boolean allowStateLoss) {
    if (mCommitted) throw new IllegalStateException("commit already called");
    if (FragmentManagerImpl.DEBUG) {
        Log.v(TAG, "Commit: " + this);
        LogWriter logw = new LogWriter(TAG);
        PrintWriter pw = new PrintWriter(logw);
        dump("  ", null, pw, null);
    }
    mCommitted = true;
    if (mAddToBackStack) {
        mIndex = mManager.allocBackStackIndex(this);
    } else {
        mIndex = -1;
    }
    mManager.enqueueAction(this, allowStateLoss);
    return mIndex;
}
 
Example #4
Source File: BackStackRecord.java    From adt-leanback-support with Apache License 2.0 6 votes vote down vote up
int commitInternal(boolean allowStateLoss) {
    if (mCommitted) throw new IllegalStateException("commit already called");
    if (FragmentManagerImpl.DEBUG) {
        Log.v(TAG, "Commit: " + this);
        LogWriter logw = new LogWriter(TAG);
        PrintWriter pw = new PrintWriter(logw);
        dump("  ", null, pw, null);
    }
    mCommitted = true;
    if (mAddToBackStack) {
        mIndex = mManager.allocBackStackIndex(this);
    } else {
        mIndex = -1;
    }
    mManager.enqueueAction(this, allowStateLoss);
    return mIndex;
}
 
Example #5
Source File: BackStackRecord.java    From android-recipes-app with Apache License 2.0 6 votes vote down vote up
int commitInternal(boolean allowStateLoss) {
    if (mCommitted) throw new IllegalStateException("commit already called");
    if (FragmentManagerImpl.DEBUG) {
        Log.v(TAG, "Commit: " + this);
        LogWriter logw = new LogWriter(TAG);
        PrintWriter pw = new PrintWriter(logw);
        dump("  ", null, pw, null);
    }
    mCommitted = true;
    if (mAddToBackStack) {
        mIndex = mManager.allocBackStackIndex(this);
    } else {
        mIndex = -1;
    }
    mManager.enqueueAction(this, allowStateLoss);
    return mIndex;
}
 
Example #6
Source File: BackStackRecord.java    From V.FlyoutTest with MIT License 6 votes vote down vote up
int commitInternal(boolean allowStateLoss) {
    if (mCommitted) throw new IllegalStateException("commit already called");
    if (FragmentManagerImpl.DEBUG) {
        Log.v(TAG, "Commit: " + this);
        LogWriter logw = new LogWriter(TAG);
        PrintWriter pw = new PrintWriter(logw);
        dump("  ", null, pw, null);
    }
    mCommitted = true;
    if (mAddToBackStack) {
        mIndex = mManager.allocBackStackIndex(this);
    } else {
        mIndex = -1;
    }
    mManager.enqueueAction(this, allowStateLoss);
    return mIndex;
}
 
Example #7
Source File: BackStackRecord.java    From guideshow with MIT License 6 votes vote down vote up
int commitInternal(boolean allowStateLoss) {
    if (mCommitted) throw new IllegalStateException("commit already called");
    if (FragmentManagerImpl.DEBUG) {
        Log.v(TAG, "Commit: " + this);
        LogWriter logw = new LogWriter(TAG);
        PrintWriter pw = new PrintWriter(logw);
        dump("  ", null, pw, null);
    }
    mCommitted = true;
    if (mAddToBackStack) {
        mIndex = mManager.allocBackStackIndex(this);
    } else {
        mIndex = -1;
    }
    mManager.enqueueAction(this, allowStateLoss);
    return mIndex;
}
 
Example #8
Source File: v.java    From MiBandDecompiled with Apache License 2.0 5 votes vote down vote up
private void a(RuntimeException runtimeexception)
{
    Log.e("FragmentManager", runtimeexception.getMessage());
    Log.e("FragmentManager", "Activity state:");
    PrintWriter printwriter = new PrintWriter(new LogWriter("FragmentManager"));
    if (t != null)
    {
        try
        {
            t.dump("  ", null, printwriter, new String[0]);
        }
        catch (Exception exception1)
        {
            Log.e("FragmentManager", "Failed dumping state", exception1);
        }
    } else
    {
        try
        {
            dump("  ", null, printwriter, new String[0]);
        }
        catch (Exception exception)
        {
            Log.e("FragmentManager", "Failed dumping state", exception);
        }
    }
    throw runtimeexception;
}
 
Example #9
Source File: BackStackRecord.java    From letv with Apache License 2.0 4 votes vote down vote up
public TransitionState popFromBackStack(boolean doStateMove, TransitionState state, SparseArray<Fragment> firstOutFragments, SparseArray<Fragment> lastInFragments) {
    if (FragmentManagerImpl.DEBUG) {
        Log.v(TAG, "popFromBackStack: " + this);
        dump("  ", null, new PrintWriter(new LogWriter(TAG)), null);
    }
    if (SUPPORTS_TRANSITIONS) {
        if (state == null) {
            if (!(firstOutFragments.size() == 0 && lastInFragments.size() == 0)) {
                state = beginTransition(firstOutFragments, lastInFragments, true);
            }
        } else if (!doStateMove) {
            setNameOverrides(state, this.mSharedElementTargetNames, this.mSharedElementSourceNames);
        }
    }
    bumpBackStackNesting(-1);
    int transitionStyle = state != null ? 0 : this.mTransitionStyle;
    int transition = state != null ? 0 : this.mTransition;
    Op op = this.mTail;
    while (op != null) {
        int popEnterAnim = state != null ? 0 : op.popEnterAnim;
        int popExitAnim = state != null ? 0 : op.popExitAnim;
        Fragment f;
        switch (op.cmd) {
            case 1:
                f = op.fragment;
                f.mNextAnim = popExitAnim;
                this.mManager.removeFragment(f, FragmentManagerImpl.reverseTransit(transition), transitionStyle);
                break;
            case 2:
                f = op.fragment;
                if (f != null) {
                    f.mNextAnim = popExitAnim;
                    this.mManager.removeFragment(f, FragmentManagerImpl.reverseTransit(transition), transitionStyle);
                }
                if (op.removed == null) {
                    break;
                }
                for (int i = 0; i < op.removed.size(); i++) {
                    Fragment old = (Fragment) op.removed.get(i);
                    old.mNextAnim = popEnterAnim;
                    this.mManager.addFragment(old, false);
                }
                break;
            case 3:
                f = op.fragment;
                f.mNextAnim = popEnterAnim;
                this.mManager.addFragment(f, false);
                break;
            case 4:
                f = op.fragment;
                f.mNextAnim = popEnterAnim;
                this.mManager.showFragment(f, FragmentManagerImpl.reverseTransit(transition), transitionStyle);
                break;
            case 5:
                f = op.fragment;
                f.mNextAnim = popExitAnim;
                this.mManager.hideFragment(f, FragmentManagerImpl.reverseTransit(transition), transitionStyle);
                break;
            case 6:
                f = op.fragment;
                f.mNextAnim = popEnterAnim;
                this.mManager.attachFragment(f, FragmentManagerImpl.reverseTransit(transition), transitionStyle);
                break;
            case 7:
                f = op.fragment;
                f.mNextAnim = popEnterAnim;
                this.mManager.detachFragment(f, FragmentManagerImpl.reverseTransit(transition), transitionStyle);
                break;
            default:
                throw new IllegalArgumentException("Unknown cmd: " + op.cmd);
        }
        op = op.prev;
    }
    if (doStateMove) {
        this.mManager.moveToState(this.mManager.mCurState, FragmentManagerImpl.reverseTransit(transition), transitionStyle, true);
        state = null;
    }
    if (this.mIndex >= 0) {
        this.mManager.freeBackStackIndex(this.mIndex);
        this.mIndex = -1;
    }
    return state;
}