Switch RS support lib to use LOCAL_SDK_VERSION.

The RS support lib wasn't setting LOCAL_SDK_VERSION, which caused
problems where hidden specialized system methods would be used on
devices without said methods.

bug 17189604

Change-Id: Iea51308625fe19c03e3302e3106e1a7c3e1cbc25
Merge "Switch RS support lib to use LOCAL_SDK_VERSION."
Add -no-integrated-as at local level.

Later we will enable integrated-as as default at the global level.

BUG: 17820427

Change-Id: Ie2e656ccd27a5b8a3b2c1ad20fd2ca9cbaf6d013
Merge "Add -no-integrated-as at local level."
Ensure Fragment is Added before attempting to save state

When a FragmentStatePagerAdapter is set to a ViewPager in onCreate
the Fragments are populated, and it is assumed that they will be
added to the FragmentManager for saving state later. This is not
guaranteed and will result in an IllegalStateException if they are
not added, such as if a new Activity is started in onCreate.

This change checks Fragment.isAdded() before proceeding to save
state.

Issue: https://code.google.com/p/android/issues/detail?id=77285

Change-Id: I9197cb319a2b1bf070ab1fd8a7abbf9ee01de543
Signed-off-by: Bryan Emmanuel <piusvelte@gmail.com>
Merge "Ensure Fragment is Added before attempting to save state"
Merge remote-tracking branch 'remotes/google/master' into AOSPisDead