summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/view/View.java12
-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--[-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-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/layout-sw600dp/keyguard_screen_tab_unlock_land.xml3
-rw-r--r--core/res/res/layout/keyguard_screen_sim_puk_portrait.xml39
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java9
-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.java3
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java4
30 files changed, 87 insertions, 113 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index ca06b9cf118a..f993160f1829 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -12969,15 +12969,13 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
* Request that the visibility of the status bar be changed.
* @param visibility Bitwise-or of flags {@link #SYSTEM_UI_FLAG_LOW_PROFILE} or
* {@link #SYSTEM_UI_FLAG_HIDE_NAVIGATION}.
- *
- * This value will be re-applied immediately, even if the flags have not changed, so a view may
- * easily reassert a particular SystemUiVisibility condition even if the system UI itself has
- * since countermanded the original request.
*/
public void setSystemUiVisibility(int visibility) {
- mSystemUiVisibility = visibility;
- if (mParent != null && mAttachInfo != null && !mAttachInfo.mRecomputeGlobalAttributes) {
- mParent.recomputeViewAttributes(this);
+ if (visibility != mSystemUiVisibility) {
+ mSystemUiVisibility = visibility;
+ if (mParent != null && mAttachInfo != null && !mAttachInfo.mRecomputeGlobalAttributes) {
+ mParent.recomputeViewAttributes(this);
+ }
}
}
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..3cc19e7614b9 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 * 1.0f;
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-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-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/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/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 8fc844882334..da6bcd21a329 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -2031,8 +2031,13 @@ public class PhoneStatusBar extends StatusBar {
// The user is not allowed to get stuck without navigation UI. Upon the slightest user
// interaction we bring the navigation back.
public void userActivity() {
- if (mNavigationBarView != null) {
- mNavigationBarView.setHidden(false);
+ if (0 != (mSystemUiVisibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION)) {
+ try {
+ mBarService.setSystemUiVisibility(
+ mSystemUiVisibility & ~View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
+ } catch (RemoteException ex) {
+ // weep softly
+ }
}
}
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 23fab72dc558..e28c7151795e 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -2618,7 +2618,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
}
if (VDBG) log("changing default proxy to " + proxy);
- if ((proxy == null && mGlobalProxy == null) || proxy.equals(mGlobalProxy)) return;
+
+ // global trumps default, if set, ignore this.
if (mGlobalProxy != null) return;
sendProxyBroadcast(proxy);
}
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index ebf5e65a3d9d..c62ccc68ce26 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -1768,8 +1768,10 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
ApnSetting apn = apnContext.getApnSetting();
if (apn.proxy != null && apn.proxy.length() != 0) {
try {
+ String port = apn.port;
+ if (TextUtils.isEmpty(port)) port = "8080";
ProxyProperties proxy = new ProxyProperties(apn.proxy,
- Integer.parseInt(apn.port), null);
+ Integer.parseInt(port), null);
dcac.setLinkPropertiesHttpProxySync(proxy);
} catch (NumberFormatException e) {
loge("onDataSetupComplete: NumberFormatException making ProxyProperties (" +