Merge "Prevent ArrayIndexOutOfBoundsException for some invalid sysui_nav_bar values" am: af5b90ff45

am: e01fe74110

Change-Id: I24ac819e4d9edd59c7e4dac5ee5dea8ed4fc0148
This commit is contained in:
Mikael Magnusson
2018-01-30 20:06:19 +00:00
committed by android-build-merger

View File

@@ -219,6 +219,11 @@ public class NavigationBarInflaterView extends FrameLayout
newLayout = getDefaultLayout();
}
String[] sets = newLayout.split(GRAVITY_SEPARATOR, 3);
if (sets.length != 3) {
Log.d(TAG, "Invalid layout.");
newLayout = getDefaultLayout();
sets = newLayout.split(GRAVITY_SEPARATOR, 3);
}
String[] start = sets[0].split(BUTTON_SEPARATOR);
String[] center = sets[1].split(BUTTON_SEPARATOR);
String[] end = sets[2].split(BUTTON_SEPARATOR);