Merge "Fix 2579461 Disable move when manifest option for install location is unspecified and install location is auto/internal" into froyo
diff --git a/src/com/android/settings/TextToSpeechSettings.java b/src/com/android/settings/TextToSpeechSettings.java
index fa9ea58..5366bd0 100644
--- a/src/com/android/settings/TextToSpeechSettings.java
+++ b/src/com/android/settings/TextToSpeechSettings.java
@@ -99,6 +99,7 @@
private boolean mVoicesMissing = false;
private TextToSpeech mTts = null;
+ private boolean mTtsStarted = false;
/**
* Request code (arbitrary value) for voice data check through
@@ -120,8 +121,7 @@
setVolumeControlStream(TextToSpeech.Engine.DEFAULT_STREAM);
mEnableDemo = false;
- initClickers();
- initDefaultSettings();
+ mTtsStarted = false;
mTts = new TextToSpeech(this, this);
}
@@ -130,12 +130,14 @@
@Override
protected void onStart() {
super.onStart();
- // whenever we return to this screen, we don't know the state of the
- // system, so we have to recheck that we can play the demo, or it must be disabled.
- // TODO make the TTS service listen to "changes in the system", i.e. sd card un/mount
- initClickers();
- updateWidgetState();
- checkVoiceData();
+ if (mTtsStarted){
+ // whenever we return to this screen, we don't know the state of the
+ // system, so we have to recheck that we can play the demo, or it must be disabled.
+ // TODO make the TTS service listen to "changes in the system", i.e. sd card un/mount
+ initClickers();
+ updateWidgetState();
+ checkVoiceData();
+ }
}
@@ -327,7 +329,6 @@
*/
public void onInit(int status) {
if (status == TextToSpeech.SUCCESS) {
- Log.v(TAG, "TTS engine for settings screen initialized.");
mEnableDemo = true;
if (mDefaultLanguage == null) {
mDefaultLanguage = Locale.getDefault().getISO3Language();
@@ -340,6 +341,12 @@
}
mTts.setLanguage(new Locale(mDefaultLanguage, mDefaultCountry, mDefaultLocVariant));
mTts.setSpeechRate((float)(mDefaultRate/100.0f));
+ initDefaultSettings();
+ initClickers();
+ updateWidgetState();
+ checkVoiceData();
+ mTtsStarted = true;
+ Log.v(TAG, "TTS engine for settings screen initialized.");
} else {
Log.v(TAG, "TTS engine for settings screen failed to initialize successfully.");
mEnableDemo = false;
diff --git a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
index ec8df3c..57bffa9 100644
--- a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
+++ b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
@@ -53,7 +53,7 @@
private static final String TAG = "CachedBluetoothDevice";
private static final boolean D = LocalBluetoothManager.D;
private static final boolean V = LocalBluetoothManager.V;
- private static final boolean DEBUG = true; // STOPSHIP - disable before final rom
+ private static final boolean DEBUG = false;
private static final int CONTEXT_ITEM_CONNECT = Menu.FIRST + 1;
private static final int CONTEXT_ITEM_DISCONNECT = Menu.FIRST + 2;