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

Commit 9bd59f27 authored by Adam Powell's avatar Adam Powell
Browse files

Follow framework API changes.

The Fragment#setStartDeferred method has been removed in favor of the
new setUserVisibleHint method. Update Contacts code that was using the
previous API in progress.

Change-Id: I9800a2c01f5343e4e732fb4649004f492c28ee97
parent 663d614c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -508,7 +508,7 @@ public class DialtactsActivity extends TransactionSafeActivity {
            mSearchFragment.setQuickContactEnabled(true);
            mSearchFragment.setDarkTheme(true);
            mSearchFragment.setPhotoPosition(ContactListItemView.PhotoPosition.LEFT);
            mSearchFragment.setStartDeferred(true);
            mSearchFragment.setUserVisibleHint(false);
            final FragmentTransaction transaction = getFragmentManager().beginTransaction();
            if (mInSearchUi) {
                transaction.show(mSearchFragment);
@@ -846,7 +846,7 @@ public class DialtactsActivity extends TransactionSafeActivity {
        // layout instead of asking the search menu item to take care of SearchView.
        mSearchView.onActionViewExpanded();
        mInSearchUi = true;
        mSearchFragment.setStartDeferred(false);
        mSearchFragment.setUserVisibleHint(true);
    }

    private void showInputMethod(View view) {
+4 −4
Original line number Diff line number Diff line
@@ -817,8 +817,8 @@ public class PeopleActivity extends ContactsActivity
            Fragment f = getFragment(position);
            mCurTransaction.show(f);

            // Non primary pages should be deferred.
            f.setStartDeferred(f != mCurrentPrimaryItem);
            // Non primary pages are not visible.
            f.setUserVisibleHint(f == mCurrentPrimaryItem);
            return f;
        }

@@ -849,10 +849,10 @@ public class PeopleActivity extends ContactsActivity
            Fragment fragment = (Fragment) object;
            if (mCurrentPrimaryItem != fragment) {
                if (mCurrentPrimaryItem != null) {
                    mCurrentPrimaryItem.setStartDeferred(true);
                    mCurrentPrimaryItem.setUserVisibleHint(false);
                }
                if (fragment != null) {
                    fragment.setStartDeferred(false);
                    fragment.setUserVisibleHint(true);
                }
                mCurrentPrimaryItem = fragment;
            }