OSDN Git Service

Merge "Import revised translations. DO NOT MERGE" into honeycomb
authorDianne Hackborn <hackbod@google.com>
Thu, 27 Jan 2011 01:35:59 +0000 (17:35 -0800)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Thu, 27 Jan 2011 01:35:59 +0000 (17:35 -0800)
AndroidManifest.xml
assets/html/en_us/tethering_bluetooth_help.html [new file with mode: 0644]
assets/html/en_us/tethering_help.html
assets/html/en_us/tethering_usb_help.html
assets/html/en_us/tethering_wifi_help.html
res/values/strings.xml
src/com/android/settings/AirplaneModeEnabler.java
src/com/android/settings/bluetooth/BluetoothSettings.java
src/com/android/settings/bluetooth/CachedBluetoothDevice.java

index 334a9d9..1ef8a46 100644 (file)
         <activity android:name="ConfirmLockPattern"/>
 
         <activity android:name="ConfirmLockPassword"
-            android:windowSoftInputMode="stateUnchanged|adjustResize"/>
+            android:windowSoftInputMode="stateVisible|adjustResize"/>
 
         <activity android:name="ChooseLockGeneric"
             android:label="@string/lockpassword_choose_lock_generic_header">
         <activity android:name="ChooseLockPattern" android:exported="false"/>
 
         <activity android:name="ChooseLockPassword" android:exported="false"
-            android:windowSoftInputMode="stateUnchanged|adjustResize"/>
+            android:windowSoftInputMode="stateVisible|adjustResize"/>
 
         <activity android:name="ChooseLockPatternTutorial" android:exported="false"/>
 
         <activity android:name="com.android.settings.accounts.ChooseAccountActivity"
             android:label="@string/header_add_an_account"
             android:theme="@android:style/Theme.Holo.DialogWhenLarge"/>
-            
+
         <activity android:name=".CryptKeeper"
                   android:immersive="true"
                   android:launchMode="singleTop"
diff --git a/assets/html/en_us/tethering_bluetooth_help.html b/assets/html/en_us/tethering_bluetooth_help.html
new file mode 100644 (file)
index 0000000..eb181f8
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+<head>
+<style>
+P {
+    font-size: 14 px;
+    }
+B {
+       font-size: 16px;
+}
+A {
+       color: #OOC;
+}
+.style1 {
+       font-size: 16px;
+}
+</style>
+</head>
+<body>
+<p><b>Bluetooth tethering</b></p>
+<span class="style1">You can tether your Android device to your computer via a Bluetooth connection, to share your device's Internet connection with your computer</span>
+<ul>
+<li>Bluetooth tethering works with any computer or other device that can obtain an Internet connection via Bluetooth</li><br>
+<li>For more information, see <a href="http://www.android.com/tether#bluetooth">http://www.android.com/tether#bluetooth</a></li><br>
+</ul>
+</body>
+</html>
index dfff700..e980b20 100644 (file)
@@ -18,16 +18,24 @@ A {
 </head>
 <body>
 <p><b>USB tethering</b></p>
-<span class="style1">You can tether your phone to your computer with a USB cable, to share your phone's internet connection with your computer</span>
+<span class="style1">You can tether your Android device to your computer with a USB cable, to share your device's Internet connection with your computer</span>
 <ul>
-<li>Tethering works with Windows Vista, Windows 7, and Linux</li><br>
-<li>You can't mount your phone's SD card on your computer when USB tethered</li><br>
+<li>USB tethering works with Windows Vista, Windows 7, and Linux</li><br>
+<li>If your device has an SD card or USB storage, you can't mount it on your computer when USB tethered</li><br>
 <li>For more information, including using USB tethering with other OSs, see <a href="http://www.android.com/tether#usb">http://www.android.com/tether#usb</a></li><br>
 </ul>
+
+<p><b>Bluetooth tethering</b></p>
+<span class="style1">You can tether your Android device to your computer via a Bluetooth connection, to share your device's Internet connection with your computer</span>
+<ul>
+<li>Bluetooth tethering works with any computer or other device that can obtain an Internet connection via Bluetooth</li><br>
+<li>For more information, see <a href="http://www.android.com/tether#bluetooth">http://www.android.com/tether#bluetooth</a></li><br>
+</ul>
+
 <p><b>Portable Wi-Fi hotspot</b></p>
-<span class="style1">You can turn your phone into a portable Wi-Fi hotspot, to share your phone's internet connection with one or more computers or other devices</span>
+<span class="style1">You can turn your Android device into a portable Wi-Fi hotspot, to share your Android device's Internet connection with one or more computers or other devices</span>
 <ul>
-<li>When your phone is serving as a Wi-Fi hotspot, you can't use your phone's applications to access the internet via its Wi-Fi connection</li><br>
+<li>When your device is serving as a Wi-Fi hotspot, you can't use your phone's applications to access the Internet via its Wi-Fi connection (but of course you remain connected to the Internet via your mobile data network)</li><br>
 <li>You configure the hotspot with the Wi-Fi hotspot settings</li><br>
 <li>For more information, visit <a href="http://www.android.com/tether#wifi">http://www.android.com/tether#wifi</a></li><br>
 </ul>
index 23f39e5..b3dbf58 100644 (file)
@@ -18,10 +18,10 @@ A {
 </head>
 <body>
 <p><b>USB tethering</b></p>
-<span class="style1">You can tether your phone to your computer with a USB cable, to share your phone's internet connection with your computer</span>
+<span class="style1">You can tether your Android device to your computer with a USB cable, to share your device's Internet connection with your computer</span>
 <ul>
-<li>Tethering works with Windows Vista, Windows 7, and Linux</li><br>
-<li>You can't mount your phone's SD card on your computer when USB tethered</li><br>
+<li>USB tethering works with Windows Vista, Windows 7, and Linux</li><br>
+<li>If your device has an SD card or USB storage, you can't mount it on your computer when USB tethered</li><br>
 <li>For more information, including using USB tethering with other OSs, see <a href="http://www.android.com/tether#usb">http://www.android.com/tether#usb</a></li><br>
 </ul>
 </body>
index fac231b..621f869 100644 (file)
@@ -18,9 +18,9 @@ A {
 </head>
 <body>
 <p><b>Portable Wi-Fi hotspot</b></p>
-<span class="style1">You can turn your phone into a portable Wi-Fi hotspot, to share your phone's internet connection with one or more computers or other devices</span>
+<span class="style1">You can turn your Android device into a portable Wi-Fi hotspot, to share your Android device's Internet connection with one or more computers or other devices</span>
 <ul>
-<li>When your phone is serving as a Wi-Fi hotspot, you can't use your phone's applications to access the internet via its Wi-Fi connection</li><br>
+<li>When your device is serving as a Wi-Fi hotspot, you can't use your phone's applications to access the Internet via its Wi-Fi connection (but of course you remain connected to the Internet via your mobile data network)</li><br>
 <li>You configure the hotspot with the Wi-Fi hotspot settings</li><br>
 <li>For more information, visit <a href="http://www.android.com/tether#wifi">http://www.android.com/tether#wifi</a></li><br>
 </ul>
index eed510b..8dc3f0c 100644 (file)
     <!-- In the security screen, the header title for settings related to  Passwords-->
     <string name="security_passwords_title">Passwords</string>
 
-    <string name="crypt_keeper_settings_title">Device encryption</string>
+    <string name="crypt_keeper_settings_title">Encryption</string>
 
-    <string name="crypt_keeper_encrypt_title">Encrypt data on device</string>
-    <string name="crypt_keeper_encrypt_summary">Requires you to set a device unlock pin or password</string>
+    <string name="crypt_keeper_encrypt_title" product="tablet">Encrypt tablet</string>
+    <string name="crypt_keeper_encrypt_title" product="default">Encrypt phone</string>
+
+    <string name="crypt_keeper_encrypt_summary" product="tablet">
+    Require a numeric PIN or password to decrypt your tablet each time you
+    power it on</string>
+    <string name="crypt_keeper_encrypt_summary" product="default">
+    Require a numeric PIN or password to decrypt your phone each time you
+    power it on</string>
     <string name="crypt_keeper_encrypted_summary">Encrypted</string>
 
     <string name="crypt_keeper_confirm_title">Confirm encryption</string>
 
     
-    <string name="crypt_keeper_desc" product="tablet">You can encrypt your accounts, settings, downloaded applications and their data, media, and other files. Once you encrypt your tablet, you can\'t unencrypt it except by performing a factory data reset, erasing all the data on your tablet.\n\nEncryption takes up to an hour. You must start with a charged battery and keep your tablet plugged in until encryption is complete. If you interrupt the encryption process, you will lose some or all of your data.</string>
-    <string name="crypt_keeper_desc" product="default">You can encrypt your accounts, settings, downloaded applications and their data, media, and other files. Once you encrypt your phone, you can\'t unencrypt it except by performing a factory data reset, erasing all the data on your phone.\n\nEncryption takes up to an hour. You must start with a charged battery and keep your phone plugged in until encryption is complete. If you interrupt the encryption process, you will lose some or all of your data.</string>
-
+    <string name="crypt_keeper_desc" product="tablet">
+    You can encrypt your accounts, settings, downloaded applications and their data,
+    media, and other files. Once you encrypt your tablet, you must enter a numeric PIN
+    or password to decrypt it each time you power it on: you can\'t unencrypt your tablet
+    except by performing a factory data reset, erasing all your data.\n\nEncryption takes
+    an hour or more. You must start with a charged battery and keep your tablet plugged in
+    until encryption is complete. If you interrupt the encryption process, you will lose
+    some or all of your data.</string>
+    <string name="crypt_keeper_desc" product="default">
+    You can encrypt your accounts, settings, downloaded applications and their data,
+    media, and other files. Once you encrypt your phone, you must enter a numeric PIN or
+    password to decrypt it each time you power it on: you can\'t unencrypt your phone
+    except by performing a factory data reset, erasing all your data.\n\nEncryption takes
+    an hour or more. You must start with a charged battery and keep your phone plugged in
+    until encryption is complete. If you interrupt the encryption process, you will lose
+    some or all of your data.</string>
     
     <string name="crypt_keeper_button_text" product="tablet">Encrypt tablet</string>
     <string name="crypt_keeper_button_text" product="default">Encrypt phone</string>
-    
-    <string name="crypt_keeper_final_desc">Encrypt user data? This operation is not reversible and may not be interrupted without loss of data! Encryption may take up to an hour.</string>
+
+    <string name="crypt_keeper_low_charge_text">Please charge your battery and try again.</string>
+    <string name="crypt_keeper_unplugged_text">Please plug in your charger and try again.</string>
+
+    <string name="crypt_keeper_final_desc" product="tablet">
+    Encrypt tablet? This operation is irreversible and if you interrupt it,
+    you will lose data! Encryption takes an hour or more.</string>
+    <string name="crypt_keeper_final_desc" product="default">
+    Encrypt phone? This operation is irreversible and if you interrupt it,
+    you will lose data! Encryption takes an hour or more.</string>
     
     <string name="crypt_keeper_setup_title">Encrypting</string>
 
index ccfe541..00c416f 100644 (file)
@@ -20,6 +20,7 @@ import com.android.internal.telephony.PhoneStateIntentReceiver;
 
 import android.content.Context;
 import android.content.Intent;
+import android.database.ContentObserver;
 import android.os.Handler;
 import android.os.Message;
 import android.os.SystemProperties;
@@ -51,6 +52,13 @@ public class AirplaneModeEnabler implements Preference.OnPreferenceChangeListene
         }
     };
 
+    private ContentObserver mAirplaneModeObserver = new ContentObserver(new Handler()) {
+        @Override
+        public void onChange(boolean selfChange) {
+            onAirplaneModeChanged();
+        }
+    };
+
     public AirplaneModeEnabler(Context context, CheckBoxPreference airplaneModeCheckBoxPreference) {
         
         mContext = context;
@@ -68,13 +76,17 @@ public class AirplaneModeEnabler implements Preference.OnPreferenceChangeListene
 
         mPhoneStateReceiver.registerIntent();
         mCheckBoxPref.setOnPreferenceChangeListener(this);
+        mContext.getContentResolver().registerContentObserver(
+                Settings.System.getUriFor(Settings.System.AIRPLANE_MODE_ON), true,
+                mAirplaneModeObserver);
     }
     
     public void pause() {
         mPhoneStateReceiver.unregisterIntent();
         mCheckBoxPref.setOnPreferenceChangeListener(null);
+        mContext.getContentResolver().unregisterContentObserver(mAirplaneModeObserver);
     }
-    
+
     public static boolean isAirplaneModeOn(Context context) {
         return Settings.System.getInt(context.getContentResolver(),
                 Settings.System.AIRPLANE_MODE_ON, 0) != 0;
@@ -84,7 +96,7 @@ public class AirplaneModeEnabler implements Preference.OnPreferenceChangeListene
         
         mCheckBoxPref.setSummary(enabling ? R.string.airplane_mode_turning_on
                 : R.string.airplane_mode_turning_off);
-        
+
         // Change the system setting
         Settings.System.putInt(mContext.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 
                                 enabling ? 1 : 0);
@@ -106,8 +118,8 @@ public class AirplaneModeEnabler implements Preference.OnPreferenceChangeListene
      * - mobile does not send failure notification, fail on timeout.
      */
     private void onAirplaneModeChanged() {
-        ServiceState serviceState = mPhoneStateReceiver.getServiceState();
-        boolean airplaneModeEnabled = serviceState.getState() == ServiceState.STATE_POWER_OFF;
+        boolean airplaneModeEnabled = isAirplaneModeOn(mContext);
+        mCheckBoxPref.setChecked(isAirplaneModeOn(mContext));
         mCheckBoxPref.setSummary(airplaneModeEnabled ? null : 
                 mContext.getString(R.string.airplane_mode_summary));            
     }
index 2893ce3..c1fda6b 100644 (file)
@@ -18,7 +18,10 @@ package com.android.settings.bluetooth;
 
 import android.app.Activity;
 import android.bluetooth.BluetoothDevice;
+import android.content.Intent;
 import android.preference.CheckBoxPreference;
+import android.preference.Preference;
+import android.preference.PreferenceScreen;
 import android.util.Log;
 import android.view.View;
 
@@ -36,11 +39,16 @@ public class BluetoothSettings extends DeviceListPreferenceFragment
     private static final String KEY_BT_CHECKBOX = "bt_checkbox";
     private static final String KEY_BT_DISCOVERABLE = "bt_discoverable";
     private static final String KEY_BT_NAME = "bt_name";
+    private static final String KEY_BT_SHOW_RECEIVED = "bt_show_received_files";
 
     private BluetoothEnabler mEnabler;
     private BluetoothDiscoverableEnabler mDiscoverableEnabler;
     private BluetoothNamePreference mNamePreference;
 
+    /* Private intent to show the list of received files */
+    private static final String BTOPP_ACTION_OPEN_RECEIVED_FILES =
+            "android.btopp.intent.action.OPEN_RECEIVED_FILES";
+
     void addPreferencesForActivity(Activity activity) {
         addPreferencesFromResource(R.xml.bluetooth_settings);
 
@@ -75,6 +83,18 @@ public class BluetoothSettings extends DeviceListPreferenceFragment
         mEnabler.pause();
     }
 
+    @Override
+    public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
+            Preference preference) {
+        if (KEY_BT_SHOW_RECEIVED.equals(preference.getKey())) {
+            Intent intent = new Intent(BTOPP_ACTION_OPEN_RECEIVED_FILES);
+            getActivity().sendBroadcast(intent);
+            return true;
+        }
+
+        return super.onPreferenceTreeClick(preferenceScreen, preference);
+    }
+
     public void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice,
             int bondState) {
         if (bondState == BluetoothDevice.BOND_BONDED) {
index 8ddeef5..db20411 100644 (file)
@@ -111,8 +111,10 @@ class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> {
                     " newProfileState " + newProfileState);
         }
 
-        int newState = LocalBluetoothProfileManager.getProfileManager(mLocalManager,
-                profile).convertState(newProfileState);
+        final LocalBluetoothProfileManager pm =
+                LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile);
+        if (pm == null) return;
+        int newState = pm.convertState(newProfileState);
 
         if (newState == SettingsBtStatus.CONNECTION_STATUS_CONNECTED) {
             if (!mProfiles.contains(profile)) {