diff options
Diffstat (limited to 'core')
11 files changed, 309 insertions, 205 deletions
diff --git a/core/java/android/server/BluetoothAdapterStateMachine.java b/core/java/android/server/BluetoothAdapterStateMachine.java index 8ec79e2..f617d95 100644 --- a/core/java/android/server/BluetoothAdapterStateMachine.java +++ b/core/java/android/server/BluetoothAdapterStateMachine.java @@ -528,7 +528,7 @@ final class BluetoothAdapterStateMachine extends StateMachine { } // we turn all the way to PowerOff with AIRPLANE_MODE_ON - if (message.what == AIRPLANE_MODE_ON) { + if (message.what == AIRPLANE_MODE_ON || mBluetoothService.isAirplaneModeOn()) { // We inform all the per process callbacks allProcessesCallback(false); deferMessage(obtainMessage(AIRPLANE_MODE_ON)); diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java index 94fbbc8..fecc8f9 100755 --- a/core/java/android/server/BluetoothService.java +++ b/core/java/android/server/BluetoothService.java @@ -1706,7 +1706,7 @@ public class BluetoothService extends IBluetooth.Stub { } /* Returns true if airplane mode is currently on */ - private final boolean isAirplaneModeOn() { + /*package*/ final boolean isAirplaneModeOn() { return Settings.System.getInt(mContext.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0) == 1; } diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java index b94eb76..66fca80 100644 --- a/core/java/android/webkit/BrowserFrame.java +++ b/core/java/android/webkit/BrowserFrame.java @@ -1187,11 +1187,19 @@ class BrowserFrame extends Handler { @Override public void proceed() { SslCertLookupTable.getInstance().setIsAllowed(sslError); - nativeSslCertErrorProceed(handle); + post(new Runnable() { + public void run() { + nativeSslCertErrorProceed(handle); + } + }); } @Override public void cancel() { - nativeSslCertErrorCancel(handle, certError); + post(new Runnable() { + public void run() { + nativeSslCertErrorCancel(handle, certError); + } + }); } }; mCallbackProxy.onReceivedSslError(handler, sslError); diff --git a/core/java/android/webkit/ClientCertRequestHandler.java b/core/java/android/webkit/ClientCertRequestHandler.java index 3a71e7e..f862613 100644 --- a/core/java/android/webkit/ClientCertRequestHandler.java +++ b/core/java/android/webkit/ClientCertRequestHandler.java @@ -16,6 +16,7 @@ package android.webkit; +import android.os.Handler; import java.security.PrivateKey; import java.security.cert.CertificateEncodingException; import java.security.cert.X509Certificate; @@ -29,7 +30,7 @@ import org.apache.harmony.xnet.provider.jsse.NativeCrypto; * * @hide */ -public final class ClientCertRequestHandler { +public final class ClientCertRequestHandler extends Handler { private final BrowserFrame mBrowserFrame; private final int mHandle; @@ -49,23 +50,35 @@ public final class ClientCertRequestHandler { * Proceed with the specified private key and client certificate chain. */ public void proceed(PrivateKey privateKey, X509Certificate[] chain) { - byte[] privateKeyBytes = privateKey.getEncoded(); - byte[][] chainBytes; + final byte[] privateKeyBytes = privateKey.getEncoded(); + final byte[][] chainBytes; try { chainBytes = NativeCrypto.encodeCertificates(chain); + mTable.Allow(mHostAndPort, privateKeyBytes, chainBytes); + post(new Runnable() { + public void run() { + mBrowserFrame.nativeSslClientCert(mHandle, privateKeyBytes, chainBytes); + } + }); } catch (CertificateEncodingException e) { - mBrowserFrame.nativeSslClientCert(mHandle, null, null); - return; + post(new Runnable() { + public void run() { + mBrowserFrame.nativeSslClientCert(mHandle, null, null); + return; + } + }); } - mTable.Allow(mHostAndPort, privateKeyBytes, chainBytes); - mBrowserFrame.nativeSslClientCert(mHandle, privateKeyBytes, chainBytes); } /** * Igore the request for now, the user may be prompted again. */ public void ignore() { - mBrowserFrame.nativeSslClientCert(mHandle, null, null); + post(new Runnable() { + public void run() { + mBrowserFrame.nativeSslClientCert(mHandle, null, null); + } + }); } /** @@ -73,6 +86,10 @@ public final class ClientCertRequestHandler { */ public void cancel() { mTable.Deny(mHostAndPort); - mBrowserFrame.nativeSslClientCert(mHandle, null, null); + post(new Runnable() { + public void run() { + mBrowserFrame.nativeSslClientCert(mHandle, null, null); + } + }); } } diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java index d136004..2d15afb 100644 --- a/core/java/android/webkit/WebViewCore.java +++ b/core/java/android/webkit/WebViewCore.java @@ -2872,6 +2872,6 @@ public final class WebViewCore { private native ArrayList<Rect> nativeGetTouchHighlightRects(int x, int y, int slop); - private native void nativeAutoFillForm(int queryId); - private native void nativeScrollLayer(int layer, Rect rect); + private native void nativeAutoFillForm(int queryId); + private native void nativeScrollLayer(int layer, Rect rect); } diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index 89f9d4e..905a171 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -117,6 +117,8 @@ public class LockPatternUtils { = "lockscreen.biometric_weak_fallback"; public final static String BIOMETRIC_WEAK_EVER_CHOSEN_KEY = "lockscreen.biometricweakeverchosen"; + public final static String LOCKSCREEN_POWER_BUTTON_INSTANTLY_LOCKS + = "lockscreen.power_button_instantly_locks"; private final static String PASSWORD_HISTORY_KEY = "lockscreen.passwordhistory"; @@ -335,7 +337,7 @@ public class LockPatternUtils { * @return True if the user has ever chosen a pattern. */ public boolean isPatternEverChosen() { - return getBoolean(PATTERN_EVER_CHOSEN_KEY); + return getBoolean(PATTERN_EVER_CHOSEN_KEY, false); } /** @@ -345,7 +347,7 @@ public class LockPatternUtils { * @return True if the user has ever chosen biometric weak. */ public boolean isBiometricWeakEverChosen() { - return getBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY); + return getBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY, false); } /** @@ -427,14 +429,6 @@ public class LockPatternUtils { } /** - * Save a lock pattern. - * @param pattern The new pattern to save. - */ - public void saveLockPattern(List<LockPatternView.Cell> pattern) { - this.saveLockPattern(pattern, false); - } - - /** * Calls back SetupFaceLock to delete the temporary gallery file */ public void deleteTempGallery() { @@ -459,6 +453,14 @@ public class LockPatternUtils { /** * Save a lock pattern. * @param pattern The new pattern to save. + */ + public void saveLockPattern(List<LockPatternView.Cell> pattern) { + this.saveLockPattern(pattern, false); + } + + /** + * Save a lock pattern. + * @param pattern The new pattern to save. * @param isFallback Specifies if this is a fallback to biometric weak */ public void saveLockPattern(List<LockPatternView.Cell> pattern, boolean isFallback) { @@ -482,14 +484,16 @@ public class LockPatternUtils { if (!isFallback) { deleteGallery(); setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_SOMETHING); + dpm.setActivePasswordState(DevicePolicyManager.PASSWORD_QUALITY_SOMETHING, + pattern.size(), 0, 0, 0, 0, 0, 0); } else { setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK); setLong(PASSWORD_TYPE_ALTERNATE_KEY, DevicePolicyManager.PASSWORD_QUALITY_SOMETHING); finishBiometricWeak(); + dpm.setActivePasswordState(DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK, + 0, 0, 0, 0, 0, 0, 0); } - dpm.setActivePasswordState(DevicePolicyManager.PASSWORD_QUALITY_SOMETHING, pattern - .size(), 0, 0, 0, 0, 0, 0); } else { if (keyStore.isEmpty()) { keyStore.reset(); @@ -600,40 +604,45 @@ public class LockPatternUtils { if (!isFallback) { deleteGallery(); setLong(PASSWORD_TYPE_KEY, Math.max(quality, computedQuality)); + if (computedQuality != DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED) { + int letters = 0; + int uppercase = 0; + int lowercase = 0; + int numbers = 0; + int symbols = 0; + int nonletter = 0; + for (int i = 0; i < password.length(); i++) { + char c = password.charAt(i); + if (c >= 'A' && c <= 'Z') { + letters++; + uppercase++; + } else if (c >= 'a' && c <= 'z') { + letters++; + lowercase++; + } else if (c >= '0' && c <= '9') { + numbers++; + nonletter++; + } else { + symbols++; + nonletter++; + } + } + dpm.setActivePasswordState(Math.max(quality, computedQuality), + password.length(), letters, uppercase, lowercase, + numbers, symbols, nonletter); + } else { + // The password is not anything. + dpm.setActivePasswordState( + DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED, + 0, 0, 0, 0, 0, 0, 0); + } } else { + // Case where it's a fallback for biometric weak setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK); setLong(PASSWORD_TYPE_ALTERNATE_KEY, Math.max(quality, computedQuality)); finishBiometricWeak(); - } - if (computedQuality != DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED) { - int letters = 0; - int uppercase = 0; - int lowercase = 0; - int numbers = 0; - int symbols = 0; - int nonletter = 0; - for (int i = 0; i < password.length(); i++) { - char c = password.charAt(i); - if (c >= 'A' && c <= 'Z') { - letters++; - uppercase++; - } else if (c >= 'a' && c <= 'z') { - letters++; - lowercase++; - } else if (c >= '0' && c <= '9') { - numbers++; - nonletter++; - } else { - symbols++; - nonletter++; - } - } - dpm.setActivePasswordState(Math.max(quality, computedQuality), password - .length(), letters, uppercase, lowercase, numbers, symbols, nonletter); - } else { - // The password is not anything. - dpm.setActivePasswordState( - DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED, 0, 0, 0, 0, 0, 0, 0); + dpm.setActivePasswordState(DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK, + 0, 0, 0, 0, 0, 0, 0); } // Add the password to the password history. We assume all // password @@ -838,7 +847,7 @@ public class LockPatternUtils { getLong(PASSWORD_TYPE_ALTERNATE_KEY, DevicePolicyManager.PASSWORD_QUALITY_SOMETHING) == DevicePolicyManager.PASSWORD_QUALITY_SOMETHING; - return getBoolean(Settings.Secure.LOCK_PATTERN_ENABLED) + return getBoolean(Settings.Secure.LOCK_PATTERN_ENABLED, false) && (getLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_SOMETHING) == DevicePolicyManager.PASSWORD_QUALITY_SOMETHING || (usingBiometricWeak() && backupEnabled)); @@ -884,7 +893,7 @@ public class LockPatternUtils { * @return Whether the visible pattern is enabled. */ public boolean isVisiblePatternEnabled() { - return getBoolean(Settings.Secure.LOCK_PATTERN_VISIBLE); + return getBoolean(Settings.Secure.LOCK_PATTERN_VISIBLE, false); } /** @@ -898,7 +907,7 @@ public class LockPatternUtils { * @return Whether tactile feedback for the pattern is enabled. */ public boolean isTactileFeedbackEnabled() { - return getBoolean(Settings.Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED); + return getBoolean(Settings.Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED, false); } /** @@ -939,7 +948,7 @@ public class LockPatternUtils { * attempts. */ public boolean isPermanentlyLocked() { - return getBoolean(LOCKOUT_PERMANENT_KEY); + return getBoolean(LOCKOUT_PERMANENT_KEY, false); } /** @@ -982,9 +991,10 @@ public class LockPatternUtils { return nextAlarm; } - private boolean getBoolean(String secureSettingKey) { + private boolean getBoolean(String secureSettingKey, boolean defaultValue) { return 1 == - android.provider.Settings.Secure.getInt(mContentResolver, secureSettingKey, 0); + android.provider.Settings.Secure.getInt(mContentResolver, secureSettingKey, + defaultValue ? 1 : 0); } private void setBoolean(String secureSettingKey, boolean enabled) { @@ -1085,4 +1095,12 @@ public class LockPatternUtils { mContext.startActivity(intent); } + public void setPowerButtonInstantlyLocks(boolean enabled) { + setBoolean(LOCKSCREEN_POWER_BUTTON_INSTANTLY_LOCKS, enabled); + } + + public boolean getPowerButtonInstantlyLocks() { + return getBoolean(LOCKSCREEN_POWER_BUTTON_INSTANTLY_LOCKS, true); + } + } diff --git a/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml b/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml index 7a5bb6a..568933c 100644 --- a/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml +++ b/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml @@ -63,7 +63,7 @@ </RelativeLayout> <!-- right side: password --> - <LinearLayout + <RelativeLayout android:layout_width="0dip" android:layout_weight="1" android:layout_height="match_parent" @@ -72,6 +72,7 @@ <LinearLayout android:orientation="vertical" + android:layout_centerInParent="true" android:layout_width="330dip" android:layout_height="wrap_content"> @@ -152,6 +153,15 @@ </LinearLayout> - </LinearLayout> + <!-- Area to overlay FaceLock --> + <View android:id="@+id/faceLockAreaView" + android:visibility="invisible" + android:layout_width="512dip" + android:layout_height="512dip" + android:layout_centerInParent="true" + android:background="@color/facelock_color_background" + /> + + </RelativeLayout> </LinearLayout> diff --git a/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml b/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml index 6df22ca..335a641 100644 --- a/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml +++ b/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml @@ -61,92 +61,109 @@ </RelativeLayout> <!-- bottom: password --> - <LinearLayout + <RelativeLayout android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1" - android:orientation="vertical" android:gravity="center"> - <!-- Password entry field --> <LinearLayout - android:orientation="horizontal" - android:layout_width="330dip" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:layout_marginTop="120dip" - android:layout_marginBottom="5dip" - android:background="@drawable/lockscreen_password_field_dark"> + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_centerInParent="true" + android:orientation="vertical" + android:gravity="center"> - <EditText android:id="@+id/passwordEntry" + <!-- Password entry field --> + <LinearLayout + android:orientation="horizontal" + android:layout_width="330dip" android:layout_height="wrap_content" - android:layout_width="0dip" - android:layout_weight="1" - android:singleLine="true" - android:textStyle="normal" - android:inputType="textPassword" - android:gravity="center" android:layout_gravity="center" - android:layout_marginLeft="@dimen/keyguard_lockscreen_pin_margin_left" - android:textSize="24sp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:background="@null" - android:textColor="#ffffffff" - android:privateImeOptions="com.google.android.inputmethod.latin.forceAscii" + android:layout_marginTop="120dip" + android:layout_marginBottom="5dip" + android:background="@drawable/lockscreen_password_field_dark"> + + <EditText android:id="@+id/passwordEntry" + android:layout_height="wrap_content" + android:layout_width="0dip" + android:layout_weight="1" + android:singleLine="true" + android:textStyle="normal" + android:inputType="textPassword" + android:gravity="center" + android:layout_gravity="center" + android:layout_marginLeft="@dimen/keyguard_lockscreen_pin_margin_left" + android:textSize="24sp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:background="@null" + android:textColor="#ffffffff" + android:privateImeOptions="com.google.android.inputmethod.latin.forceAscii" /> - <!-- This delete button is only visible for numeric PIN entry --> - <ImageButton android:id="@+id/pinDel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@android:drawable/ic_input_delete" - android:clickable="true" - android:padding="8dip" - android:layout_gravity="center" - android:background="?android:attr/selectableItemBackground" - android:visibility="gone" + <!-- This delete button is only visible for numeric PIN entry --> + <ImageButton android:id="@+id/pinDel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@android:drawable/ic_input_delete" + android:clickable="true" + android:padding="8dip" + android:layout_gravity="center" + android:background="?android:attr/selectableItemBackground" + android:visibility="gone" /> - <ImageView android:id="@+id/switch_ime_button" + <ImageView android:id="@+id/switch_ime_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_lockscreen_ime" + android:clickable="true" + android:padding="8dip" + android:layout_gravity="center" + android:background="?android:attr/selectableItemBackground" + android:visibility="gone" + /> + + </LinearLayout> + + <View + android:layout_width="match_parent" + android:layout_height="0dip" + android:layout_weight="1" + /> + + <!-- Numeric keyboard --> + <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard" + android:layout_width="330dip" + android:layout_height="260dip" + android:background="#40000000" + android:keyBackground="@drawable/btn_keyboard_key_ics" + android:layout_marginBottom="80dip" + android:clickable="true" + /> + + <!-- emergency call button --> + <Button android:id="@+id/emergencyCallButton" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:src="@drawable/ic_lockscreen_ime" - android:clickable="true" - android:padding="8dip" - android:layout_gravity="center" - android:background="?android:attr/selectableItemBackground" + android:drawableLeft="@drawable/ic_emergency" + android:drawablePadding="8dip" + android:text="@string/lockscreen_emergency_call" android:visibility="gone" - /> + style="@style/Widget.Button.Transparent" + /> </LinearLayout> - <View - android:layout_width="match_parent" - android:layout_height="0dip" - android:layout_weight="1" - /> - - <!-- Numeric keyboard --> - <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard" - android:layout_width="330dip" - android:layout_height="260dip" - android:background="#40000000" - android:keyBackground="@drawable/btn_keyboard_key_ics" - android:layout_marginBottom="80dip" - android:clickable="true" + <!-- Area to overlay FaceLock --> + <View android:id="@+id/faceLockAreaView" + android:visibility="invisible" + android:layout_width="512dip" + android:layout_height="512dip" + android:layout_centerInParent="true" + android:background="@color/facelock_color_background" /> - <!-- emergency call button --> - <Button - android:id="@+id/emergencyCallButton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:drawableLeft="@drawable/ic_emergency" - android:drawablePadding="8dip" - android:text="@string/lockscreen_emergency_call" - android:visibility="gone" - style="@style/Widget.Button.Transparent" - /> + </RelativeLayout> - </LinearLayout> </LinearLayout> diff --git a/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml b/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml index 70d18cc..802ef82 100644 --- a/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml +++ b/core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml @@ -72,48 +72,65 @@ android:layout_height="match_parent" android:gravity="center_vertical|center_horizontal"> - <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" - android:layout_width="354dip" - android:layout_height="354dip" - android:layout_gravity="center_vertical" - /> - - <!-- Emergency and forgot pattern buttons. --> - <LinearLayout - android:orientation="horizontal" - android:layout_width="match_parent" + <RelativeLayout + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_below="@id/lockPattern" - android:layout_alignLeft="@id/lockPattern" - android:layout_alignRight="@id/lockPattern" - android:layout_marginTop="28dip" - android:gravity="center" - style="?android:attr/buttonBarStyle" - android:weightSum="2"> - - <Button android:id="@+id/forgotPatternButton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - style="?android:attr/buttonBarButtonStyle" - android:drawableLeft="@drawable/lockscreen_forgot_password_button" - android:drawablePadding="8dip" - android:text="@string/lockscreen_forgot_pattern_button_text" - android:visibility="gone" + android:layout_centerInParent="true" + android:gravity="center_vertical|center_horizontal"> + + <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" + android:layout_width="354dip" + android:layout_height="354dip" + android:layout_gravity="center_vertical" /> - <Button android:id="@+id/emergencyCallButton" - android:layout_width="wrap_content" + <!-- Emergency and forgot pattern buttons. --> + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center" - style="?android:attr/buttonBarButtonStyle" - android:drawableLeft="@drawable/ic_emergency" - android:drawablePadding="8dip" - android:text="@string/lockscreen_emergency_call" - android:visibility="gone" - /> + android:orientation="horizontal" + android:layout_below="@id/lockPattern" + android:layout_alignLeft="@id/lockPattern" + android:layout_alignRight="@id/lockPattern" + android:layout_marginTop="28dip" + style="?android:attr/buttonBarStyle" + android:gravity="center" + android:weightSum="2"> + + <Button android:id="@+id/forgotPatternButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + style="?android:attr/buttonBarButtonStyle" + android:drawableLeft="@drawable/lockscreen_forgot_password_button" + android:drawablePadding="8dip" + android:text="@string/lockscreen_forgot_pattern_button_text" + android:visibility="gone" + /> - </LinearLayout> + <Button android:id="@+id/emergencyCallButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + style="?android:attr/buttonBarButtonStyle" + android:drawableLeft="@drawable/ic_emergency" + android:drawablePadding="8dip" + android:text="@string/lockscreen_emergency_call" + android:visibility="gone" + /> + + </LinearLayout> + + </RelativeLayout> + + <!-- Area to overlay FaceLock --> + <View android:id="@+id/faceLockAreaView" + android:visibility="invisible" + android:layout_width="512dip" + android:layout_height="512dip" + android:layout_centerInParent="true" + android:background="@color/facelock_color_background" + /> </RelativeLayout> diff --git a/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml b/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml index 7a623ce..40f2492 100644 --- a/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml +++ b/core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml @@ -62,52 +62,71 @@ </RelativeLayout> <!-- bottom: lock pattern, emergency dialer and forgot pattern button --> - <LinearLayout + <RelativeLayout android:layout_weight="1" android:layout_width="match_parent" android:layout_height="0dip" - android:orientation="vertical" android:gravity="center"> - <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" - android:layout_width="354dip" - android:layout_height="354dip" - android:layout_marginTop="50dip"/> - - <!-- Emergency and forgot pattern buttons. --> - <LinearLayout - android:layout_width="match_parent" + <RelativeLayout + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="horizontal" - style="?android:attr/buttonBarStyle" - android:gravity="center" - android:weightSum="2"> + android:layout_centerInParent="true" + android:gravity="center"> - <Button android:id="@+id/forgotPatternButton" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - style="?android:attr/buttonBarButtonStyle" - android:drawableLeft="@drawable/lockscreen_forgot_password_button" - android:drawablePadding="8dip" - android:text="@string/lockscreen_forgot_pattern_button_text" - android:visibility="gone" + <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" + android:layout_width="354dip" + android:layout_height="354dip" + android:layout_marginTop="50dip" /> - <Button android:id="@+id/emergencyCallButton" - android:layout_width="wrap_content" + <!-- Emergency and forgot pattern buttons. --> + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center" - style="?android:attr/buttonBarButtonStyle" - android:drawableLeft="@drawable/ic_emergency" - android:drawablePadding="8dip" - android:text="@string/lockscreen_emergency_call" - android:visibility="gone" - /> + android:orientation="horizontal" + android:layout_below="@id/lockPattern" + android:layout_alignLeft="@id/lockPattern" + android:layout_alignRight="@id/lockPattern" + style="?android:attr/buttonBarStyle" + android:gravity="center" + android:weightSum="2"> + + <Button android:id="@+id/forgotPatternButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + style="?android:attr/buttonBarButtonStyle" + android:drawableLeft="@drawable/lockscreen_forgot_password_button" + android:drawablePadding="8dip" + android:text="@string/lockscreen_forgot_pattern_button_text" + android:visibility="gone" + /> - </LinearLayout> + <Button android:id="@+id/emergencyCallButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + style="?android:attr/buttonBarButtonStyle" + android:drawableLeft="@drawable/ic_emergency" + android:drawablePadding="8dip" + android:text="@string/lockscreen_emergency_call" + android:visibility="gone" + /> - </LinearLayout> + </LinearLayout> -</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> + </RelativeLayout> + <!-- Area to overlay FaceLock --> + <View android:id="@+id/faceLockAreaView" + android:visibility="invisible" + android:layout_width="512dip" + android:layout_height="512dip" + android:layout_centerInParent="true" + android:background="@color/facelock_color_background" + /> + + </RelativeLayout> + +</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java index 0580ebc..d375d4c 100644 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java @@ -249,8 +249,6 @@ public class ConnectivityManagerTestActivity extends Activity { sleep(SHORT_TIMEOUT); removeConfiguredNetworksAndDisableWifi(); mWifiRegexs = mCM.getTetherableWifiRegexs(); - // after wifi is shutdown, wait for 2 minute to enable wifi - sleep(WIFI_STOP_START_INTERVAL); } public List<WifiConfiguration> loadNetworkConfigurations() throws Exception { |