Merge "Fix the re-entrance of VpnSetting issue." into honeycomb
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 66bb1e4..0f2390c 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -110,7 +110,6 @@
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.settings.WIFI_SETTINGS" />
- <action android:name="android.net.wifi.PICK_WIFI_NETWORK" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.VOICE_LAUNCH" />
<category android:name="com.android.settings.SHORTCUT" />
@@ -125,6 +124,16 @@
android:value="com.android.settings.Settings$WirelessSettingsActivity" />
</activity>
+ <activity android:name=".wifi.WifiPickerActivity"
+ android:theme="@android:style/Theme.Holo"
+ android:clearTaskOnLaunch="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <action android:name="android.net.wifi.PICK_WIFI_NETWORK" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
<activity android:name=".wifi.WifiSettingsForSetupWizardXL"
android:theme="@android:style/Theme.Holo.NoActionBar"
android:clearTaskOnLaunch="true"
@@ -382,15 +391,6 @@
android:resource="@id/language_settings" />
</activity>
- <activity android:name="PhysicalKeyboardSettings"
- android:label="@string/builtin_keyboard_settings_title"
- android:theme="@android:style/Theme.Holo.DialogWhenLarge">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity>
-
<activity android:name="Settings$UserDictionarySettingsActivity"
android:theme="@android:style/Theme.Holo"
android:label="@string/user_dict_settings_titlebar"
diff --git a/res/layout-xlarge/date_time_settings_setupwizard.xml b/res/layout-xlarge/date_time_settings_setupwizard.xml
index 328a014..483b66a 100644
--- a/res/layout-xlarge/date_time_settings_setupwizard.xml
+++ b/res/layout-xlarge/date_time_settings_setupwizard.xml
@@ -18,7 +18,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingTop="160dip"
+ android:paddingTop="154dip"
android:paddingLeft="128dip"
android:paddingRight="128dip"
android:paddingBottom="96dip">
@@ -34,8 +34,8 @@
android:layout_alignParentTop="true"
android:textSize="30dip"
android:textColor="#FF99cc00"
- android:text="@string/date_and_time_settings_title"
- android:gravity="center_vertical" />
+ android:text="@string/date_and_time_settings_title_setup_wizard"
+ android:gravity="bottom" />
<!-- Divider -->
<View
@@ -44,106 +44,122 @@
android:layout_height="3dip"
android:layout_below="@id/title"
android:layout_marginTop="6dip"
- android:layout_marginBottom="7dip"
+ android:layout_marginBottom="17dip"
android:background="@color/divider_color" />
- <!-- timezone -->
- <Button
- android:id="@+id/time_zone_button"
- style="?android:attr/dropDownSpinnerStyle"
- android:layout_width="304dip"
- android:layout_height="48dip"
- android:layout_below="@id/top_divider"
- android:layout_marginTop="48dip"
- android:layout_marginLeft="16dip"
- android:paddingLeft="16dip"
- android:paddingTop="0dip"
- android:paddingBottom="0dip"
- android:gravity="left|center"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <LinearLayout
- android:id="@+id/date_time_auto"
- android:layout_width="624dip"
+ <RelativeLayout
+ android:id="@+id/timezone_auto_time"
+ android:layout_width="716dip"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_below="@id/top_divider"
- android:layout_alignParentRight="true"
- android:layout_marginTop="32dip"
- android:layout_marginRight="16dip"
- android:layout_marginBottom="48dip">
-
- <Switch
- android:id="@+id/date_time_auto_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:layout_marginLeft="16dip"
- android:layout_marginRight="16dip"
- android:text="@string/date_time_auto"
+ android:layout_centerHorizontal="true"
+ android:layout_below="@id/top_divider">
+ <!-- timezone -->
+ <Button
+ android:id="@+id/time_zone_button"
+ style="?android:attr/dropDownSpinnerStyle"
+ android:layout_width="304dip"
+ android:layout_height="48dip"
+ android:layout_alignParentLeft="true"
+ android:layout_centerVertical="true"
+ android:gravity="left|center_vertical"
android:textAppearance="?android:attr/textAppearanceMedium" />
- <!-- Divider -->
+ <LinearLayout
+ android:id="@+id/date_time_auto"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_toRightOf="@id/time_zone_button"
+ android:layout_marginLeft="32dip"
+ android:layout_centerVertical="true"
+ android:layout_alignParentRight="true">
+
+ <Switch
+ android:id="@+id/date_time_auto_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:layout_marginLeft="16dip"
+ android:layout_marginRight="16dip"
+ android:text="@string/date_time_auto"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <!-- Divider -->
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:background="@color/divider_color" />
+ </LinearLayout>
+ </RelativeLayout>
+
+ <LinearLayout
+ android:layout_width="624dip"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:layout_below="@+id/timezone_auto_time"
+ android:layout_marginTop="48dip"
+ android:orientation="horizontal">
+
+ <LinearLayout
+ android:layout_width="312dip"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+ <TextView
+ android:id="@+id/date_picker_title"
+ android:layout_width="match_parent"
+ android:layout_height="48dip"
+ android:text="@string/date_picker_title"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:clickable="false"
+ android:longClickable="false"
+ android:gravity="center" />
+ <DatePicker
+ android:id="@+id/date_picker"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/date_picker_title" />
+ </LinearLayout>
+
+ <!-- divider -->
<View
- android:layout_width="match_parent"
- android:layout_height="1px"
+ android:id="@+id/center_divider"
+ android:layout_width="1dip"
+ android:layout_height="match_parent"
android:background="@color/divider_color" />
+
+ <LinearLayout
+ android:layout_width="312dip"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+ <TextView
+ android:id="@+id/time_picker_title"
+ android:layout_width="match_parent"
+ android:layout_height="48dip"
+ android:text="@string/time_picker_title"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:gravity="center" />
+
+ <TimePicker
+ android:id="@+id/time_picker"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/time_picker_title" />
+ </LinearLayout>
</LinearLayout>
- <TextView
- android:id="@+id/date_picker_title"
- android:layout_width="312dip"
- android:layout_height="48dip"
- android:layout_toLeftOf="@+id/time_picker_title"
- android:layout_below="@id/date_time_auto"
- android:text="@string/date_picker_title"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="center" />
-
- <DatePicker
- android:id="@+id/date_picker"
- android:layout_width="312dip"
- android:layout_height="wrap_content"
- android:layout_toLeftOf="@+id/time_picker"
- android:layout_below="@id/date_picker_title" />
-
- <TextView
- android:id="@+id/time_picker_title"
- android:layout_width="312dip"
- android:layout_height="48dip"
- android:layout_below="@id/date_time_auto"
- android:layout_alignParentRight="true"
- android:text="@string/time_picker_title"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="center" />
-
- <TimePicker
- android:id="@+id/time_picker"
- android:layout_width="312dip"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_below="@id/time_picker_title" />
-
- <!-- TODO: remove this button when we are sure it is needless -->
- <Button
- android:id="@+id/skip_button"
- android:layout_width="208dip"
- android:layout_height="48dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_alignParentBottom="true"
- android:layout_toLeftOf="@+id/next_button"
- android:layout_marginRight="16dip"
- android:text="@string/skip_label"
- android:visibility="gone" />
+ <View
+ android:id="@+id/bottom_divider"
+ android:layout_width="match_parent"
+ android:layout_height="3dip"
+ android:layout_alignLeft="@id/timezone_auto_time"
+ android:layout_above="@+id/next_button"
+ android:layout_marginBottom="16dip"
+ android:background="@color/divider_color" />
<Button
android:id="@+id/next_button"
- android:layout_width="208dip"
- android:layout_height="48dip"
+ style="@style/setup_wizard_button"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
- android:layout_marginRight="16dip"
- android:text="@string/next_label"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
+ android:text="@string/next_label" />
</RelativeLayout>
diff --git a/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml b/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
index d3af1f8..29427d4 100644
--- a/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
+++ b/res/layout-xlarge/wifi_settings_for_setup_wizard_xl.xml
@@ -19,46 +19,43 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:paddingTop="120dip"
+ android:paddingTop="60dip"
android:paddingLeft="128dip"
android:paddingRight="128dip"
android:paddingBottom="0dip" >
- <RelativeLayout
- android:id="@+id/title_bar"
+ <FrameLayout
+ android:id="@+id/top_padding_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="48dip"
android:layout_alignParentTop="true">
+ <!-- Set to gone when software keyboard appears -->
+ <View
+ android:id="@+id/top_padding"
+ android:layout_width="match_parent"
+ android:layout_height="94dip" />
+ </FrameLayout>
- <TextView
- android:id="@+id/wifi_setup_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:layout_marginLeft="16dip"
- android:textSize="30dip"
- android:textColor="#FF99cc00"
- android:text="@string/wifi_setup_title"/>
-
- <TextView
- android:id="@+id/scanning_progress_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:layout_marginRight="16dip"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="#6699cc00" />
- </RelativeLayout>
+ <TextView
+ android:id="@+id/wifi_setup_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:minHeight="48dip"
+ android:layout_alignParentLeft="true"
+ android:layout_centerVertical="true"
+ android:layout_marginLeft="16dip"
+ android:layout_below="@id/top_padding_layout"
+ android:textSize="30dip"
+ android:textColor="#ff99cc00"
+ android:text="@string/wifi_setup_title"
+ android:gravity="bottom"/>
<!-- Divider -->
<RelativeLayout
android:id="@+id/top_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_below="@id/title_bar">
+ android:layout_below="@id/wifi_setup_title">
<ProgressBar
android:id="@+id/scanning_progress_bar"
android:layout_width="match_parent"
@@ -66,35 +63,19 @@
style="?android:attr/progressBarStyleHorizontal" />
</RelativeLayout>
- <TextView
- android:id="@+id/wifi_setup_status"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@+id/top_divider"
- android:layout_alignParentLeft="true"
- android:layout_marginLeft="16dip"
- android:layout_marginTop="16dip"
- android:layout_marginBottom="0dip"
- android:text="@string/wifi_setup_status_select_network"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <FrameLayout
+ <RelativeLayout
android:id="@+id/content"
- android:layout_width="wrap_content"
+ android:layout_width="716dip"
android:layout_height="wrap_content"
- android:minHeight="138dip"
- android:layout_below="@+id/wifi_setup_status"
- android:layout_alignParentLeft="true"
- android:layout_marginTop="0dip"
- android:layout_marginLeft="16dip"
- android:layout_marginRight="16dip"
+ android:layout_below="@id/top_divider"
+ android:layout_centerHorizontal="true"
+ android:layout_marginTop="10dip"
android:layout_marginBottom="0dip">
<FrameLayout
android:id="@+id/wifi_setup"
- android:layout_width="416dip"
- android:layout_height="383dip"
- android:paddingTop="16dip">
+ android:layout_width="match_parent"
+ android:layout_height="360dip">
<fragment
class="com.android.settings.wifi.WifiSettings"
android:id="@+id/wifi_setup_fragment"
@@ -103,74 +84,76 @@
</FrameLayout>
<FrameLayout
android:id="@+id/wifi_config_ui"
- android:layout_width="416dip"
+ android:layout_width="wrap_content"
+ android:minWidth="406dip"
android:layout_height="wrap_content"
- android:paddingTop="16dip"
+ android:minHeight="176dip"
+ android:layout_alignParentLeft="true"
android:visibility="gone" />
- </FrameLayout>
+ <View
+ android:id="@+id/wifi_config_padding"
+ android:layout_width="match_parent"
+ android:layout_height="360dip"
+ android:visibility="gone" />
+ </RelativeLayout>
- <LinearLayout
- android:id="@+id/right_buttons"
- android:layout_width="wrap_content"
+ <!-- Divider -->
+ <View
+ android:id="@+id/bottom_divider"
+ android:layout_width="match_parent"
+ android:layout_height="3dip"
+ android:layout_marginBottom="16dip"
+ android:layout_below="@id/content"
+ android:layout_alignLeft="@id/content"
+ android:background="@color/divider_color" /> <!-- TODO: fix this -->
+
+ <RelativeLayout
+ android:id="@+id/bottom_buttons"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
+ android:layout_below="@id/bottom_divider"
+ android:layout_alignLeft="@id/bottom_divider"
android:layout_alignParentRight="true"
- android:layout_marginRight="16dip"
- android:layout_alignBottom="@+id/content"
- android:layout_marginBottom="16dip">
+ android:layout_alignParentBottom="true">
- <Button android:id="@+id/wifi_setup_forget"
- android:layout_width="208dip"
- android:layout_height="48dip"
- android:layout_marginLeft="16dip"
- android:text="@string/wifi_setup_forget"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:visibility="gone" />
+ <Button
+ android:id="@+id/wifi_setup_add_network"
+ style="@style/setup_wizard_button"
+ android:layout_alignParentLeft="true"
+ android:text="@string/wifi_setup_add_network"
+ android:enabled="false" />
- <Button android:id="@+id/wifi_setup_connect"
- android:layout_width="208dip"
- android:layout_height="48dip"
- android:layout_marginTop="96dip"
- android:layout_marginLeft="16dip"
- android:text="@string/wifi_setup_connect"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:enabled="false"
- android:visibility="gone" />
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:orientation="horizontal">
- <Button android:id="@+id/wifi_setup_add_network"
- android:layout_width="208dip"
- android:layout_height="48dip"
- android:layout_marginLeft="16dip"
- android:text="@string/wifi_setup_add_network"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:enabled="false" />
+ <!-- This misleading name is for keeping consistency between non-XL
+ layouts -->
+ <Button android:id="@+id/wifi_setup_cancel"
+ style="@style/setup_wizard_button"
+ android:text="@string/wifi_setup_back"
+ android:visibility="gone" />
- <Button android:id="@+id/wifi_setup_refresh_list"
- android:layout_width="208dip"
- android:layout_height="48dip"
- android:layout_marginLeft="16dip"
- android:text="@string/wifi_setup_refresh_list"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:enabled="false" />
+ <Button android:id="@+id/wifi_setup_connect"
+ style="@style/setup_wizard_button"
+ android:layout_marginLeft="16dip"
+ android:text="@string/wifi_setup_connect"
+ android:enabled="false"
+ android:visibility="gone" />
- <Button android:id="@+id/wifi_setup_skip_or_next"
- android:layout_width="208dip"
- android:layout_height="48dip"
- android:layout_marginTop="96dip"
- android:layout_marginLeft="16dip"
- android:text="@string/wifi_setup_skip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:enabled="false" />
- </LinearLayout>
+ <Button android:id="@+id/wifi_setup_refresh_list"
+ style="@style/setup_wizard_button"
+ android:layout_marginLeft="16dip"
+ android:text="@string/wifi_setup_refresh_list"
+ android:enabled="false" />
- <!-- This misleading name is for keeping consistency between non-XL layouts -->
- <Button android:id="@+id/wifi_setup_cancel"
- android:layout_width="208dip"
- android:layout_height="48dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_marginBottom="16dip"
- android:layout_alignBottom="@+id/content"
- android:layout_toLeftOf="@id/right_buttons"
- android:text="@string/wifi_setup_back"
- android:visibility="gone" />
+ <Button android:id="@+id/wifi_setup_skip_or_next"
+ style="@style/setup_wizard_button"
+ android:layout_marginLeft="16dip"
+ android:text="@string/wifi_setup_skip"
+ android:enabled="false" />
+ </LinearLayout>
+ </RelativeLayout>
</RelativeLayout>
diff --git a/res/layout/installed_app_details.xml b/res/layout/installed_app_details.xml
index fff1975..0b68d47 100644
--- a/res/layout/installed_app_details.xml
+++ b/res/layout/installed_app_details.xml
@@ -132,6 +132,7 @@
android:maxLines="1" />
</LinearLayout>
+
<LinearLayout
android:id="@+id/info_size"
android:layout_width="match_parent"
@@ -169,6 +170,44 @@
android:maxLines="1" />
</LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:baselineAligned="true"
+ android:paddingTop="-1dip">
+ <TextView
+ android:id="@+id/external_size_prefix"
+ android:text="@string/external_size_label"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:maxLines="1"
+ android:paddingTop="6dip"
+ android:paddingLeft="6dip"/>
+ <ImageView
+ android:id="@+id/info_size_dots"
+ android:src="@drawable/dotted_line_480px"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:layout_height="1px"
+ android:layout_gravity="bottom"
+ android:layout_marginLeft="1dip"
+ android:layout_marginRight="1dip"
+ android:layout_marginBottom="4dip"
+ android:scaleType="center" />
+ <TextView
+ android:id="@+id/external_size_text"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:paddingTop="6dip"
+ android:paddingRight="6dip"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:maxLines="1" />
+
+ </LinearLayout>
+
<!-- Clear data and install location buttons -->
<include
layout="@layout/two_buttons_panel"
diff --git a/res/layout/settings_actionbar.xml b/res/layout/settings_actionbar.xml
deleted file mode 100644
index 711a0a1..0000000
--- a/res/layout/settings_actionbar.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
- android:padding="4dip"
- android:gravity="center_vertical"
- android:layout_width="wrap_content"
- android:layout_height="match_parent">
-
- <!-- ImageView
- android:src="@mipmap/ic_launcher_settings"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:layout_marginLeft="4dip"
- android:layout_marginRight="4dip"
- /-->
-
- <view class="com.android.settings.Settings$BreadCrumbs"
- android:id="@+id/bread_crumbs"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:orientation="horizontal">
-
- <TextView android:id="@+id/level_up_title"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:gravity="center_vertical"
- style="?android:attr/textAppearanceMediumInverse"
- />
-
- <ImageView
- android:id="@+id/level_divider"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginTop="4dip"
- android:layout_marginBottom="4dip"
- android:layout_marginLeft="12dip"
- android:layout_marginRight="12dip"
- android:src="@drawable/nav_divider"/>
-
- <TextView android:id="@+id/level_current_title"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:gravity="center_vertical"
- style="?android:attr/textAppearanceMediumInverse"
- />
- </view>
-</LinearLayout>
diff --git a/res/layout/settings_top_level.xml b/res/layout/settings_top_level.xml
deleted file mode 100644
index b029915..0000000
--- a/res/layout/settings_top_level.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Top-level Settings layout with fragments. -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <FrameLayout android:id="@+id/prefs"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- />
-
- <!-- button_bar -->
- <RelativeLayout android:id="@+id/button_bar"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:layout_weight="0"
- android:background="@android:drawable/bottom_bar"
- android:visibility="gone">
-
- <Button android:id="@+id/back_button"
- android:layout_width="150dip"
- android:layout_height="wrap_content"
- android:layout_margin="5dip"
- android:layout_alignParentLeft="true"
- android:drawablePadding="3dip"
- />
- <LinearLayout
- android:orientation="horizontal"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true">
-
- <Button android:id="@+id/skip_button"
- android:layout_width="150dip"
- android:layout_height="wrap_content"
- android:layout_margin="5dip"
- android:text="@string/skip_button_label"
- android:visibility="gone"
- />
-
- <Button android:id="@+id/next_button"
- android:layout_width="150dip"
- android:layout_height="wrap_content"
- android:layout_margin="5dip"
- android:drawableRight="@drawable/ic_btn_next"
- android:drawablePadding="3dip"
- android:text="@string/next_button_label"
- />
- </LinearLayout>
- </RelativeLayout>
-</LinearLayout>
diff --git a/res/layout/wifi_config_ui_for_setup_wizard.xml b/res/layout/wifi_config_ui_for_setup_wizard.xml
index c96a15c..0154a3c 100644
--- a/res/layout/wifi_config_ui_for_setup_wizard.xml
+++ b/res/layout/wifi_config_ui_for_setup_wizard.xml
@@ -16,13 +16,15 @@
<!-- All ids in this layout must be in wifi_dialog.xml -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <!-- TODO: remove this once we confirm it is needless -->
<LinearLayout
android:id="@+id/wifi_general_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:visibility="gone">
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -43,72 +45,76 @@
<!-- UI components that should be shown appropriately -->
<LinearLayout android:id="@+id/wps_fields"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_wps_pin" />
<EditText android:id="@+id/wps_pin"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textPassword" />
</LinearLayout>
<LinearLayout android:id="@+id/security_fields"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
- <TextView android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="@string/wifi_password" />
-
- <EditText android:id="@+id/password"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:password="true" />
+ <LinearLayout android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+ <TextView android:layout_width="wrap_content"
+ android:minWidth="88dip"
+ android:layout_height="wrap_content"
+ android:text="@string/wifi_password" />
+ <EditText android:id="@+id/password"
+ android:layout_width="320dip"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:password="true" />
+ </LinearLayout>
<CheckBox android:id="@+id/show_password"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_show_password" />
</LinearLayout>
<LinearLayout android:id="@+id/type"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
- <TextView android:layout_width="fill_parent"
+ <TextView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_ssid" />
<EditText android:id="@+id/ssid"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
- <TextView android:layout_width="fill_parent"
+ <TextView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_security" />
<Spinner android:id="@+id/security"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:prompt="@string/wifi_security"
android:entries="@array/wifi_security" />
</LinearLayout> <!-- android:id="@+id/type" -->
<LinearLayout android:id="@+id/eap_not_supported"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="32dip"
+ android:minHeight="360dip"
android:orientation="vertical"
android:visibility="gone">
<TextView android:layout_width="match_parent"
@@ -127,23 +133,23 @@
android:visibility="gone">
<LinearLayout android:id="@+id/info"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"/>
<LinearLayout android:id="@+id/setup_fields"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_network_setup" />
<Spinner android:id="@+id/network_setup"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:prompt="@string/wifi_network_setup"
android:entries="@array/wifi_network_setup" />
@@ -152,18 +158,18 @@
<!--
<LinearLayout android:id="@+id/wps_fields"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_wps_pin" />
<EditText android:id="@+id/wps_pin"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textPassword" />
@@ -171,225 +177,225 @@
<!-- android:id="@+id/security_fields" -->
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout android:id="@+id/eap"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_eap_method" />
<Spinner android:id="@+id/method"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:prompt="@string/wifi_eap_method"
android:entries="@array/wifi_eap_method" />
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/please_select_phase2" />
<Spinner android:id="@+id/phase2"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:prompt="@string/please_select_phase2"
android:entries="@array/wifi_phase2_entries" />
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_eap_ca_cert" />
<Spinner android:id="@+id/ca_cert"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:prompt="@string/wifi_eap_ca_cert" />
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_eap_user_cert" />
<Spinner android:id="@+id/user_cert"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:prompt="@string/wifi_eap_user_cert" />
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_eap_identity" />
<EditText android:id="@+id/identity"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_eap_anonymous" />
<EditText android:id="@+id/anonymous"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
</LinearLayout> <!-- android:id="@+id/eap" -->
- <!-- <TextView android:layout_width="fill_parent"
+ <!-- <TextView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_password" />
<EditText android:id="@+id/password"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:password="true" />
<CheckBox android:id="@+id/show_password"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_show_password" /> -->
</LinearLayout> <!-- android:id="@+id/security_fields" -->
<LinearLayout android:id="@+id/ip_fields"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_ip_settings" />
<Spinner android:id="@+id/ip_settings"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:prompt="@string/wifi_ip_settings"
android:entries="@array/wifi_ip_settings" />
</LinearLayout>
<LinearLayout android:id="@+id/staticip"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_ip_address" />
<EditText android:id="@+id/ipaddress"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_gateway" />
<EditText android:id="@+id/gateway"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_network_prefix_length" />
<EditText android:id="@+id/network_prefix_length"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_dns1" />
<EditText android:id="@+id/dns1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/wifi_dns2" />
<EditText android:id="@+id/dns2"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
<LinearLayout android:id="@+id/proxy_settings_fields"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<TextView android:id="@+id/proxy_settings_title"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/proxy_settings_title" />
<Spinner android:id="@+id/proxy_settings"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:prompt="@string/proxy_settings_title"
android:entries="@array/wifi_proxy_settings" />
</LinearLayout>
<LinearLayout android:id="@+id/proxy_fields"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
- <TextView android:layout_width="fill_parent"
+ <TextView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/proxy_hostname_label" />
<EditText android:id="@+id/proxy_hostname"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
- <TextView android:layout_width="fill_parent"
+ <TextView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/proxy_port_label" />
<EditText android:id="@+id/proxy_port"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
- <TextView android:layout_width="fill_parent"
+ <TextView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/proxy_exclusionlist_label" />
<EditText android:id="@+id/proxy_exclusionlist"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textNoSuggestions" />
diff --git a/res/values-es-rUS-xlarge/strings.xml b/res/values-es-rUS-xlarge/strings.xml
index b1b3568..94555e6 100644
--- a/res/values-es-rUS-xlarge/strings.xml
+++ b/res/values-es-rUS-xlarge/strings.xml
@@ -64,7 +64,7 @@
<!-- XL -->
<string name="time_picker_title" msgid="4696843998853074855">"Hora"</string>
<!-- XL -->
- <!-- outdated translation 8167667824619597923 --> <string name="lock_after_timeout" msgid="7600891513842005">"Bloquear el dispositivo después del tiempo de espera"</string>
+ <string name="lock_after_timeout" msgid="7600891513842005">"Tiempo de espera"</string>
<!-- XL -->
<string name="owner_info_settings_title" msgid="5868468517033834142">"Datos de propietario"</string>
<!-- XL -->
@@ -76,19 +76,19 @@
<!-- XL -->
<!-- outdated translation 7222261825322058694 --> <string name="lock_settings_picker_title" msgid="2690788880781812819">"Seguridad de desbloqueo de la pantalla"</string>
<!-- XL -->
- <!-- outdated translation 347866107250190753 --> <string name="unlock_set_unlock_launch_picker_title" msgid="3679744779726501637">"Configurar bloqueo de pantalla"</string>
+ <string name="unlock_set_unlock_launch_picker_title" msgid="3679744779726501637">"Configurar bloqueo de pantalla"</string>
<!-- XL -->
- <!-- outdated translation 7839021413264124726 --> <string name="unlock_set_unlock_off_summary" msgid="7637549453338831016">"No mostrar el bloqueo de pantalla"</string>
+ <string name="unlock_set_unlock_off_summary" msgid="7637549453338831016">"Nunca bloquear la pantalla"</string>
<!-- XL -->
- <!-- outdated translation 6897899776351307938 --> <string name="unlock_set_unlock_none_title" msgid="8302920869082326280">"Ninguno"</string>
+ <string name="unlock_set_unlock_none_title" msgid="8302920869082326280">"Sin asegurar"</string>
<!-- XL -->
- <!-- outdated translation 8885805726462075726 --> <string name="unlock_set_unlock_none_summary" msgid="8836395154986917752">"Inhabilitar seguridad de desbloqueo de la pantalla"</string>
+ <string name="unlock_set_unlock_none_summary" msgid="8836395154986917752">"No se necesita un patrón, PIN o contraseña para desbloquear la pantalla"</string>
<!-- XL -->
- <!-- outdated translation 2255207039632944974 --> <string name="unlock_set_unlock_pattern_summary" msgid="7704094261502377451">"Establece el patrón para desbloquear la pantalla."</string>
+ <string name="unlock_set_unlock_pattern_summary" msgid="7704094261502377451">"Solicitar un patrón para desbloquear la pantalla"</string>
<!-- XL -->
- <!-- outdated translation 7340012856731870485 --> <string name="unlock_set_unlock_pin_summary" msgid="8765565920176739681">"Ingresa un PIN numérico para desbloquear la pantalla."</string>
+ <string name="unlock_set_unlock_pin_summary" msgid="8765565920176739681">"Se necesita PIN numérico para desbloquear la pantalla."</string>
<!-- XL -->
- <!-- outdated translation 2303105580723976714 --> <string name="unlock_set_unlock_password_summary" msgid="5551818803088356462">"Ingresa una contraseña para desbloquear la pantalla."</string>
+ <string name="unlock_set_unlock_password_summary" msgid="5551818803088356462">"Solicitar una contraseña para desbloquear la pantalla"</string>
<!-- XL -->
<string name="unlock_set_unlock_disabled_summary" msgid="5962903914511361952">"Inhabilitado por el administrador remoto de la tableta"</string>
<!-- XL -->
@@ -144,7 +144,7 @@
<!-- XL -->
<string name="wifi_tether_settings_title" msgid="1163442397537759931">"Configuración de la zona activa Wi-Fi portátil"</string>
<!-- XL -->
- <!-- outdated translation 221091308884159495 --> <string name="display_settings_title" msgid="891288246221134525">"Pantalla"</string>
+ <string name="display_settings_title" msgid="891288246221134525">"Pantalla"</string>
<!-- XL -->
<string name="silent_mode_title" msgid="1261478570389701519">"Modo silencio"</string>
<!-- XL -->
@@ -186,7 +186,7 @@
<string name="accelerometer_summary_off" product="tablet" msgid="4678290739639397018">"Cambiar la orientación automáticamente al girar la tableta"</string>
<string name="accelerometer_summary_off" product="default" msgid="5382045890112616097">"Cambiar la orientación automáticamente al girar el teléfono"</string>
<!-- XL -->
- <!-- outdated translation 4642702020751106195 --> <string name="screen_timeout" msgid="6722687152321894360">"Tiempo de espera de la pantalla"</string>
+ <string name="screen_timeout" msgid="6722687152321894360">"Tiempo de espera"</string>
<!-- XL -->
<string name="sim_lock_settings_category" msgid="3725835714557961131">"Configurar bloqueo de tarjeta SIM"</string>
<!-- XL -->
@@ -260,11 +260,11 @@
<!-- XL -->
<string name="location_gps_disabled" msgid="368445950600796860">"Localizar a nivel de calle (necesita más batería además de la vista del cielo)"</string>
<!-- XL -->
- <!-- outdated translation 6158635740500076705 --> <string name="use_location_title" msgid="6603235165943700077">"Utilizar la ubicación para buscar con Google"</string>
+ <string name="use_location_title" msgid="6603235165943700077">"Utilizar la ubicación para buscar con Google"</string>
<!-- XL -->
- <!-- outdated translation 5137275253035183227 --> <string name="use_location_summary_disabled" msgid="555010365449402016">"Utilizar la ubicación para buscar con Google y otros servicios de Google"</string>
+ <string name="use_location_summary_disabled" msgid="555010365449402016">"Utilizar la ubicación para buscar con Google y otros servicios de Google"</string>
<!-- XL -->
- <!-- outdated translation 7252704818478660952 --> <string name="use_location_summary_enabled" msgid="5155029913791084058">"Ubicación utilizada para mejorar los resultados de la búsqueda y otros servicios de Google"</string>
+ <string name="use_location_summary_enabled" msgid="5155029913791084058">"Ubicación utilizada para mejorar los resultados de la búsqueda y otros servicios de Google"</string>
<!-- XL -->
<string name="about_settings" product="tablet" msgid="4492242295431251939">"Acerca de la tableta"</string>
<string name="about_settings" product="default" msgid="5642163368100089859">"Acerca del teléfono"</string>
@@ -278,7 +278,7 @@
<!-- XL -->
<string name="lockpassword_choose_lock_generic_header" msgid="205113288645586976">"Desbloquear selección"</string>
<!-- XL -->
- <!-- outdated translation 1032594113258846963 --> <string name="lock_settings_title" msgid="9000564553472290676">"Desbloqueo de pantalla"</string>
+ <string name="lock_settings_title" msgid="9000564553472290676">"Bloquear pantalla"</string>
<!-- XL -->
<string name="lockpattern_change_lock_pattern_label" msgid="4234350892820550249">"Cambiar gráfico de desbloqueo"</string>
<!-- XL -->
@@ -442,6 +442,24 @@
<!-- XL -->
<string name="bluetooth_auto_connect" msgid="5635834571497957651">"Conectar automáticamente"</string>
<!-- XL -->
+ <string name="lock_after_timeout_summary" msgid="1115580514157023005">"Bloquear pantalla <xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> luego de que la pantalla se apague automáticamente"</string>
+ <!-- XL -->
+ <string name="encryption_settings_title" msgid="2646733014286658918">"Encriptación del dispositivo"</string>
+ <!-- XL -->
+ <string name="encrypt_title" msgid="6588721799092579532">"Encriptar datos en el dispositivo"</string>
+ <!-- XL -->
+ <string name="encrypt_summary" msgid="8034174282555891811">"Debes configurar un número de PIN o contraseña para desbloquear el dispositivo"</string>
+ <!-- XL -->
+ <string name="unlock_set_unlock_mode_off" msgid="3083317055441778577">"Apagado"</string>
+ <!-- XL -->
+ <string name="unlock_set_unlock_mode_none" msgid="2265502443989071295">"Sin asegurar"</string>
+ <!-- XL -->
+ <string name="unlock_set_unlock_mode_pattern" msgid="891892061776325935">"Asegurado con patrón"</string>
+ <!-- XL -->
+ <string name="unlock_set_unlock_mode_pin" msgid="948449971660341581">"Asegurado con número de PIN"</string>
+ <!-- XL -->
+ <string name="unlock_set_unlock_mode_password" msgid="527487918702728081">"Asegurado con contraseña"</string>
+ <!-- XL -->
<string name="lockpattern_tutorial_cancel_label" msgid="8891383231976441554">"Cancelar"</string>
<!-- XL -->
<string name="lockpattern_tutorial_continue_label" msgid="607092788342282292">"Siguiente"</string>
@@ -450,6 +468,8 @@
<!-- XL -->
<string name="bluetooth_enter_passkey_msg" msgid="5281098098369174842">\n"Ingresa la llave maestra para vincular con \"<xliff:g id="DEVICE_NAME">%1$s</xliff:g>\"."</string>
<!-- XL -->
+ <string name="bluetooth_display_passkey_pin_msg" msgid="4517875819897263465">"Ingresa la \"<xliff:g id="PASSKEY">%2$s</xliff:g>\" en tu \"<xliff:g id="DEVICE_NAME">%1$s</xliff:g>\" para sincronizar y luego return (volver) o enter (aceptar)."</string>
+ <!-- XL -->
<string name="bluetooth_disconnect_a2dp_profile" msgid="8558839213545432142">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> se desconectará del audio de medios."</string>
<!-- XL -->
<string name="bluetooth_disconnect_headset_profile" msgid="7632141632739822572">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> se desconectará del audio de manos libre."</string>
@@ -460,6 +480,8 @@
<!-- XL -->
<string name="bluetooth_pan_profile_summary_use_for" msgid="7152329494274254683">"Utilizar para acceso a Internet"</string>
<!-- XL -->
+ <string name="screen_timeout_summary" msgid="8423734042860540453">"La pantalla se apaga automáticamente después de <xliff:g id="TIMEOUT_DESCRIPTION">%1$s</xliff:g>"</string>
+ <!-- XL -->
<string name="memory_calculating_size" msgid="4994844259856032553">"Calculando…"</string>
<!-- XL -->
<string name="current_input_method" msgid="1106006204280275670">"Método de entrada actual"</string>
diff --git a/res/values-xlarge/styles.xml b/res/values-xlarge/styles.xml
index 5e3fead..9b125ad 100644
--- a/res/values-xlarge/styles.xml
+++ b/res/values-xlarge/styles.xml
@@ -50,4 +50,11 @@
<item name="android:orientation">vertical</item>
</style>
-</resources>
\ No newline at end of file
+ <style name="setup_wizard_button">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:minWidth">208dip</item>
+ <item name="android:layout_height">48dip</item>
+ <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
+ </style>
+
+</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 30f7b20..5699db4 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -512,6 +512,8 @@
<!-- Date and time settings --><skip />
<!-- Main Settings screen setting option name to go into the date and time settings-->
<string name="date_and_time_settings_title">Date & time</string>
+ <!-- Title for Date & Time settings screen in SetupWizard [CHAR LIMIT=40] -->
+ <string name="date_and_time_settings_title_setup_wizard">Set Date and time</string>
<!-- Main Settings screen setting option summary text for the item to go into the date and time settings. -->
<string name="date_and_time_settings_summary">Set date, time, time zone & formats</string>
<!-- Date & time setting screen setting check box title if the date and time should be determined automatically [CHAR LIMIT=25] -->
@@ -946,10 +948,14 @@
<string name="wifi_network_setup">Network Setup</string>
<!-- Label for the text view for WPS pin input [CHAR LIMIT=50] -->
<string name="wifi_wps_pin">Enter pin from access point</string>
- <!-- Title for the WPS pin display dialog [CHAR LIMIT=50] -->
- <string name="wifi_wps_pin_method_configuration">WPS pin method configuration</string>
- <!-- Text displayed in the WPS pin display dialog [CHAR LIMIT=50] -->
+ <!-- Title for the WPS setup dialog [CHAR LIMIT=50] -->
+ <string name="wifi_wps_setup_title">WPS Setup</string>
+ <!-- Text displayed in the WPS pin display dialog [CHAR LIMIT=75] -->
<string name="wifi_wps_pin_output">Enter the pin <xliff:g id="wps_pin">%1$s</xliff:g> on the access point</string>
+ <!-- Text displayed when WPS setup is in progress [CHAR LIMIT=75] -->
+ <string name="wifi_wps_in_progress">WPS is already in progress and can take tens of seconds to complete</string>
+ <!-- Text displayed when WPS fails to start [CHAR LIMIT=75] -->
+ <string name="wifi_wps_failed">Failed to start WPS, please try again</string>
<!-- Label for the SSID of the network -->
<string name="wifi_ssid">Network SSID</string>
<!-- Label for the security of the connection -->
@@ -1007,6 +1013,10 @@
<!-- Button label to dismiss the dialog -->
<string name="wifi_cancel">Cancel</string>
+ <!-- Errors reported on wifi settings page -->
+ <!-- Toast message indicating WPS overlap detection [CHAR LIMIT=75] -->
+ <string name="wifi_wps_overlap_error">Another WPS session detected, please retry in a few minutes</string>
+
<!-- Wi-Fi Advanced Settings --> <skip />
<!-- Wi-Fi settings screen, advanced, settings section. This is a header shown above advanced wifi settings. -->
<string name="wifi_advanced_titlebar">Advanced</string>
@@ -1959,6 +1969,10 @@
<string name="application_size_label">Application</string>
<!-- Manage applications, individual application info screen, label under Storage heading. The amount of sapce taken up by the app's data (for example, downloaded emails or something like that) -->
<string name="data_size_label">Data</string>
+ <!-- Manage applications, individual application info screen, label under Storage heading. The amount of space taken up by the app's data on USB storage [CHARSIZE=40] -->
+ <string name="external_size_label" product="nosdcard">USB storage</string>
+ <!-- Manage applications, individual application info screen, label under Storage heading. The amount of space taken up by the app's data on the SD card [CHARSIZE=40] -->
+ <string name="external_size_label" product="default">SD card</string>
<!-- Manage applications, individual application info screen, button label under Storage heading. Button to remove the application from the system. -->
<string name="uninstall_text">Uninstall</string>
<!-- [CHAR LIMIT=25] Manage applications, individual application info screen, button label under Storage heading. Button to disable an existing application. -->
@@ -2185,9 +2199,9 @@
<string name="auto_replace">Auto-replace</string>
<!-- On Text & language settings screen, setting summary. This is the summary for the "Auto-replace" setting. -->
<string name="auto_replace_summary">Correct mistyped words</string>
- <!-- On Text & language settings screen, setting option name. title of the setting to enable autocapitalization of entered text. for example, after the user finishes a sentence, the next letter he types will automatically be capitalizated. -->
+ <!-- On Text & language settings screen, setting option name. title of the setting to enable autocapitalization of entered text. for example, after the user finishes a sentence, the next letter he types will automatically be capitalizated. [CHAR LIMIT=25] -->
<string name="auto_caps">Auto-capitalization</string>
- <!-- On Text & language settings screen, setting summary. Summary for the Auto-cap setting. -->
+ <!-- On Text & language settings screen, setting summary. Summary for the Auto-cap setting. [CHAR LIMIT=100]-->
<string name="auto_caps_summary">Capitalize first letter in sentences</string>
<!-- On Text & language settings screen, setting option name. title of the setting to enable automatic punctuation of entered text. for example, it will change an entered "youre" to "you're". -->
<string name="auto_punctuate">Auto-punctuate</string>
@@ -2948,8 +2962,27 @@
<string name="sound_category_feedback_title">Feedback</string>
<!-- Wifi Setup For Setup Wizard with XL screen -->
- <!-- Title shown in Wifi Setup For Setup Wizard with XL screen -->
+ <!-- Title shown in Wifi Setup Wizard with XL screen -->
<string name="wifi_setup_title">Wi-Fi setup</string>
+ <!-- Title shown in Wifi Setup Wizard with XL screen when
+ a user is configuring password for a network.
+ The argument should be the name of the network.
+ [CHAR LIMIT=50] -->
+ <string name="wifi_setup_title_editing_network">Connect to Wi-Fi network <xliff:g id="network_name" example="Happy Mobile">%s</xliff:g></string>
+ <!-- Title shown in Wifi Setup For Setup Wizard with XL screen when
+ the device is connecting a network the user specified.
+ The argument should be the name of the network.
+ [CHAR LIMIT=50] -->
+ <string name="wifi_setup_title_connecting_network">Connecting to Wi-Fi network <xliff:g id="network_name" example="Happy Mobile">%s</xliff:g>...</string>
+ <!-- Title shown in Wifi Setup For Setup Wizard with XL screen when
+ the device successfully connected to a network the user specified.
+ The argument should be the name of the network.
+ [CHAR LIMIT=50] -->
+ <string name="wifi_setup_title_connected_network">Connected to Wi-Fi network <xliff:g id="network_name" example="Happy Mobile">%s</xliff:g></string>
+ <!-- Title shown in Wifi Setup For Setup Wizard with XL screen when
+ a user is adding a network.
+ [CHAR LIMIT=50] -->
+ <string name="wifi_setup_title_add_network">Add a network</string>
<!-- Text message shown when Wifi is not connected.
Used in Wifi Setup For Setup Wizard with XL screen. -->
<string name="wifi_setup_not_connected">Not connected</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 969742f..c361fa9 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -109,4 +109,9 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:orientation">vertical</item>
</style>
+
+ <style name="setup_wizard_button">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ </style>
</resources>
diff --git a/res/xml/hard_keyboard_settings.xml b/res/xml/hard_keyboard_settings.xml
new file mode 100644
index 0000000..d09522e
--- /dev/null
+++ b/res/xml/hard_keyboard_settings.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <PreferenceCategory
+ android:key="hard_keyboard"
+ android:title="@string/builtin_keyboard_settings_title"
+ android:persistent="false">
+
+ <CheckBoxPreference
+ android:key="auto_replace"
+ android:title="@string/auto_replace"
+ android:summaryOn="@string/auto_replace_summary"
+ android:summaryOff="@string/auto_replace_summary"
+ android:persistent="false"/>
+ <CheckBoxPreference
+ android:key="auto_caps"
+ android:title="@string/auto_caps"
+ android:summaryOn="@string/auto_caps_summary"
+ android:summaryOff="@string/auto_caps_summary"
+ android:persistent="false"/>
+ <CheckBoxPreference
+ android:key="auto_punctuate"
+ android:title="@string/auto_punctuate"
+ android:summaryOn="@string/auto_punctuate_summary"
+ android:summaryOff="@string/auto_punctuate_summary"
+ android:persistent="false"/>
+ </PreferenceCategory>
+</PreferenceScreen>
diff --git a/res/xml/keyboard_settings.xml b/res/xml/keyboard_settings.xml
deleted file mode 100644
index 85d90ab..0000000
--- a/res/xml/keyboard_settings.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
-
- <CheckBoxPreference
- android:key="auto_replace"
- android:title="@string/auto_replace"
- android:summaryOn="@string/auto_replace_summary"
- android:summaryOff="@string/auto_replace_summary"
- android:persistent="false"/>
- <CheckBoxPreference
- android:key="auto_caps"
- android:title="@string/auto_caps"
- android:summaryOn="@string/auto_caps_summary"
- android:summaryOff="@string/auto_caps_summary"
- android:persistent="false"/>
- <CheckBoxPreference
- android:key="auto_punctuate"
- android:title="@string/auto_punctuate"
- android:summaryOn="@string/auto_punctuate_summary"
- android:summaryOff="@string/auto_punctuate_summary"
- android:persistent="false"/>
-
-</PreferenceScreen>
diff --git a/src/com/android/settings/ButtonBarHandler.java b/src/com/android/settings/ButtonBarHandler.java
new file mode 100644
index 0000000..d61da13
--- /dev/null
+++ b/src/com/android/settings/ButtonBarHandler.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.settings;
+
+import android.widget.Button;
+
+/**
+ * Interface letting {@link SettingsPreferenceFragment} access to bottom bar inside
+ * {@link android.preference.PreferenceActivity}.
+ */
+public interface ButtonBarHandler {
+ public boolean hasNextButton();
+ public Button getNextButton();
+}
\ No newline at end of file
diff --git a/src/com/android/settings/ChooseLockPassword.java b/src/com/android/settings/ChooseLockPassword.java
index 1bebebb..018dfd2 100644
--- a/src/com/android/settings/ChooseLockPassword.java
+++ b/src/com/android/settings/ChooseLockPassword.java
@@ -197,7 +197,7 @@
int currentType = mPasswordEntry.getInputType();
mPasswordEntry.setInputType(mIsAlphaMode ? currentType
- : (currentType | InputType.TYPE_CLASS_NUMBER));
+ : (InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD));
Intent intent = getActivity().getIntent();
final boolean confirmCredentials = intent.getBooleanExtra("confirm_credentials", true);
diff --git a/src/com/android/settings/DateTimeSettingsSetupWizard.java b/src/com/android/settings/DateTimeSettingsSetupWizard.java
index 7fd7ef7..6964175 100644
--- a/src/com/android/settings/DateTimeSettingsSetupWizard.java
+++ b/src/com/android/settings/DateTimeSettingsSetupWizard.java
@@ -49,7 +49,7 @@
// force the first status of auto datetime flag.
private static final String EXTRA_INITIAL_AUTO_DATETIME_VALUE =
- "extra_initial_auto_datetime_value";
+ "extra_initial_auto_datetime_value";
private boolean mXLargeScreenSize;
@@ -126,7 +126,10 @@
mInputMethodManager = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
((Button)findViewById(R.id.next_button)).setOnClickListener(this);
- ((Button)findViewById(R.id.skip_button)).setOnClickListener(this);
+ final Button skipButton = (Button)findViewById(R.id.skip_button);
+ if (skipButton != null) {
+ skipButton.setOnClickListener(this);
+ }
}
@Override
diff --git a/src/com/android/settings/PhysicalKeyboardSettings.java b/src/com/android/settings/PhysicalKeyboardSettings.java
deleted file mode 100644
index b959183..0000000
--- a/src/com/android/settings/PhysicalKeyboardSettings.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings;
-
-import android.content.ContentResolver;
-import android.os.Bundle;
-import android.preference.CheckBoxPreference;
-import android.preference.Preference;
-import android.preference.PreferenceScreen;
-import android.provider.Settings.System;
-
-public class PhysicalKeyboardSettings extends SettingsPreferenceFragment {
-
- private final String[] mSettingsUiKey = {
- "auto_caps",
- "auto_replace",
- "auto_punctuate",
- };
-
- // Note: Order of this array should correspond to the order of the above array
- private final String[] mSettingsSystemId = {
- System.TEXT_AUTO_CAPS,
- System.TEXT_AUTO_REPLACE,
- System.TEXT_AUTO_PUNCTUATE,
- };
-
- // Note: Order of this array should correspond to the order of the above array
- private final int[] mSettingsDefault = {
- 1,
- 1,
- 1,
- };
-
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
-
- addPreferencesFromResource(R.xml.keyboard_settings);
- }
-
- @Override
- public void onResume() {
- super.onResume();
- ContentResolver resolver = getContentResolver();
- for (int i = 0; i < mSettingsUiKey.length; i++) {
- CheckBoxPreference pref = (CheckBoxPreference) findPreference(mSettingsUiKey[i]);
- pref.setChecked(System.getInt(resolver, mSettingsSystemId[i],
- mSettingsDefault[i]) > 0);
- }
- }
-
-
- @Override
- public boolean onPreferenceTreeClick(
- PreferenceScreen preferenceScreen, Preference preference) {
-
- // Physical keyboard stuff
- for (int i = 0; i < mSettingsUiKey.length; i++) {
- if (mSettingsUiKey[i].equals(preference.getKey())) {
- System.putInt(getContentResolver(), mSettingsSystemId[i],
- ((CheckBoxPreference)preference).isChecked()? 1 : 0);
- return true;
- }
- }
-
- return super.onPreferenceTreeClick(preferenceScreen, preference);
- }
-
-}
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 613b082..11d8c57 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -34,7 +34,7 @@
/**
* Top-level settings activity to handle single pane and double pane UI layout.
*/
-public class Settings extends PreferenceActivity {
+public class Settings extends PreferenceActivity implements ButtonBarHandler {
private static final String META_DATA_KEY_HEADER_ID =
"com.android.settings.TOP_LEVEL_HEADER_ID";
diff --git a/src/com/android/settings/SettingsPreferenceFragment.java b/src/com/android/settings/SettingsPreferenceFragment.java
index 0db4f8b..47e31ee 100644
--- a/src/com/android/settings/SettingsPreferenceFragment.java
+++ b/src/com/android/settings/SettingsPreferenceFragment.java
@@ -158,11 +158,11 @@
}
protected boolean hasNextButton() {
- return ((Settings)getActivity()).hasNextButton();
+ return ((ButtonBarHandler)getActivity()).hasNextButton();
}
protected Button getNextButton() {
- return ((Settings)getActivity()).getNextButton();
+ return ((ButtonBarHandler)getActivity()).getNextButton();
}
public void finish() {
diff --git a/src/com/android/settings/accounts/AccountSyncSettings.java b/src/com/android/settings/accounts/AccountSyncSettings.java
index 298f1b6..aef8b8a 100644
--- a/src/com/android/settings/accounts/AccountSyncSettings.java
+++ b/src/com/android/settings/accounts/AccountSyncSettings.java
@@ -55,6 +55,7 @@
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -212,7 +213,6 @@
String title = getString(R.string.sync_item_title, providerLabel);
item.setTitle(title);
item.setKey(authority);
- getPreferenceScreen().addPreference(item);
mCheckBoxes.add(item);
}
@@ -472,6 +472,11 @@
}
}
}
+
+ Collections.sort(mCheckBoxes);
+ for (int i = 0, n = mCheckBoxes.size(); i < n; i++) {
+ getPreferenceScreen().addPreference(mCheckBoxes.get(i));
+ }
}
/**
diff --git a/src/com/android/settings/applications/ApplicationsState.java b/src/com/android/settings/applications/ApplicationsState.java
index 6e9f2a2..6de8c7f 100644
--- a/src/com/android/settings/applications/ApplicationsState.java
+++ b/src/com/android/settings/applications/ApplicationsState.java
@@ -71,6 +71,7 @@
long cacheSize;
long codeSize;
long dataSize;
+ long externalSize;
}
public static class AppEntry extends SizeInfo {
@@ -626,9 +627,16 @@
// --------------------------------------------------------------
- private long getTotalSize(PackageStats ps) {
+ private long getTotalInternalSize(PackageStats ps) {
if (ps != null) {
- return ps.codeSize+ps.dataSize;
+ return ps.codeSize + ps.dataSize;
+ }
+ return SIZE_INVALID;
+ }
+
+ private long getTotalExternalSize(PackageStats ps) {
+ if (ps != null) {
+ return ps.externalDataSize + ps.externalMediaSize + ps.externalCacheSize;
}
return SIZE_INVALID;
}
@@ -660,15 +668,18 @@
synchronized (entry) {
entry.sizeStale = false;
entry.sizeLoadStart = 0;
- long newSize = getTotalSize(stats);
+ long externalSize = getTotalExternalSize(stats);
+ long newSize = externalSize + getTotalInternalSize(stats);
if (entry.size != newSize ||
entry.cacheSize != stats.cacheSize ||
entry.codeSize != stats.codeSize ||
- entry.dataSize != stats.dataSize) {
+ entry.dataSize != stats.dataSize ||
+ entry.externalSize != externalSize) {
entry.size = newSize;
entry.cacheSize = stats.cacheSize;
entry.codeSize = stats.codeSize;
entry.dataSize = stats.dataSize;
+ entry.externalSize = externalSize;
entry.sizeStr = getSizeStr(entry.size);
if (DEBUG) Log.i(TAG, "Set size of " + entry.label + " " + entry
+ ": " + entry.sizeStr);
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java
index de897eb..06d97fc 100644
--- a/src/com/android/settings/applications/InstalledAppDetails.java
+++ b/src/com/android/settings/applications/InstalledAppDetails.java
@@ -93,6 +93,7 @@
private TextView mTotalSize;
private TextView mAppSize;
private TextView mDataSize;
+ private TextView mExternalSize;
private ClearUserDataObserver mClearDataObserver;
// Views related to cache info
private TextView mCacheSize;
@@ -107,6 +108,7 @@
private boolean mHaveSizes = false;
private long mLastCodeSize = -1;
private long mLastDataSize = -1;
+ private long mLastExternalSize = -1;
private long mLastCacheSize = -1;
private long mLastTotalSize = -1;
@@ -317,6 +319,7 @@
mTotalSize = (TextView)view.findViewById(R.id.total_size_text);
mAppSize = (TextView)view.findViewById(R.id.application_size_text);
mDataSize = (TextView)view.findViewById(R.id.data_size_text);
+ mExternalSize = (TextView)view.findViewById(R.id.external_size_text);
// Get Control button panel
View btnPanel = view.findViewById(R.id.control_buttons_panel);
@@ -504,6 +507,10 @@
mLastDataSize = mAppEntry.dataSize;
mDataSize.setText(getSizeStr(mAppEntry.dataSize));
}
+ if (mLastExternalSize != mAppEntry.externalSize) {
+ mLastExternalSize = mAppEntry.externalSize;
+ mExternalSize.setText(getSizeStr(mAppEntry.externalSize));
+ }
if (mLastCacheSize != mAppEntry.cacheSize) {
mLastCacheSize = mAppEntry.cacheSize;
mCacheSize.setText(getSizeStr(mAppEntry.cacheSize));
diff --git a/src/com/android/settings/deviceinfo/MemoryMeasurement.java b/src/com/android/settings/deviceinfo/MemoryMeasurement.java
index ead9dd6..19bd784 100644
--- a/src/com/android/settings/deviceinfo/MemoryMeasurement.java
+++ b/src/com/android/settings/deviceinfo/MemoryMeasurement.java
@@ -180,8 +180,6 @@
public static final int MSG_INVALIDATE = 6;
- private List<String> mPendingApps = new ArrayList<String>();
-
private Object mLock = new Object();
private IMediaContainerService mDefaultContainer;
@@ -190,7 +188,7 @@
private volatile boolean mMeasured = false;
- private long mAppsSize = 0;
+ private StatsObserver mStatsObserver;
private final WeakReference<Context> mContext;
@@ -287,39 +285,49 @@
sendEmptyMessage(MSG_DISCONNECT);
}
- public void queuePackageMeasurementLocked(String packageName) {
- mPendingApps.add(packageName);
- }
-
/**
* Request measurement of each package.
*
* @param pm PackageManager instance to query
*/
public void requestQueuedMeasurementsLocked(PackageManager pm) {
- final int N = mPendingApps.size();
+ final List<String> appsList = mStatsObserver.getAppsList();
+ final int N = appsList.size();
for (int i = 0; i < N; i++) {
- pm.getPackageSizeInfo(mPendingApps.get(i), mStatsObserver);
+ pm.getPackageSizeInfo(appsList.get(i), mStatsObserver);
}
}
- final IPackageStatsObserver.Stub mStatsObserver = new IPackageStatsObserver.Stub() {
+ private class StatsObserver extends IPackageStatsObserver.Stub {
+ private long mAppsSizeForThisStatsObserver = 0;
+ private final List<String> mAppsList = new ArrayList<String>();
public void onGetStatsCompleted(PackageStats stats, boolean succeeded) {
+ if (!mStatsObserver.equals(this)) {
+ // this callback's class object is no longer in use. ignore this callback.
+ return;
+ }
if (succeeded) {
- mAppsSize += stats.codeSize + stats.dataSize;
+ mAppsSizeForThisStatsObserver += stats.codeSize + stats.dataSize;
}
- synchronized (mPendingApps) {
- mPendingApps.remove(stats.packageName);
+ synchronized (mAppsList) {
+ mAppsList.remove(stats.packageName);
- if (mPendingApps.size() == 0) {
- mInternalAppsSize = mAppsSize;
+ if (mAppsList.size() == 0) {
+ mInternalAppsSize = mAppsSizeForThisStatsObserver;
onInternalMeasurementComplete();
}
}
}
- };
+
+ public void queuePackageMeasurementLocked(String packageName) {
+ mAppsList.add(packageName);
+ }
+ public List<String> getAppsList() {
+ return mAppsList;
+ }
+ }
private void onInternalMeasurementComplete() {
sendEmptyMessage(MSG_COMPLETED);
@@ -368,10 +376,12 @@
.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES
| PackageManager.GET_DISABLED_COMPONENTS);
if (apps != null) {
- synchronized (mPendingApps) {
+ // initiate measurement of all package sizes. need new StatsObserver object.
+ mStatsObserver = new StatsObserver();
+ synchronized (mStatsObserver.mAppsList) {
for (int i = 0; i < apps.size(); i++) {
final ApplicationInfo info = apps.get(i);
- queuePackageMeasurementLocked(info.packageName);
+ mStatsObserver.queuePackageMeasurementLocked(info.packageName);
}
requestQueuedMeasurementsLocked(pm);
diff --git a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java
index 117bec5..a4808b0 100644
--- a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java
+++ b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java
@@ -21,29 +21,15 @@
import com.android.settings.Utils;
import com.android.settings.VoiceInputOutputSettings;
-import android.app.AlertDialog;
import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.os.Bundle;
-import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
-import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
import android.provider.Settings;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodManager;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
implements Preference.OnPreferenceChangeListener{
diff --git a/src/com/android/settings/inputmethod/InputMethodAndSubtypeUtil.java b/src/com/android/settings/inputmethod/InputMethodAndSubtypeUtil.java
index 6981927..03c5ea1 100644
--- a/src/com/android/settings/inputmethod/InputMethodAndSubtypeUtil.java
+++ b/src/com/android/settings/inputmethod/InputMethodAndSubtypeUtil.java
@@ -204,6 +204,7 @@
if (DEBUG) {
Log.d(TAG, "Current IME was uninstalled or disabled.");
}
+ currentInputMethodId = null;
}
}
// If it's a disabled system ime, add it to the disabled list so that it
diff --git a/src/com/android/settings/inputmethod/InputMethodConfig.java b/src/com/android/settings/inputmethod/InputMethodConfig.java
index 4702b08..2c336db 100644
--- a/src/com/android/settings/inputmethod/InputMethodConfig.java
+++ b/src/com/android/settings/inputmethod/InputMethodConfig.java
@@ -20,6 +20,7 @@
import com.android.settings.SettingsPreferenceFragment;
import android.app.AlertDialog;
+import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
@@ -31,6 +32,7 @@
import android.preference.PreferenceCategory;
import android.preference.PreferenceScreen;
import android.provider.Settings;
+import android.provider.Settings.System;
import android.text.TextUtils;
import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodManager;
@@ -42,12 +44,17 @@
public class InputMethodConfig extends SettingsPreferenceFragment {
- private static final String KEY_PHYSICALKEYBOARD_CATEGORY = "hardkeyboard_category";
- private static final String PHYSICALKEYBOARD_SETTINGS_FRAGMENT
- = "com.android.settings.PhysicalKeyboardSettings";
+ private static final String[] sSystemSettingNames = {
+ System.TEXT_AUTO_REPLACE, System.TEXT_AUTO_CAPS, System.TEXT_AUTO_PUNCTUATE,
+ };
+
+ private static final String[] sHardKeyboardKeys = {
+ "auto_replace", "auto_caps", "auto_punctuate",
+ };
private AlertDialog mDialog = null;
private boolean mHaveHardKeyboard;
+ private PreferenceCategory mHardKeyboardCategory;
// Map of imi and its preferences
final private HashMap<String, List<Preference>> mInputMethodPrefsMap =
new HashMap<String, List<Preference>>();
@@ -72,8 +79,18 @@
@Override
public void onResume() {
super.onResume();
+
+ ContentResolver resolver = getContentResolver();
+ if (mHaveHardKeyboard) {
+ for (int i = 0; i < sHardKeyboardKeys.length; ++i) {
+ CheckBoxPreference chkPref = (CheckBoxPreference)
+ mHardKeyboardCategory.findPreference(sHardKeyboardKeys[i]);
+ chkPref.setChecked(System.getInt(resolver, sSystemSettingNames[i], 1) > 0);
+ }
+ }
+
InputMethodAndSubtypeUtil.loadInputMethodSubtypeList(
- this, getContentResolver(), mInputMethodProperties, mInputMethodPrefsMap);
+ this, resolver, mInputMethodProperties, mInputMethodPrefsMap);
updateActiveInputMethodsSummary();
}
@@ -133,6 +150,17 @@
if (preference instanceof CheckBoxPreference) {
final CheckBoxPreference chkPref = (CheckBoxPreference) preference;
+
+ if (mHaveHardKeyboard) {
+ for (int i = 0; i < sHardKeyboardKeys.length; ++i) {
+ if (chkPref == mHardKeyboardCategory.findPreference(sHardKeyboardKeys[i])) {
+ System.putInt(getContentResolver(), sSystemSettingNames[i],
+ chkPref.isChecked() ? 1 : 0);
+ return true;
+ }
+ }
+ }
+
final String imiId = chkPref.getKey();
if (chkPref.isChecked()) {
InputMethodInfo selImi = getInputMethodInfoFromImiId(imiId);
@@ -164,17 +192,6 @@
}
}
- private void addHardKeyboardPreference(PreferenceScreen root) {
- PreferenceCategory keyboardSettingsCategory = new PreferenceCategory(getActivity());
- keyboardSettingsCategory.setTitle(R.string.builtin_keyboard_settings_title);
- root.addPreference(keyboardSettingsCategory);
- PreferenceScreen prefScreen = new PreferenceScreen(getActivity(), null);
- prefScreen.setKey(KEY_PHYSICALKEYBOARD_CATEGORY);
- prefScreen.setTitle(R.string.builtin_keyboard_settings_title);
- prefScreen.setSummary(R.string.builtin_keyboard_settings_summary);
- prefScreen.setFragment(PHYSICALKEYBOARD_SETTINGS_FRAGMENT);
- }
-
private void addInputMethodPreference(PreferenceScreen root, InputMethodInfo imi,
final int imiSize) {
PreferenceCategory keyboardSettingsCategory = new PreferenceCategory(getActivity());
@@ -227,10 +244,13 @@
}
private PreferenceScreen createPreferenceHierarchy() {
- // Root
- PreferenceScreen root = getPreferenceManager().createPreferenceScreen(getActivity());
+ addPreferencesFromResource(R.xml.hard_keyboard_settings);
+ PreferenceScreen root = getPreferenceScreen();
+
if (mHaveHardKeyboard) {
- addHardKeyboardPreference(root);
+ mHardKeyboardCategory = (PreferenceCategory) findPreference("hard_keyboard");
+ } else {
+ root.removeAll();
}
final int N = (mInputMethodProperties == null ? 0 : mInputMethodProperties.size());
diff --git a/src/com/android/settings/wifi/WifiConfigUiBase.java b/src/com/android/settings/wifi/WifiConfigUiBase.java
index d930b58..11dcc00 100644
--- a/src/com/android/settings/wifi/WifiConfigUiBase.java
+++ b/src/com/android/settings/wifi/WifiConfigUiBase.java
@@ -22,7 +22,7 @@
/**
* Foundation interface glues between Activities and UIs like
- * {@link WifiDialog} or {@link WifiConfigPreference}.
+ * {@link WifiDialog} or {@link WifiConfigUiForSetupWizardXL}.
*/
public interface WifiConfigUiBase {
public Context getContext();
diff --git a/src/com/android/settings/wifi/WifiConfigUiForSetupWizardXL.java b/src/com/android/settings/wifi/WifiConfigUiForSetupWizardXL.java
index bbd8f80..bffcc61 100644
--- a/src/com/android/settings/wifi/WifiConfigUiForSetupWizardXL.java
+++ b/src/com/android/settings/wifi/WifiConfigUiForSetupWizardXL.java
@@ -18,7 +18,6 @@
import com.android.settings.R;
-import android.app.Activity;
import android.content.Context;
import android.os.Handler;
import android.util.Log;
@@ -38,16 +37,17 @@
private static final String TAG = "SetupWizard";
private Button mConnectButton;
- private Button mForgetButton;
private Button mCancelButton;
- private final Activity mActivity;
+ private final WifiSettingsForSetupWizardXL mActivity;
private View mView;
private WifiConfigController mController;
private AccessPoint mAccessPoint;
private boolean mEdit;
private Handler mHandler = new Handler();
+ private final InputMethodManager mInputMethodManager;
+
private LayoutInflater mInflater;
/**
@@ -58,10 +58,10 @@
* @param edit
*/
public WifiConfigUiForSetupWizardXL(
- Activity activity, ViewGroup parent, AccessPoint accessPoint, boolean edit) {
+ WifiSettingsForSetupWizardXL activity, ViewGroup parent,
+ AccessPoint accessPoint, boolean edit) {
mActivity = activity;
mConnectButton = (Button)activity.findViewById(R.id.wifi_setup_connect);
- mForgetButton = (Button)activity.findViewById(R.id.wifi_setup_forget);
mCancelButton = (Button)activity.findViewById(R.id.wifi_setup_cancel);
mAccessPoint = accessPoint;
mEdit = edit;
@@ -70,12 +70,14 @@
mView = mInflater.inflate(R.layout.wifi_config_ui_for_setup_wizard, parent, true);
mController = new WifiConfigController(this, mView, mAccessPoint, edit);
- // Assumes R.id.password is inside security_fields.
- // TODO: confirm it is ok to assume R.id.password is the only EditText to be focused, and
- // R.id.security_fields is the only parent for possible EditTexts. Possibly we need to
- // check parentand detect visibility manually.
+ mInputMethodManager = (InputMethodManager)
+ activity.getSystemService(Context.INPUT_METHOD_SERVICE);
+
if (mView.findViewById(R.id.security_fields).getVisibility() == View.VISIBLE) {
requestFocusAndShowKeyboard(R.id.password);
+ } else if (mView.findViewById(R.id.type).getVisibility() == View.VISIBLE) {
+ // Add Network flow.
+ requestFocusAndShowKeyboard(R.id.ssid);
}
}
@@ -90,13 +92,17 @@
} else if (!(viewToBeFocused instanceof EditText)) {
Log.w(TAG, "password field is not EditText");
} else {
- // After acquiring the focus, we show software keyboard.
- viewToBeFocused.setOnFocusChangeListener(this);
- final boolean requestFocusResult = viewToBeFocused.requestFocus();
- Log.i(TAG, String.format("Focus request %s.",
- (requestFocusResult ? "successful" : "failed")));
- if (!requestFocusResult) {
- viewToBeFocused.setOnFocusChangeListener(null);
+ if (viewToBeFocused.isFocused()) {
+ mInputMethodManager.showSoftInput(viewToBeFocused, 0);
+ } else {
+ // After acquiring the focus, we show software keyboard.
+ viewToBeFocused.setOnFocusChangeListener(this);
+ final boolean requestFocusResult = viewToBeFocused.requestFocus();
+ Log.i(TAG, String.format("Focus request %s.",
+ (requestFocusResult ? "successful" : "failed")));
+ if (!requestFocusResult) {
+ viewToBeFocused.setOnFocusChangeListener(null);
+ }
}
}
}
@@ -131,7 +137,7 @@
@Override
public Button getForgetButton() {
- return mForgetButton;
+ return null;
}
@Override
@@ -143,16 +149,11 @@
public void setSubmitButton(CharSequence text) {
mConnectButton.setVisibility(View.VISIBLE);
mConnectButton.setText(text);
-
- // test
- mForgetButton.setVisibility(View.GONE);
}
@Override
public void setForgetButton(CharSequence text) {
// In XL setup screen, we won't show Forget button for simplifying the UI.
- // mForgetButton.setVisibility(View.VISIBLE);
- // mForgetButton.setText(text);
}
@Override
@@ -177,12 +178,9 @@
Log.d(TAG, "Ignoring setTitle");
}
- private static class FocusRunnable implements Runnable {
- final InputMethodManager mInputMethodManager;
+ private class FocusRunnable implements Runnable {
final View mViewToBeFocused;
- public FocusRunnable(Context context, View viewToBeFocused) {
- mInputMethodManager = (InputMethodManager)
- context.getSystemService(Context.INPUT_METHOD_SERVICE);
+ public FocusRunnable(View viewToBeFocused) {
mViewToBeFocused = viewToBeFocused;
}
@@ -191,7 +189,9 @@
// mInputMethodManager.focusIn(mViewToBeFocused);
final boolean showSoftInputResult =
mInputMethodManager.showSoftInput(mViewToBeFocused, 0);
- if (!showSoftInputResult) {
+ if (showSoftInputResult) {
+ mActivity.setPaddingVisibility(View.GONE);
+ } else {
Log.w(TAG, "Failed to show software keyboard ");
}
}
@@ -201,7 +201,7 @@
public void onFocusChange(View view, boolean hasFocus) {
view.setOnFocusChangeListener(null);
if (hasFocus) {
- mHandler.post(new FocusRunnable(mActivity, view));
+ mHandler.post(new FocusRunnable(view));
}
}
}
\ No newline at end of file
diff --git a/src/com/android/settings/wifi/WifiPickerActivity.java b/src/com/android/settings/wifi/WifiPickerActivity.java
new file mode 100644
index 0000000..7b972fc
--- /dev/null
+++ b/src/com/android/settings/wifi/WifiPickerActivity.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.settings.wifi;
+
+import com.android.settings.ButtonBarHandler;
+
+import android.content.Intent;
+import android.preference.PreferenceActivity;
+import android.widget.Button;
+
+public class WifiPickerActivity extends PreferenceActivity implements ButtonBarHandler {
+ @Override
+ public Intent getIntent() {
+ Intent modIntent = new Intent(super.getIntent());
+ modIntent.putExtra(EXTRA_SHOW_FRAGMENT, WifiSettings.class.getName());
+ modIntent.putExtra(EXTRA_NO_HEADERS, true);
+ return modIntent;
+ }
+
+ @Override
+ public boolean hasNextButton() {
+ // PreferenceActivity#hasNextButton() is protected, so we need to expose it here.
+ return super.hasNextButton();
+ }
+
+ @Override
+ public Button getNextButton() {
+ // PreferenceActivity#getNextButton() is protected, so we need to expose it here.
+ return super.getNextButton();
+ }
+}
\ No newline at end of file
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index 857e153..ccc40fb 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -37,7 +37,9 @@
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
+import android.net.wifi.WpsResult;
import android.net.wifi.WifiConfiguration.KeyMgmt;
+import android.net.wifi.WpsConfiguration;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
@@ -126,11 +128,12 @@
mFilter.addAction(WifiManager.LINK_CONFIGURATION_CHANGED_ACTION);
mFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
mFilter.addAction(WifiManager.RSSI_CHANGED_ACTION);
+ mFilter.addAction(WifiManager.ERROR_ACTION);
mReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
- handleEvent(intent);
+ handleEvent(context, intent);
}
};
@@ -270,7 +273,9 @@
@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo info) {
- if (info instanceof AdapterContextMenuInfo) {
+ if (mInXlSetupWizard) {
+ ((WifiSettingsForSetupWizardXL)getActivity()).onCreateContextMenu(menu, view, info);
+ } else if (info instanceof AdapterContextMenuInfo) {
Preference preference = (Preference) getListView().getItemAtPosition(
((AdapterContextMenuInfo) info).position);
@@ -426,7 +431,7 @@
return accessPoints;
}
- private void handleEvent(Intent intent) {
+ private void handleEvent(Context context, Intent intent) {
String action = intent.getAction();
if (WifiManager.WIFI_STATE_CHANGED_ACTION.equals(action)) {
updateWifiState(intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE,
@@ -458,6 +463,14 @@
updateConnectionState(info.getDetailedState());
} else if (WifiManager.RSSI_CHANGED_ACTION.equals(action)) {
updateConnectionState(null);
+ } else if (WifiManager.ERROR_ACTION.equals(action)) {
+ int errorCode = intent.getIntExtra(WifiManager.EXTRA_ERROR_CODE, 0);
+ switch (errorCode) {
+ case WifiManager.WPS_OVERLAP_ERROR:
+ Toast.makeText(context, R.string.wifi_wps_overlap_error,
+ Toast.LENGTH_SHORT).show();
+ break;
+ }
}
}
@@ -554,7 +567,7 @@
public void onClick(DialogInterface dialogInterface, int button) {
if (mInXlSetupWizard) {
if (button == WifiDialog.BUTTON_FORGET && mSelectedAccessPoint != null) {
- ((WifiSettingsForSetupWizardXL)getActivity()).onForgetButtonPressed();
+ forget();
} else if (button == WifiDialog.BUTTON_SUBMIT) {
((WifiSettingsForSetupWizardXL)getActivity()).onConnectButtonPressed();
}
@@ -569,18 +582,32 @@
}
/* package */ void submit(WifiConfigController configController) {
- switch(configController.chosenNetworkSetupMethod()) {
+ int networkSetup = configController.chosenNetworkSetupMethod();
+ switch(networkSetup) {
case WifiConfigController.WPS_PBC:
case WifiConfigController.WPS_PIN_FROM_ACCESS_POINT:
- mWifiManager.startWps(configController.getWpsConfig());
- break;
case WifiConfigController.WPS_PIN_FROM_DEVICE:
- String pin = mWifiManager.startWps(configController.getWpsConfig());
- new AlertDialog.Builder(getActivity())
- .setTitle(R.string.wifi_wps_pin_method_configuration)
- .setMessage(getResources().getString(R.string.wifi_wps_pin_output, pin))
- .setPositiveButton(android.R.string.ok, null)
- .show();
+ WpsResult result = mWifiManager.startWps(configController.getWpsConfig());
+ AlertDialog.Builder dialog = new AlertDialog.Builder(getActivity())
+ .setTitle(R.string.wifi_wps_setup_title)
+ .setPositiveButton(android.R.string.ok, null);
+ switch (result.status) {
+ case FAILURE:
+ dialog.setMessage(R.string.wifi_wps_failed);
+ dialog.show();
+ break;
+ case IN_PROGRESS:
+ dialog.setMessage(R.string.wifi_wps_in_progress);
+ dialog.show();
+ break;
+ default:
+ if (networkSetup == WifiConfigController.WPS_PIN_FROM_DEVICE) {
+ dialog.setMessage(getResources().getString(R.string.wifi_wps_pin_output,
+ result.pin));
+ dialog.show();
+ }
+ break;
+ }
break;
case WifiConfigController.MANUAL:
final WifiConfiguration config = configController.getConfig();
diff --git a/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java b/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
index f420f34..cb33d3b 100644
--- a/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
+++ b/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
@@ -29,6 +29,8 @@
import android.preference.PreferenceCategory;
import android.text.TextUtils;
import android.util.Log;
+import android.view.ContextMenu;
+import android.view.ContextMenu.ContextMenuInfo;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
@@ -67,16 +69,31 @@
private WifiManager mWifiManager;
- private TextView mProgressText;
+ /**
+ * Used for resizing a padding above title. Hiden when software keyboard is shown.
+ */
+ private View mTopPadding;
+
+ /**
+ * Used for resizing a padding inside Config UI. Hiden when software keyboard is shown.
+ */
+ private View mWifiConfigPadding;
+
+ private TextView mTitleView;
+ /**
+ * The name of a network currently connecting, or trying to connect.
+ * This may be empty ("") at first, and updated when configuration is changed.
+ */
+ private CharSequence mNetworkName = "";
+ private CharSequence mEditingTitle;
+
private ProgressBar mProgressBar;
private WifiSettings mWifiSettings;
- private TextView mStatusText;
private Button mAddNetworkButton;
private Button mRefreshButton;
private Button mSkipOrNextButton;
private Button mConnectButton;
- private Button mForgetButton;
private Button mBackButton;
// true when a user already pressed "Connect" button and waiting for connection.
@@ -128,14 +145,11 @@
}
public void setup() {
- mProgressText = (TextView)findViewById(R.id.scanning_progress_text);
+ mTitleView = (TextView)findViewById(R.id.wifi_setup_title);
mProgressBar = (ProgressBar)findViewById(R.id.scanning_progress_bar);
mProgressBar.setMax(2);
- mStatusText = (TextView)findViewById(R.id.wifi_setup_status);
- mProgressText.setText(Summary.get(this, DetailedState.SCANNING));
mProgressBar.setIndeterminate(true);
- mStatusText.setText(R.string.wifi_setup_status_scanning);
mAddNetworkButton = (Button)findViewById(R.id.wifi_setup_add_network);
mAddNetworkButton.setOnClickListener(this);
@@ -145,11 +159,12 @@
mSkipOrNextButton.setOnClickListener(this);
mConnectButton = (Button)findViewById(R.id.wifi_setup_connect);
mConnectButton.setOnClickListener(this);
- mForgetButton = (Button)findViewById(R.id.wifi_setup_forget);
- mForgetButton.setOnClickListener(this);
mBackButton = (Button)findViewById(R.id.wifi_setup_cancel);
mBackButton.setOnClickListener(this);
+ mTopPadding = findViewById(R.id.top_padding);
+ mWifiConfigPadding = findViewById(R.id.wifi_config_padding);
+
// At first, Wifi module doesn't return SCANNING state (it's too early), so we manually
// show it.
showScanningStatus();
@@ -157,12 +172,13 @@
}
private void restoreFirstButtonVisibilityState() {
+ showDefaultTitle();
mAddNetworkButton.setVisibility(View.VISIBLE);
mRefreshButton.setVisibility(View.VISIBLE);
mSkipOrNextButton.setVisibility(View.VISIBLE);
mConnectButton.setVisibility(View.GONE);
- mForgetButton.setVisibility(View.GONE);
mBackButton.setVisibility(View.GONE);
+ setPaddingVisibility(View.VISIBLE, View.GONE);
}
@Override
@@ -186,9 +202,6 @@
} else if (view == mConnectButton) {
if (DEBUG) Log.d(TAG, "Connect button pressed");
onConnectButtonPressed();
- } else if (view == mForgetButton) {
- if (DEBUG) Log.d(TAG, "Forget button pressed");
- onForgetButtonPressed();
} else if (view == mBackButton) {
if (DEBUG) Log.d(TAG, "Back button pressed");
onBackButtonPressed();
@@ -220,7 +233,6 @@
// no visible network on the list.
if (mWifiSettings.getAccessPointsCount() == 0) {
mProgressBar.setIndeterminate(true);
- mProgressText.setText(Summary.get(this, DetailedState.SCANNING));
} else {
// Users already connected to a network, or see available networks.
mProgressBar.setIndeterminate(false);
@@ -232,15 +244,16 @@
break;
}
case CONNECTED: {
+ hideSoftwareKeyboard();
+
// If the device is already connected to a wifi without users' "Connect" request,
// this can be false here. We want to treat it as "after connect action".
mAfterConnectAction = true;
mProgressBar.setIndeterminate(false);
mProgressBar.setProgress(2);
- mProgressText.setText(Summary.get(this, state));
- mStatusText.setText(R.string.wifi_setup_status_proceed_to_next);
+ showConnectedTitle();
mConnectButton.setVisibility(View.GONE);
mAddNetworkButton.setVisibility(View.GONE);
mRefreshButton.setVisibility(View.GONE);
@@ -248,8 +261,6 @@
mSkipOrNextButton.setVisibility(View.VISIBLE);
mSkipOrNextButton.setEnabled(true);
mHandler.removeCallbacks(mSkipButtonEnabler);
-
- mProgressText.setText(Summary.get(this, state));
break;
}
default: // DISCONNECTED, FAILED
@@ -262,31 +273,52 @@
mProgressBar.setIndeterminate(false);
mProgressBar.setProgress(0);
- mProgressText.setText(stateString);
-
mAddNetworkButton.setEnabled(true);
mRefreshButton.setEnabled(true);
}
private void showConnectingStatus() {
+ // We save this title and show it when authentication failed.
+ mEditingTitle = mTitleView.getText();
+ showConnectingTitle();
mProgressBar.setIndeterminate(false);
mProgressBar.setProgress(1);
- mStatusText.setText(R.string.wifi_setup_status_connecting);
- mProgressText.setText(Summary.get(this, DetailedState.CONNECTING));
+ setPaddingVisibility(View.VISIBLE);
+ }
+
+ private void showDefaultTitle() {
+ mTitleView.setText(getString(R.string.wifi_setup_title));
+ }
+
+ private void showEditingTitle() {
+ if (TextUtils.isEmpty(mNetworkName) && mWifiConfig != null) {
+ mNetworkName = mWifiConfig.getController().getConfig().SSID;
+ }
+ mTitleView.setText(getString(R.string.wifi_setup_title_editing_network, mNetworkName));
+ }
+
+ private void showConnectingTitle() {
+ if (TextUtils.isEmpty(mNetworkName) && mWifiConfig != null) {
+ mNetworkName = mWifiConfig.getController().getConfig().SSID;
+ }
+ mTitleView.setText(getString(R.string.wifi_setup_title_connecting_network, mNetworkName));
+ }
+
+ private void showConnectedTitle() {
+ if (TextUtils.isEmpty(mNetworkName) && mWifiConfig != null) {
+ mNetworkName = mWifiConfig.getController().getConfig().SSID;
+ }
+ mTitleView.setText(getString(R.string.wifi_setup_title_connected_network, mNetworkName));
}
private void showScanningStatus() {
mProgressBar.setIndeterminate(true);
((Button)findViewById(R.id.wifi_setup_add_network)).setEnabled(false);
((Button)findViewById(R.id.wifi_setup_refresh_list)).setEnabled(false);
- mProgressText.setText(Summary.get(this, DetailedState.SCANNING));
- mStatusText.setText(R.string.wifi_setup_status_scanning);
}
private void onAddNetworkButtonPressed() {
- // onConfigUiShown() will be called.
mWifiSettings.onAddNetworkPressed();
-
}
/**
@@ -316,34 +348,41 @@
mWifiConfig = new WifiConfigUiForSetupWizardXL(this, parent, selectedAccessPoint, edit);
final View view = mWifiConfig.getView();
if (selectedAccessPoint != null) {
- view.findViewById(R.id.wifi_general_info).setVisibility(View.VISIBLE);
- ((TextView)view.findViewById(R.id.title)).setText(selectedAccessPoint.getTitle());
- ((TextView)view.findViewById(R.id.summary)).setText(selectedAccessPoint.getSummary());
+ mNetworkName = selectedAccessPoint.getTitle().toString();
+ mTitleView.setText(getString(R.string.wifi_setup_title_editing_network, mNetworkName));
} else {
+ mNetworkName = "";
+ mTitleView.setText(R.string.wifi_setup_title_add_network);
view.findViewById(R.id.wifi_general_info).setVisibility(View.GONE);
}
if (selectedAccessPoint != null &&
selectedAccessPoint.security == AccessPoint.SECURITY_NONE) {
- mStatusText.setText(R.string.wifi_setup_status_unsecured_network);
+ // onConnectButtonPressed() will change visibility status.
+ mConnectButton.performClick();
} else if (selectedAccessPoint != null &&
selectedAccessPoint.security == AccessPoint.SECURITY_EAP) {
- mStatusText.setText(R.string.wifi_setup_status_eap_not_supported);
mConnectButton.setVisibility(View.GONE);
+
+ showEditingTitle();
+ mSkipOrNextButton.setVisibility(View.GONE);
+ mAddNetworkButton.setVisibility(View.GONE);
+ mRefreshButton.setVisibility(View.GONE);
+ mBackButton.setVisibility(View.VISIBLE);
} else {
- mStatusText.setText(R.string.wifi_setup_status_edit_network);
mConnectButton.setVisibility(View.VISIBLE);
+
+ // WifiConfigController shows Connect button as "Save" when edit==true and a user
+ // tried to connect the network.
+ // In SetupWizard, we just show the button as "Connect" instead.
+ mConnectButton.setText(R.string.wifi_connect);
+
+ showEditingTitle();
+ mSkipOrNextButton.setVisibility(View.GONE);
+ mAddNetworkButton.setVisibility(View.GONE);
+ mRefreshButton.setVisibility(View.GONE);
+ mBackButton.setVisibility(View.VISIBLE);
}
-
- // WifiConfigController shows Connect button as "Save" when edit==true and a user
- // tried to connect the network.
- // In SetupWizard, we just show the button as "Connect" instead.
- mConnectButton.setText(R.string.wifi_connect);
-
- mAddNetworkButton.setVisibility(View.GONE);
- mRefreshButton.setVisibility(View.GONE);
- mSkipOrNextButton.setVisibility(View.GONE);
- mBackButton.setVisibility(View.VISIBLE);
}
// May be called when user press "connect" button in WifiDialog
@@ -386,21 +425,6 @@
mRefreshButton.setVisibility(View.GONE);
}
- // May be called when user press "forget" button in WifiDialog
- /* package */ void onForgetButtonPressed() {
- mWifiSettings.forget();
-
- refreshAccessPoints(false);
- restoreFirstButtonVisibilityState();
- mAddNetworkButton.setEnabled(true);
- mRefreshButton.setEnabled(true);
- mSkipOrNextButton.setEnabled(true);
-
- mProgressBar.setIndeterminate(false);
- mProgressBar.setProgress(0);
- mProgressText.setText(getString(R.string.wifi_setup_not_connected));
- }
-
private void onBackButtonPressed() {
if (mAfterConnectAction) {
if (DEBUG) Log.d(TAG, "Back button pressed after connect action.");
@@ -419,7 +443,6 @@
} else { // During user's Wifi configuration.
mWifiSettings.resumeWifiScan();
- mStatusText.setText(R.string.wifi_setup_status_select_network);
restoreFirstButtonVisibilityState();
mAddNetworkButton.setEnabled(true);
@@ -468,7 +491,8 @@
}
/**
- * Called when {@link WifiSettings} received {@link WifiManager#SUPPLICANT_CHANGED_ACTION}.
+ * Called when {@link WifiSettings} received
+ * {@link WifiManager#SUPPLICANT_STATE_CHANGED_ACTION}.
*/
/* package */ void onSupplicantStateChanged(Intent intent) {
final int errorCode = intent.getIntExtra(WifiManager.EXTRA_SUPPLICANT_ERROR, -1);
@@ -483,11 +507,17 @@
*/
private void onAuthenticationFailure() {
mAfterConnectAction = false;
- mStatusText.setText(R.string.wifi_setup_status_edit_network);
mSkipOrNextButton.setVisibility(View.GONE);
mConnectButton.setVisibility(View.VISIBLE);
mConnectButton.setEnabled(true);
+ if (!TextUtils.isEmpty(mEditingTitle)) {
+ mTitleView.setText(mEditingTitle);
+ } else {
+ Log.w(TAG, "Title during editing/adding a network was empty.");
+ showEditingTitle();
+ }
+
// Restore View status which was tweaked on connection.
final View wpsFieldView = findViewById(R.id.wps_fields);
if (wpsFieldView != null) {
@@ -500,21 +530,36 @@
final View passwordView = findViewById(R.id.password);
if (passwordView != null) {
if (passwordView.isFocused()) {
- final InputMethodManager inputMethodManager = (InputMethodManager)
- getSystemService(Context.INPUT_METHOD_SERVICE);
- inputMethodManager.showSoftInput(passwordView, 0);
- } else {
- mWifiConfig.requestFocusAndShowKeyboard(R.id.password);
+ setPaddingVisibility(View.GONE);
}
+ mWifiConfig.requestFocusAndShowKeyboard(R.id.password);
}
}
}
final View typeView = findViewById(R.id.type);
if (typeView != null) {
typeView.setVisibility(mPreviousTypeVisibility);
+ if (mPreviousTypeVisibility == View.VISIBLE && mWifiConfig != null) {
+ final View ssidView = findViewById(R.id.ssid);
+ if (ssidView != null) {
+ if (ssidView.isFocused()) {
+ setPaddingVisibility(View.GONE);
+ }
+ mWifiConfig.requestFocusAndShowKeyboard(R.id.ssid);
+ }
+ }
}
}
+ public void setPaddingVisibility(int visibility) {
+ setPaddingVisibility(visibility, visibility);
+ }
+
+ private void setPaddingVisibility(int topPaddingVisibility, int configVisibility) {
+ mTopPadding.setVisibility(topPaddingVisibility);
+ mWifiConfigPadding.setVisibility(configVisibility);
+ }
+
/**
* Called when WifiManager is requested to save a network. This method sholud include
* WifiManager#saveNetwork() call.
@@ -524,4 +569,9 @@
/* package */ void onSaveNetwork(WifiConfiguration config) {
mWifiManager.connectNetwork(config);
}
+
+ @Override
+ public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {
+ super.onCreateContextMenu(menu, view, menuInfo);
+ }
}