TetherSettings: check provisionApp array length

Before attempting to get values from the provisionApp array, check to
make sure there are at least two elements.

BUG: 30889755
Change-Id: I42d6f8754910c12acf7bb3fbcc12e3f7be30d5e9
TEST: manually tried to open settings and it did not crash
diff --git a/src/com/android/settings/TetherSettings.java b/src/com/android/settings/TetherSettings.java
index 3f91293..2af3a89 100644
--- a/src/com/android/settings/TetherSettings.java
+++ b/src/com/android/settings/TetherSettings.java
@@ -509,6 +509,9 @@
     private static boolean isIntentAvailable(Context context) {
         String[] provisionApp = context.getResources().getStringArray(
                 com.android.internal.R.array.config_mobile_hotspot_provision_app);
+        if (provisionApp.length < 2) {
+            return false;
+        }
         final PackageManager packageManager = context.getPackageManager();
         Intent intent = new Intent(Intent.ACTION_MAIN);
         intent.setClassName(provisionApp[0], provisionApp[1]);