summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/hardware/Camera.java6
-rw-r--r--core/java/com/android/internal/widget/LockPatternUtils.java6
-rw-r--r--core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java8
-rw-r--r--core/res/res/drawable-hdpi/ic_emergency.pngbin1045 -> 943 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_chevron_down.pngbin688 -> 1109 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_chevron_left.pngbin665 -> 1183 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_chevron_right.pngbin665 -> 1175 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_lockscreen_chevron_up.pngbin698 -> 1097 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.pngbin731 -> 186 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_copy_holo_light.pngbin683 -> 199 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.pngbin1298 -> 727 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_cut_holo_light.pngbin1130 -> 769 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.pngbin1018 -> 344 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_paste_holo_light.pngbin893 -> 337 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_selectall_holo_dark.pngbin626 -> 185 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_selectall_holo_light.pngbin435 -> 216 bytes
-rw-r--r--[-rwxr-xr-x]core/res/res/drawable-mdpi/ic_emergency.pngbin900 -> 700 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_lockscreen_chevron_down.pngbin538 -> 740 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_lockscreen_chevron_left.pngbin533 -> 754 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_lockscreen_chevron_right.pngbin534 -> 752 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_lockscreen_chevron_up.pngbin536 -> 748 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.pngbin612 -> 162 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_copy_holo_light.pngbin570 -> 161 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.pngbin879 -> 486 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_cut_holo_light.pngbin761 -> 493 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.pngbin740 -> 226 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_paste_holo_light.pngbin669 -> 203 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_selectall_holo_dark.pngbin586 -> 167 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_selectall_holo_light.pngbin726 -> 166 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_emergency.pngbin2170 -> 1195 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_lockscreen_chevron_down.pngbin859 -> 1363 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_lockscreen_chevron_left.pngbin840 -> 1600 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_lockscreen_chevron_right.pngbin844 -> 1578 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_lockscreen_chevron_up.pngbin845 -> 1346 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_copy_holo_dark.pngbin826 -> 261 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_copy_holo_light.pngbin747 -> 252 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_cut_holo_dark.pngbin1803 -> 985 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_cut_holo_light.pngbin1561 -> 1291 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_paste_holo_dark.pngbin1288 -> 433 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_paste_holo_light.pngbin1085 -> 442 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_selectall_holo_dark.pngbin1264 -> 244 bytes
-rw-r--r--core/res/res/drawable-xhdpi/ic_menu_selectall_holo_light.pngbin1712 -> 254 bytes
-rw-r--r--core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml3
-rw-r--r--core/res/res/layout/keyguard_screen_sim_puk_portrait.xml39
-rw-r--r--data/fonts/Roboto-Bold.ttfbin84868 -> 84924 bytes
-rw-r--r--data/fonts/Roboto-BoldItalic.ttfbin88048 -> 88104 bytes
-rw-r--r--data/fonts/Roboto-Italic.ttfbin87620 -> 87680 bytes
-rw-r--r--data/fonts/Roboto-Regular.ttfbin84504 -> 84564 bytes
-rw-r--r--media/libstagefright/SurfaceMediaSource.cpp4
-rw-r--r--policy/src/com/android/internal/policy/impl/AccountUnlockScreen.java2
-rw-r--r--policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java31
-rw-r--r--policy/src/com/android/internal/policy/impl/LockScreen.java5
-rw-r--r--policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java2
-rw-r--r--policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java2
-rw-r--r--policy/src/com/android/internal/policy/impl/SimPukUnlockScreen.java72
-rw-r--r--policy/src/com/android/internal/policy/impl/SimUnlockScreen.java2
-rw-r--r--services/java/com/android/server/ConnectivityService.java51
57 files changed, 123 insertions, 110 deletions
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 58f7869f5e95..595119563fb7 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -480,6 +480,12 @@ public class Camera {
public final void stopPreview() {
_stopPreview();
mFaceDetectionRunning = false;
+
+ mShutterCallback = null;
+ mRawImageCallback = null;
+ mPostviewCallback = null;
+ mJpegCallback = null;
+ mAutoFocusCallback = null;
}
private native final void _stopPreview();
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 4d828c448fe2..e3a4df9358f9 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -936,9 +936,11 @@ public class LockPatternUtils {
*
* If there's currently a call in progress, the button will take them to the call
* @param button the button to update
+ * @param showIfCapable indicates whether the button should be shown if emergency calls are
+ * possible on the device
*/
- public void updateEmergencyCallButtonState(Button button) {
- if (isEmergencyCallCapable()) {
+ public void updateEmergencyCallButtonState(Button button, boolean showIfCapable) {
+ if (isEmergencyCallCapable() && showIfCapable) {
button.setVisibility(View.VISIBLE);
} else {
button.setVisibility(View.GONE);
diff --git a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
index cc2ed7ffb807..c03f91cc7ef2 100644
--- a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
+++ b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
@@ -71,7 +71,7 @@ public class MultiWaveView extends View {
// Tune-able parameters
private static final int CHEVRON_INCREMENTAL_DELAY = 160;
- private static final int CHEVRON_ANIMATION_DURATION = 650;
+ private static final int CHEVRON_ANIMATION_DURATION = 850;
private static final int RETURN_TO_HOME_DELAY = 1200;
private static final int RETURN_TO_HOME_DURATION = 300;
private static final int HIDE_ANIMATION_DELAY = 200;
@@ -297,7 +297,7 @@ public class MultiWaveView extends View {
*/
private void startChevronAnimation() {
final float r = mHandleDrawable.getWidth() * 0.4f;
- final float chevronAnimationDistance = mOuterRadius * 0.8f;
+ final float chevronAnimationDistance = mOuterRadius * 0.9f;
final float from[][] = {
{mWaveCenterX - r, mWaveCenterY}, // left
{mWaveCenterX + r, mWaveCenterY}, // right
@@ -310,6 +310,8 @@ public class MultiWaveView extends View {
{mWaveCenterX, mWaveCenterY + chevronAnimationDistance} }; // bottom
mChevronAnimations.clear();
+ final float startScale = 0.5f;
+ final float endScale = 2.0f;
for (int direction = 0; direction < 4; direction++) {
for (int count = 0; count < mFeedbackCount; count++) {
int delay = count * CHEVRON_INCREMENTAL_DELAY;
@@ -323,6 +325,8 @@ public class MultiWaveView extends View {
"x", new float[] { from[direction][0], to[direction][0] },
"y", new float[] { from[direction][1], to[direction][1] },
"alpha", new float[] {1.0f, 0.0f},
+ "scaleX", new float[] {startScale, endScale},
+ "scaleY", new float[] {startScale, endScale},
"onUpdate", mUpdateListener));
}
}
diff --git a/core/res/res/drawable-hdpi/ic_emergency.png b/core/res/res/drawable-hdpi/ic_emergency.png
index 89c05e360493..09bcbda5c2e0 100644
--- a/core/res/res/drawable-hdpi/ic_emergency.png
+++ b/core/res/res/drawable-hdpi/ic_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_down.png b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_down.png
index 620844ec374f..bc718b57b43c 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_down.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_down.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_left.png b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_left.png
index d008afa1ef26..0892c31863b2 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_left.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_left.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_right.png b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_right.png
index e5089003c052..04cc0a23b4aa 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_right.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_right.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_up.png b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_up.png
index 4ffa833b93cf..bb553b1fc2a1 100644
--- a/core/res/res/drawable-hdpi/ic_lockscreen_chevron_up.png
+++ b/core/res/res/drawable-hdpi/ic_lockscreen_chevron_up.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.png
index d1e1337f70f4..d37d0a318a4f 100644
--- a/core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_copy_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_copy_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_copy_holo_light.png
index 5d026609b964..0dd8865f4a9a 100644
--- a/core/res/res/drawable-hdpi/ic_menu_copy_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_copy_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.png
index bd28a8590ebf..81c52b0b5ea1 100644
--- a/core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_cut_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_cut_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_cut_holo_light.png
index 037c36256c6c..15500c341ed6 100644
--- a/core/res/res/drawable-hdpi/ic_menu_cut_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_cut_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.png
index e9514b8d7fc4..eb701f241cb9 100644
--- a/core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_paste_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_paste_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_paste_holo_light.png
index b02aa09e7075..886c49317e0b 100644
--- a/core/res/res/drawable-hdpi/ic_menu_paste_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_paste_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_selectall_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_selectall_holo_dark.png
index b1613613c62b..c2cec7ff1a7f 100644
--- a/core/res/res/drawable-hdpi/ic_menu_selectall_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_selectall_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_selectall_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_selectall_holo_light.png
index 0a7b364d65ad..902402e26efd 100644
--- a/core/res/res/drawable-hdpi/ic_menu_selectall_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_selectall_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_emergency.png b/core/res/res/drawable-mdpi/ic_emergency.png
index c6faf1e9e430..dfa17c62f8e9 100755..100644
--- a/core/res/res/drawable-mdpi/ic_emergency.png
+++ b/core/res/res/drawable-mdpi/ic_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_down.png b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_down.png
index d3cfd17ea104..308fe8a29321 100644
--- a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_down.png
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_down.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_left.png b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_left.png
index e5ef113b0909..9a2563433d1f 100644
--- a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_left.png
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_left.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_right.png b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_right.png
index ab723b711e94..77240d03453f 100644
--- a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_right.png
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_right.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_up.png b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_up.png
index 35aca4e82450..e0b013425e7c 100644
--- a/core/res/res/drawable-mdpi/ic_lockscreen_chevron_up.png
+++ b/core/res/res/drawable-mdpi/ic_lockscreen_chevron_up.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.png
index cb19fea81d73..97e8ac1b775d 100644
--- a/core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_copy_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_copy_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_copy_holo_light.png
index e353d46ffb49..74cb920f487b 100644
--- a/core/res/res/drawable-mdpi/ic_menu_copy_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_copy_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.png
index 66a750d6a32b..85f3cb2ad632 100644
--- a/core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_cut_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_cut_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_cut_holo_light.png
index e7e8c547c728..77f92fb56874 100644
--- a/core/res/res/drawable-mdpi/ic_menu_cut_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_cut_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.png
index 23f3a320c234..093496d4089b 100644
--- a/core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_paste_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_paste_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_paste_holo_light.png
index c9d571cd4ae1..61fd91c8808a 100644
--- a/core/res/res/drawable-mdpi/ic_menu_paste_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_paste_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_selectall_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_selectall_holo_dark.png
index caec299c39f6..da64c7556eba 100644
--- a/core/res/res/drawable-mdpi/ic_menu_selectall_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_selectall_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_selectall_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_selectall_holo_light.png
index 434f5d1bcc2d..e0dd67c69445 100644
--- a/core/res/res/drawable-mdpi/ic_menu_selectall_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_selectall_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_emergency.png b/core/res/res/drawable-xhdpi/ic_emergency.png
index f5df6cd1de38..0e975498d5a8 100644
--- a/core/res/res/drawable-xhdpi/ic_emergency.png
+++ b/core/res/res/drawable-xhdpi/ic_emergency.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_down.png b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_down.png
index c655d93b0cc7..b8e5733522ef 100644
--- a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_down.png
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_down.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_left.png b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_left.png
index 75173cb701fd..ce5da43fc650 100644
--- a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_left.png
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_left.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_right.png b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_right.png
index 9f6da72fbc13..c16f1431125d 100644
--- a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_right.png
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_right.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_up.png b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_up.png
index 53794fde8cf7..9bed39a3e3e0 100644
--- a/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_up.png
+++ b/core/res/res/drawable-xhdpi/ic_lockscreen_chevron_up.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_copy_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_copy_holo_dark.png
index 801434525cb1..ba883aec0ffd 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_copy_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_copy_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_copy_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_copy_holo_light.png
index b5359a1963a8..364b1692f3ea 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_copy_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_copy_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_cut_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_cut_holo_dark.png
index 180365f4e5b7..16632b196392 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_cut_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_cut_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_cut_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_cut_holo_light.png
index a31a06f59ce7..6e007c76d2fd 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_cut_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_cut_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_paste_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_paste_holo_dark.png
index 6e7273f252b9..4c5f7f20d426 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_paste_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_paste_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_paste_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_paste_holo_light.png
index b7eedd917afe..6edd4b222ef0 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_paste_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_paste_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_dark.png
index 7125557124de..8eef37dd4698 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_dark.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_light.png
index c7728d4b190a..2e1cf86dbbef 100644
--- a/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_light.png
+++ b/core/res/res/drawable-xhdpi/ic_menu_selectall_holo_light.png
Binary files differ
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
index 07b4837624a9..dd291644e4f3 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
@@ -80,7 +80,8 @@
android:layout_alignParentBottom="true"
android:drawableLeft="@drawable/ic_emergency"
style="@style/Widget.Button.Transparent"
- android:drawablePadding="8dip"/>
+ android:drawablePadding="8dip"
+ android:visibility="gone"/>
</RelativeLayout>>
diff --git a/core/res/res/layout/keyguard_screen_sim_puk_portrait.xml b/core/res/res/layout/keyguard_screen_sim_puk_portrait.xml
index e5e045956f56..8b039f7e2ff7 100644
--- a/core/res/res/layout/keyguard_screen_sim_puk_portrait.xml
+++ b/core/res/res/layout/keyguard_screen_sim_puk_portrait.xml
@@ -34,6 +34,9 @@
android:layout_height="wrap_content"
android:gravity="center"
android:singleLine="true"
+ android:ellipsize="marquee"
+ android:layout_marginRight="6dip"
+ android:layout_marginLeft="6dip"
android:textAppearance="?android:attr/textAppearanceLarge"/>
<!-- Carrier info -->
@@ -44,6 +47,8 @@
android:gravity="center"
android:singleLine="true"
android:ellipsize="marquee"
+ android:layout_marginRight="6dip"
+ android:layout_marginLeft="6dip"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<LinearLayout
@@ -52,28 +57,6 @@
android:layout_height="wrap_content">
<LinearLayout
- android:orientation="vertical"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginRight="10dip"
- android:layout_marginLeft="10dip">
- <TextView android:id="@+id/enter_puk"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center_vertical"
- android:text="@android:string/keyguard_password_enter_puk_prompt"
- android:textSize="30sp"
- android:layout_marginBottom="10dip"/>
- <TextView android:id="@+id/enter_pin"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center_vertical"
- android:text="@android:string/keyguard_password_enter_pin_prompt"
- android:textSize="30sp"
- android:layout_marginTop="10dip"/>
- </LinearLayout>
-
- <LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_weight="1"
@@ -92,14 +75,15 @@
android:background="@android:drawable/edit_text">
<!-- displays dots as user enters puk -->
- <TextView android:id="@+id/pukDisplay"
+ <EditText android:id="@+id/pukDisplay"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="1"
- android:textAppearance="?android:attr/textAppearanceLargeInverse"
android:textStyle="bold"
android:inputType="textPassword"
+ android:textColor="#000"
+ android:hint="@android:string/keyguard_password_enter_puk_prompt"
/>
<ImageButton android:id="@+id/pukDel"
@@ -122,14 +106,15 @@
android:background="@android:drawable/edit_text">
<!-- displays dots as user enters new pin -->
- <TextView android:id="@+id/pinDisplay"
+ <EditText android:id="@+id/pinDisplay"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="1"
- android:textAppearance="?android:attr/textAppearanceLargeInverse"
android:textStyle="bold"
android:inputType="textPassword"
+ android:textColor="#000"
+ android:hint="@android:string/keyguard_password_enter_pin_prompt"
/>
<ImageButton android:id="@+id/pinDel"
@@ -177,7 +162,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@android:drawable/ic_emergency"
- android:drawablePadding="8dip"
+ android:drawablePadding="4dip"
android:text="@android:string/lockscreen_emergency_call"
/>
</LinearLayout>
diff --git a/data/fonts/Roboto-Bold.ttf b/data/fonts/Roboto-Bold.ttf
index c716bbbcadf0..e5d828d8b43d 100644
--- a/data/fonts/Roboto-Bold.ttf
+++ b/data/fonts/Roboto-Bold.ttf
Binary files differ
diff --git a/data/fonts/Roboto-BoldItalic.ttf b/data/fonts/Roboto-BoldItalic.ttf
index eeb5120ac6dc..d8fa3ae88d83 100644
--- a/data/fonts/Roboto-BoldItalic.ttf
+++ b/data/fonts/Roboto-BoldItalic.ttf
Binary files differ
diff --git a/data/fonts/Roboto-Italic.ttf b/data/fonts/Roboto-Italic.ttf
index 1e88d3eba2cc..6682d17b0bae 100644
--- a/data/fonts/Roboto-Italic.ttf
+++ b/data/fonts/Roboto-Italic.ttf
Binary files differ
diff --git a/data/fonts/Roboto-Regular.ttf b/data/fonts/Roboto-Regular.ttf
index 3033027401fa..153c60882bb8 100644
--- a/data/fonts/Roboto-Regular.ttf
+++ b/data/fonts/Roboto-Regular.ttf
Binary files differ
diff --git a/media/libstagefright/SurfaceMediaSource.cpp b/media/libstagefright/SurfaceMediaSource.cpp
index 306f1f63d49d..2b27ee222d6a 100644
--- a/media/libstagefright/SurfaceMediaSource.cpp
+++ b/media/libstagefright/SurfaceMediaSource.cpp
@@ -764,8 +764,8 @@ status_t SurfaceMediaSource::read( MediaBuffer **buffer,
// If the loop was exited as a result of stopping the recording,
// it is OK
if (mStopped) {
- LOGV("Read: SurfaceMediaSource is stopped. Returning NO_INIT;");
- return NO_INIT;
+ LOGV("Read: SurfaceMediaSource is stopped. Returning ERROR_END_OF_STREAM.");
+ return ERROR_END_OF_STREAM;
}
// Update the current buffer info
diff --git a/policy/src/com/android/internal/policy/impl/AccountUnlockScreen.java b/policy/src/com/android/internal/policy/impl/AccountUnlockScreen.java
index 6ff9a608ad44..f7d936c87050 100644
--- a/policy/src/com/android/internal/policy/impl/AccountUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/AccountUnlockScreen.java
@@ -112,7 +112,7 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree
mUpdateMonitor = updateMonitor;
mKeyguardStatusViewManager = new KeyguardStatusViewManager(this, updateMonitor,
- lockPatternUtils, callback);
+ lockPatternUtils, callback, true);
}
public void afterTextChanged(Editable s) {
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
index 8654a25d2f89..61e30bfba05c 100644
--- a/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
+++ b/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
@@ -87,7 +87,7 @@ class KeyguardStatusViewManager implements OnClickListener {
private LockPatternUtils mLockPatternUtils;
private KeyguardUpdateMonitor mUpdateMonitor;
private Button mEmergencyCallButton;
- private boolean mShouldEnableUnlock;
+ private boolean mUnlockDisabledDueToSimState;
// Shadowed text values
private CharSequence mCarrierText;
@@ -97,7 +97,7 @@ class KeyguardStatusViewManager implements OnClickListener {
private CharSequence mOwnerInfoText;
private boolean mShowingStatus;
private KeyguardScreenCallback mCallback;
- private boolean mHideEmergencyCallButton = false;
+ private final boolean mShowEmergencyButtonByDefault;
private class TransientTextManager {
private TextView mTextView;
@@ -149,7 +149,8 @@ class KeyguardStatusViewManager implements OnClickListener {
};
public KeyguardStatusViewManager(View view, KeyguardUpdateMonitor updateMonitor,
- LockPatternUtils lockPatternUtils, KeyguardScreenCallback callback) {
+ LockPatternUtils lockPatternUtils, KeyguardScreenCallback callback,
+ boolean showEmergencyButtonByDefault) {
mContainer = view;
mDateFormatString = getContext().getString(R.string.full_wday_month_day_no_year);
mLockPatternUtils = lockPatternUtils;
@@ -163,6 +164,7 @@ class KeyguardStatusViewManager implements OnClickListener {
mOwnerInfoView = (TextView) findViewById(R.id.propertyOf);
mTransportView = (TransportControlView) findViewById(R.id.transport);
mEmergencyCallButton = (Button) findViewById(R.id.emergencyCallButton);
+ mShowEmergencyButtonByDefault = showEmergencyButtonByDefault;
if (mEmergencyCallButton != null) {
mEmergencyCallButton.setText(R.string.lockscreen_emergency_call);
mEmergencyCallButton.setOnClickListener(this);
@@ -393,10 +395,6 @@ class KeyguardStatusViewManager implements OnClickListener {
}
}
- boolean shouldEnableUnlock() {
- return mShouldEnableUnlock;
- }
-
/**
* Determine the current status of the lock screen given the sim state and other stuff.
*/
@@ -443,9 +441,8 @@ class KeyguardStatusViewManager implements OnClickListener {
CharSequence carrierText = null;
int carrierHelpTextId = 0;
- mShouldEnableUnlock = true;
+ mUnlockDisabledDueToSimState = false;
mStatus = getStatusForIccState(simState);
-
switch (mStatus) {
case Normal:
carrierText = LockPatternUtils.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),
@@ -466,13 +463,14 @@ class KeyguardStatusViewManager implements OnClickListener {
case SimPermDisabled:
carrierText = getContext().getText(R.string.lockscreen_missing_sim_message_short);
carrierHelpTextId = R.string.lockscreen_permanent_disabled_sim_instructions;
+ mUnlockDisabledDueToSimState = true;
break;
case SimMissingLocked:
carrierText = LockPatternUtils.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),
getContext().getText(R.string.lockscreen_missing_sim_message_short));
carrierHelpTextId = R.string.lockscreen_missing_sim_instructions;
- mShouldEnableUnlock = false;
+ mUnlockDisabledDueToSimState = true;
break;
case SimLocked:
@@ -484,7 +482,7 @@ class KeyguardStatusViewManager implements OnClickListener {
carrierText = LockPatternUtils.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),
getContext().getText(R.string.lockscreen_sim_puk_locked_message));
if (!mLockPatternUtils.isPukUnlockScreenEnable()) {
- mShouldEnableUnlock = false;
+ mUnlockDisabledDueToSimState = true;
}
break;
}
@@ -556,10 +554,8 @@ class KeyguardStatusViewManager implements OnClickListener {
private void updateEmergencyCallButtonState() {
if (mEmergencyCallButton != null) {
- mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton);
- if (mHideEmergencyCallButton) {
- mEmergencyCallButton.setVisibility(View.GONE);
- }
+ boolean showIfCapable = mShowEmergencyButtonByDefault || mUnlockDisabledDueToSimState;
+ mLockPatternUtils.updateEmergencyCallButtonState(mEmergencyCallButton, showIfCapable);
}
}
@@ -608,9 +604,4 @@ class KeyguardStatusViewManager implements OnClickListener {
mCallback.takeEmergencyCallAction();
}
}
-
- public void hideEmergencyCallButton() {
- mHideEmergencyCallButton = true;
- }
-
}
diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java
index 4f6df3659f67..3469483330d6 100644
--- a/policy/src/com/android/internal/policy/impl/LockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/LockScreen.java
@@ -336,10 +336,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
}
mStatusViewManager = new KeyguardStatusViewManager(this, mUpdateMonitor, mLockPatternUtils,
- mCallback);
-
- // LockScreen doesn't show the emergency call button by default
- mStatusViewManager.hideEmergencyCallButton();
+ mCallback, false);
setFocusable(true);
setFocusableInTouchMode(true);
diff --git a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
index 2f2d3b7c635d..6d2f2f29fc05 100644
--- a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
@@ -98,7 +98,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
}
mStatusViewManager = new KeyguardStatusViewManager(this, mUpdateMonitor, mLockPatternUtils,
- mCallback);
+ mCallback, true);
final int quality = lockPatternUtils.getKeyguardStoredPasswordQuality();
mIsAlpha = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC == quality
diff --git a/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java b/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
index 0cafeb5a147f..e70892c1d88a 100644
--- a/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java
@@ -171,7 +171,7 @@ class PatternUnlockScreen extends LinearLayoutWithDefaultTouchRecepient
}
mKeyguardStatusViewManager = new KeyguardStatusViewManager(this, mUpdateMonitor,
- mLockPatternUtils, mCallback);
+ mLockPatternUtils, mCallback, true);
mLockPatternView = (LockPatternView) findViewById(R.id.lockPattern);
diff --git a/policy/src/com/android/internal/policy/impl/SimPukUnlockScreen.java b/policy/src/com/android/internal/policy/impl/SimPukUnlockScreen.java
index 520d3021476d..6acd1c5898a8 100644
--- a/policy/src/com/android/internal/policy/impl/SimPukUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/SimPukUnlockScreen.java
@@ -27,6 +27,7 @@ import com.android.internal.telephony.ITelephony;
import com.android.internal.widget.LockPatternUtils;
import android.text.Editable;
+import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
@@ -40,21 +41,20 @@ import com.android.internal.R;
* Displays a dialer like interface to unlock the SIM PUK.
*/
public class SimPukUnlockScreen extends LinearLayout implements KeyguardScreen,
- View.OnClickListener {
+ View.OnClickListener, View.OnFocusChangeListener {
private static final int DIGIT_PRESS_WAKE_MILLIS = 5000;
private final KeyguardUpdateMonitor mUpdateMonitor;
private final KeyguardScreenCallback mCallback;
+ private KeyguardStatusViewManager mKeyguardStatusViewManager;
private TextView mHeaderText;
private TextView mPukText;
private TextView mPinText;
-
private TextView mFocusedEntry;
- private TextView mOkButton;
-
+ private View mOkButton;
private View mDelPukButton;
private View mDelPinButton;
@@ -66,8 +66,6 @@ public class SimPukUnlockScreen extends LinearLayout implements KeyguardScreen,
private int mKeyboardHidden;
- private KeyguardStatusViewManager mKeyguardStatusViewManager;
-
private static final char[] DIGITS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
public SimPukUnlockScreen(Context context, Configuration configuration,
@@ -92,44 +90,33 @@ public class SimPukUnlockScreen extends LinearLayout implements KeyguardScreen,
}
mHeaderText = (TextView) findViewById(R.id.headerText);
+
mPukText = (TextView) findViewById(R.id.pukDisplay);
- mPukText.setOnClickListener(new OnClickListener() {
- public void onClick(View v) {
- requestFocus(mPukText);
- mCallback.pokeWakelock();
- }
- });
mPinText = (TextView) findViewById(R.id.pinDisplay);
- mPinText.setOnClickListener(this);
-
mDelPukButton = findViewById(R.id.pukDel);
- mDelPukButton.setOnClickListener(this);
mDelPinButton = findViewById(R.id.pinDel);
- mDelPinButton.setOnClickListener(this);
+ mOkButton = findViewById(R.id.ok);
- mOkButton = (TextView) findViewById(R.id.ok);
-
- mHeaderText.setText(R.string.keyguard_password_enter_puk_code);
- mPukText.setFocusable(false);
- mPinText.setFocusable(false);
+ mDelPinButton.setOnClickListener(this);
+ mDelPukButton.setOnClickListener(this);
mOkButton.setOnClickListener(this);
- requestFocus(mPukText);
+ mHeaderText.setText(R.string.keyguard_password_enter_puk_code);
+ // To make marquee work
+ mHeaderText.setSelected(true);
mKeyguardStatusViewManager = new KeyguardStatusViewManager(this, updateMonitor,
- lockpatternutils, callback);
+ lockpatternutils, callback, true);
- setFocusableInTouchMode(true);
- }
-
- private void requestFocus(TextView entry) {
- mFocusedEntry = entry;
- mFocusedEntry.setText("");
+ mPinText.setFocusableInTouchMode(true);
+ mPinText.setOnFocusChangeListener(this);
+ mPukText.setFocusableInTouchMode(true);
+ mPukText.setOnFocusChangeListener(this);
}
/** {@inheritDoc} */
public boolean needsInput() {
- return true;
+ return false;
}
/** {@inheritDoc} */
@@ -141,9 +128,6 @@ public class SimPukUnlockScreen extends LinearLayout implements KeyguardScreen,
public void onResume() {
// start fresh
mHeaderText.setText(R.string.keyguard_password_enter_puk_code);
- requestFocus(mPukText);
- mPinText.setText("");
-
mKeyguardStatusViewManager.onResume();
}
@@ -196,25 +180,32 @@ public class SimPukUnlockScreen extends LinearLayout implements KeyguardScreen,
public void onClick(View v) {
if (v == mDelPukButton) {
+ if (mFocusedEntry != mPukText)
+ mPukText.requestFocus();
final Editable digits = mPukText.getEditableText();
final int len = digits.length();
if (len > 0) {
digits.delete(len-1, len);
}
- mCallback.pokeWakelock();
} else if (v == mDelPinButton) {
+ if (mFocusedEntry != mPinText)
+ mPinText.requestFocus();
final Editable digits = mPinText.getEditableText();
final int len = digits.length();
if (len > 0) {
digits.delete(len-1, len);
}
- mCallback.pokeWakelock();
- } else if (v == mPinText) {
- requestFocus(mPinText);
- mCallback.pokeWakelock();
} else if (v == mOkButton) {
checkPuk();
}
+ mCallback.pokeWakelock(DIGIT_PRESS_WAKE_MILLIS);
+
+ }
+
+ @Override
+ public void onFocusChange(View v, boolean hasFocus) {
+ if (hasFocus)
+ mFocusedEntry = (TextView)v;
}
private Dialog getSimUnlockProgressDialog() {
@@ -236,7 +227,6 @@ public class SimPukUnlockScreen extends LinearLayout implements KeyguardScreen,
// otherwise, display a message to the user, and don't submit.
mHeaderText.setText(R.string.invalidPuk);
mPukText.setText("");
- mCallback.pokeWakelock();
return;
}
@@ -245,7 +235,6 @@ public class SimPukUnlockScreen extends LinearLayout implements KeyguardScreen,
// otherwise, display a message to the user, and don't submit.
mHeaderText.setText(R.string.invalidPin);
mPinText.setText("");
- mCallback.pokeWakelock();
return;
}
@@ -267,7 +256,6 @@ public class SimPukUnlockScreen extends LinearLayout implements KeyguardScreen,
mPukText.setText("");
mPinText.setText("");
}
- mCallback.pokeWakelock();
}
}.start();
}
@@ -290,7 +278,7 @@ public class SimPukUnlockScreen extends LinearLayout implements KeyguardScreen,
if (len > 0) {
digits.delete(len-1, len);
}
- mCallback.pokeWakelock();
+ mCallback.pokeWakelock(DIGIT_PRESS_WAKE_MILLIS);
return true;
}
diff --git a/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java b/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java
index 1acf68172241..184748abe83f 100644
--- a/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java
+++ b/policy/src/com/android/internal/policy/impl/SimUnlockScreen.java
@@ -100,7 +100,7 @@ public class SimUnlockScreen extends LinearLayout implements KeyguardScreen, Vie
mOkButton.setOnClickListener(this);
mKeyguardStatusViewManager = new KeyguardStatusViewManager(this, updateMonitor,
- lockpatternutils, callback);
+ lockpatternutils, callback, true);
setFocusableInTouchMode(true);
}
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index e28c7151795e..0153613d61b9 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -1974,7 +1974,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
Integer pid = (Integer)pids.get(j);
if (pid.intValue() == myPid) {
Collection<InetAddress> dnses = p.getDnses();
- writePidDns(dnses, myPid);
+ String proto = determineProto(p);
+ writePidDns(dnses, myPid, proto);
if (doBump) {
bumpDns();
}
@@ -1984,6 +1985,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
}
// nothing found - delete
+ if (SystemProperties.get("net.dnsproto." + myPid).length() != 0) {
+ SystemProperties.set("net.dnsproto." + myPid, "");
+ }
for (int i = 1; ; i++) {
String prop = "net.dns" + i + "." + myPid;
if (SystemProperties.get(prop).length() == 0) {
@@ -1997,7 +2001,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
// return true if results in a change
- private boolean writePidDns(Collection <InetAddress> dnses, int pid) {
+ private boolean writePidDns(Collection <InetAddress> dnses, int pid, String proto) {
int j = 1;
boolean changed = false;
for (InetAddress dns : dnses) {
@@ -2007,6 +2011,11 @@ public class ConnectivityService extends IConnectivityManager.Stub {
SystemProperties.set("net.dns" + j++ + "." + pid, dns.getHostAddress());
}
}
+ if (dnses.size() > 0 && (changed || !proto.equals(SystemProperties.get("net.dnsproto." +
+ pid)))) {
+ changed = true;
+ SystemProperties.set("net.dnsproto." + pid, proto);
+ }
return changed;
}
@@ -2037,7 +2046,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
// Caller must grab mDnsLock.
private boolean updateDns(String network, String iface,
- Collection<InetAddress> dnses, String domains) {
+ Collection<InetAddress> dnses, String domains, String proto) {
boolean changed = false;
int last = 0;
if (dnses.size() == 0 && mDefaultDns != null) {
@@ -2073,6 +2082,11 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
mNumDnsEntries = last;
+ if (changed || !proto.equals(SystemProperties.get("net.dnsproto"))) {
+ changed = true;
+ SystemProperties.set("net.dnsproto", proto);
+ }
+
if (changed) {
try {
mNetd.setDnsServersForInterface(iface, NetworkUtils.makeStrings(dnses));
@@ -2096,11 +2110,14 @@ public class ConnectivityService extends IConnectivityManager.Stub {
if (p == null) return;
Collection<InetAddress> dnses = p.getDnses();
boolean changed = false;
+ String proto = determineProto(p);
+
if (mNetConfigs[netType].isDefault()) {
String network = nt.getNetworkInfo().getTypeName();
synchronized (mDnsLock) {
if (!mDnsOverridden) {
- changed = updateDns(network, p.getInterfaceName(), dnses, "");
+ changed = updateDns(network, p.getInterfaceName(), dnses, "",
+ proto);
}
}
} else {
@@ -2114,13 +2131,35 @@ public class ConnectivityService extends IConnectivityManager.Stub {
List pids = mNetRequestersPids[netType];
for (int y=0; y< pids.size(); y++) {
Integer pid = (Integer)pids.get(y);
- changed = writePidDns(dnses, pid.intValue());
+ changed = writePidDns(dnses, pid.intValue(), proto);
}
}
if (changed) bumpDns();
}
}
+ private String determineProto(LinkProperties p) {
+ boolean v4 = false;
+ boolean v6 = false;
+ for (RouteInfo r : p.getRoutes()) {
+ if (r.getDestination().getAddress() instanceof Inet6Address) {
+ v6 = true;
+ } else {
+ v4 = true;
+ }
+ }
+ // secondary connections often don't have routes and we infer routes
+ // to the dns servers. Look at the dns addrs too
+ for (InetAddress i : p.getDnses()) {
+ if (i instanceof Inet6Address) {
+ v6 = true;
+ } else {
+ v4 = true;
+ }
+ }
+ return (v4 ? "v4" : "") + (v6 ? "v6" : "");
+ }
+
private int getRestoreDefaultNetworkDelay(int networkType) {
String restoreDefaultNetworkDelayStr = SystemProperties.get(
NETWORK_RESTORE_DELAY_PROP_NAME);
@@ -2842,7 +2881,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
// Apply DNS changes.
boolean changed = false;
synchronized (mDnsLock) {
- changed = updateDns("VPN", "VPN", addresses, domains);
+ changed = updateDns("VPN", "VPN", addresses, domains, "v4");
mDnsOverridden = true;
}
if (changed) {