Merge "[Settings] DataUsage crash when no SIM inserted"
diff --git a/OWNERS b/OWNERS
index e5b26dc..16fc48c 100644
--- a/OWNERS
+++ b/OWNERS
@@ -12,8 +12,5 @@
tmfang@google.com
yantingyang@google.com
-# Emergency approvers in case the above are not available
-zhfan@google.com
-
# Exempt resource files (because they are in a flat directory and too hard to manage via OWNERS)
per-file *.xml=*
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index 396a485..9c3a622 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -957,6 +957,9 @@
<item>IPSec Xauth PSK</item>
<item>IPSec Xauth RSA</item>
<item>IPSec Hybrid RSA</item>
+ <item>IKEv2/IPSec MSCHAPv2</item>
+ <item>IKEv2/IPSec PSK</item>
+ <item>IKEv2/IPSec RSA</item>
</string-array>
<!-- Match this with the constants in VpnProfile. --> <skip />
@@ -968,6 +971,9 @@
<item>IPSec VPN with pre-shared keys and Xauth authentication</item>
<item>IPSec VPN with certificates and Xauth authentication</item>
<item>IPSec VPN with certificates and hybrid authentication</item>
+ <item>IKEv2/IPSec VPN with certificates and username/password authentication</item>
+ <item>IKEv2/IPSec VPN with pre-shared keys</item>
+ <item>IKEv2/IPSec VPN with certificates</item>
</string-array>
<!-- VPN proxy settings. -->
diff --git a/src/com/android/settings/development/OverlayCategoryPreferenceController.java b/src/com/android/settings/development/OverlayCategoryPreferenceController.java
index 6e0b2d0..ce51b54 100644
--- a/src/com/android/settings/development/OverlayCategoryPreferenceController.java
+++ b/src/com/android/settings/development/OverlayCategoryPreferenceController.java
@@ -126,8 +126,8 @@
return mOverlayManager.setEnabledExclusiveInCategory(packageName,
USER_SYSTEM);
}
- } catch (RemoteException re) {
- Log.w(TAG, "Error enabling overlay.", re);
+ } catch (SecurityException | IllegalStateException | RemoteException e) {
+ Log.w(TAG, "Error enabling overlay.", e);
return false;
}
}
diff --git a/src/com/android/settings/fuelgauge/InactiveApps.java b/src/com/android/settings/fuelgauge/InactiveApps.java
index c386a7d..a5056a9 100644
--- a/src/com/android/settings/fuelgauge/InactiveApps.java
+++ b/src/com/android/settings/fuelgauge/InactiveApps.java
@@ -21,6 +21,7 @@
import static android.app.usage.UsageStatsManager.STANDBY_BUCKET_FREQUENT;
import static android.app.usage.UsageStatsManager.STANDBY_BUCKET_NEVER;
import static android.app.usage.UsageStatsManager.STANDBY_BUCKET_RARE;
+import static android.app.usage.UsageStatsManager.STANDBY_BUCKET_RESTRICTED;
import static android.app.usage.UsageStatsManager.STANDBY_BUCKET_WORKING_SET;
import android.app.settings.SettingsEnums;
@@ -46,13 +47,14 @@
implements Preference.OnPreferenceChangeListener {
private static final CharSequence[] SETTABLE_BUCKETS_NAMES =
- {"ACTIVE", "WORKING_SET", "FREQUENT", "RARE"};
+ {"ACTIVE", "WORKING_SET", "FREQUENT", "RARE", "RESTRICTED"};
private static final CharSequence[] SETTABLE_BUCKETS_VALUES = {
Integer.toString(STANDBY_BUCKET_ACTIVE),
Integer.toString(STANDBY_BUCKET_WORKING_SET),
Integer.toString(STANDBY_BUCKET_FREQUENT),
- Integer.toString(STANDBY_BUCKET_RARE)
+ Integer.toString(STANDBY_BUCKET_RARE),
+ Integer.toString(STANDBY_BUCKET_RESTRICTED)
};
private UsageStatsManager mUsageStats;
@@ -83,7 +85,6 @@
screen.setOrderingAsAdded(false);
final Context context = getActivity();
final PackageManager pm = context.getPackageManager();
- final UsageStatsManager usm = context.getSystemService(UsageStatsManager.class);
final String settingsPackage = context.getPackageName();
Intent launcherIntent = new Intent(Intent.ACTION_MAIN);
@@ -115,6 +116,7 @@
case STANDBY_BUCKET_WORKING_SET: return "WORKING_SET";
case STANDBY_BUCKET_FREQUENT: return "FREQUENT";
case STANDBY_BUCKET_RARE: return "RARE";
+ case STANDBY_BUCKET_RESTRICTED: return "RESTRICTED";
case STANDBY_BUCKET_NEVER: return "NEVER";
}
return "";
@@ -129,7 +131,7 @@
// purposes and can either not be changed out of, or might have undesirable
// side-effects in combination with other assumptions.
final boolean changeable = appBucket >= STANDBY_BUCKET_ACTIVE
- && appBucket <= STANDBY_BUCKET_RARE;
+ && appBucket <= STANDBY_BUCKET_RESTRICTED;
if (changeable) {
p.setValue(Integer.toString(appBucket));
}
diff --git a/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java b/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
index 2340236..ab8327c 100644
--- a/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
+++ b/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
@@ -200,7 +200,7 @@
private Color[] getColors() {
final Resources res = getContext().getResources();
- final int[] colorInts = res.getIntArray(com.android.internal.R.array.sim_colors);
+ final int[] colorInts = res.getIntArray(android.R.array.simColors);
final String[] colorStrings = res.getStringArray(R.array.color_picker);
final int iconSize = res.getDimensionPixelSize(R.dimen.color_swatch_size);
final int strokeWidth = res.getDimensionPixelSize(R.dimen.color_swatch_stroke_width);
diff --git a/tests/robotests/src/com/android/settings/wifi/calling/ListWithEntrySummaryPreferenceTest.java b/tests/robotests/src/com/android/settings/wifi/calling/ListWithEntrySummaryPreferenceTest.java
index 307c0ac..b4ad167 100644
--- a/tests/robotests/src/com/android/settings/wifi/calling/ListWithEntrySummaryPreferenceTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/calling/ListWithEntrySummaryPreferenceTest.java
@@ -28,12 +28,14 @@
import com.android.settings.R;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
@RunWith(RobolectricTestRunner.class)
+@Ignore
public class ListWithEntrySummaryPreferenceTest {
private Context mContext;