Don't initialize ActionBar with invalid tab index
If an invalid tab index is persisted to SharedPreferences then every time you open the People app, the app will crash. This CL fixes this crash. It doesn't prevent the tab index from getting in an invalid state in the first place. I don't understand how this invalid tab index gets set. The ActionBarImpl and TabPagerAdapter would both have to believe that a tab at position 3 exists, otherwise a crash would occur before an invalid tab index could be persisted. TESTING -verified that I could close and open the app from every tab position -pushed an invalid shared_preferences.xml to a phone. This causes crashes without this CL. This CL fixes the crashes. Bug: 12938207 Change-Id: I6eb9a9043dcc76ce94a1cc280c7441e57a4abfd1 (cherry picked from commit 26dc5592)
Loading
Please register or sign in to comment