private void doAddOp(int i, Fragment fragment, String s, int j) {
   fragment.mFragmentManager = mManager;
   if (s != null) {
     if (fragment.mTag != null && !s.equals(fragment.mTag))
       throw new IllegalStateException(
           (new StringBuilder())
               .append("Can't change tag of fragment ")
               .append(fragment)
               .append(": was ")
               .append(fragment.mTag)
               .append(" now ")
               .append(s)
               .toString());
     fragment.mTag = s;
   }
   if (i != 0) {
     if (fragment.mFragmentId != 0 && fragment.mFragmentId != i)
       throw new IllegalStateException(
           (new StringBuilder())
               .append("Can't change container ID of fragment ")
               .append(fragment)
               .append(": was ")
               .append(fragment.mFragmentId)
               .append(" now ")
               .append(i)
               .toString());
     fragment.mFragmentId = i;
     fragment.mContainerId = i;
   }
   Op op = new Op();
   op.cmd = j;
   op.fragment = fragment;
   addOp(op);
 }
예제 #2
0
 private void a(int paramInt1, Fragment paramFragment, String paramString, int paramInt2) {
   paramFragment.mFragmentManager = this.e;
   if (paramString != null) {
     if ((paramFragment.mTag != null) && (!paramString.equals(paramFragment.mTag)))
       throw new IllegalStateException(
           "Can't change tag of fragment "
               + paramFragment
               + ": was "
               + paramFragment.mTag
               + " now "
               + paramString);
     paramFragment.mTag = paramString;
   }
   if (paramInt1 != 0) {
     if ((paramFragment.mFragmentId != 0) && (paramFragment.mFragmentId != paramInt1))
       throw new IllegalStateException(
           "Can't change container ID of fragment "
               + paramFragment
               + ": was "
               + paramFragment.mFragmentId
               + " now "
               + paramInt1);
     paramFragment.mFragmentId = paramInt1;
     paramFragment.mContainerId = paramInt1;
   }
   BackStackRecord.Op localOp = new BackStackRecord.Op();
   localOp.A = paramInt2;
   localOp.B = paramFragment;
   a(localOp);
 }