Fix NPE on tablet contact card with social updates
- In tablet portrait, instead of having 3 fragments
on screen (2 fragments for the view pager and
1 detail fragment for contact with no updates), just
have 2 fragments where the view pager adapter has
count = 1 when there are no updates (which disables
the swipe).
- Store whether or not the contact has updates in
the save instance state bundle so it can be
restored in onCreate()
- Set retain instance = true for the ContactLoaderFragment
- There should always be a ContactDetailFragment and
ContactDetailUpdatesFragment after onCreate() of the
PeopleActivity on the tablet
- Basically apply similar logic from the phone CL:
https://android-git.corp.google.com/g/#change,125585
- TODO: Take out duplicated code from ContactDetailLayoutController
and ContactDetailActivity
Bug: 5106878
Bug: 5082871
Change-Id: I3af08bf84072d3d94e4f3a6bc1d01faf3432e3e7
8 files changed