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

Skip to content
Commit 26dc5592 authored by Brian Attwell's avatar Brian Attwell
Browse files

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
parent fc50bdd1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment