<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"
--- /dev/null
+<?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>
</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>
</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>
</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>
<!-- 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>
import android.content.Context;
import android.content.Intent;
+import android.database.ContentObserver;
import android.os.Handler;
import android.os.Message;
import android.os.SystemProperties;
}
};
+ private ContentObserver mAirplaneModeObserver = new ContentObserver(new Handler()) {
+ @Override
+ public void onChange(boolean selfChange) {
+ onAirplaneModeChanged();
+ }
+ };
+
public AirplaneModeEnabler(Context context, CheckBoxPreference airplaneModeCheckBoxPreference) {
mContext = context;
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;
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);
* - 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));
}
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;
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);
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) {
" 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)) {