summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2012-04-24 15:36:33 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-24 15:36:33 -0700
commit1c18112a69e3a2cc8eff6600c6c2216600624847 (patch)
treebe976eec0f5645f0cf1fb29dba1b62057f9f64aa /src/com/android
parent570f51446d7480a9f8293d1bf1709640b70dff2a (diff)
parente3fbfa933e89e43b66b69deeaa2cfa5f322b78e6 (diff)
downloadandroid_packages_apps_Trebuchet-1c18112a69e3a2cc8eff6600c6c2216600624847.tar.gz
android_packages_apps_Trebuchet-1c18112a69e3a2cc8eff6600c6c2216600624847.tar.bz2
android_packages_apps_Trebuchet-1c18112a69e3a2cc8eff6600c6c2216600624847.zip
Merge "Fixing crash when hitting voice button proxy when voice button is hidden. (Bug 6374690)"
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/launcher2/Launcher.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 71fd27856..dfeb5900e 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1816,7 +1816,7 @@ public final class Launcher extends Activity
Intent intent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
- startActivity(intent);
+ startActivitySafely(intent, "onClickVoiceButton");
}
/**
@@ -1847,7 +1847,7 @@ public final class Launcher extends Activity
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
Uri.fromParts("package", packageName, null));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
- startActivity(intent);
+ startActivitySafely(intent, "startApplicationDetailsActivity");
}
void startApplicationUninstallActivity(ApplicationInfo appInfo) {
@@ -2733,6 +2733,7 @@ public final class Launcher extends Activity
final View searchDivider = findViewById(R.id.search_divider);
final View voiceButtonContainer = findViewById(R.id.voice_button_container);
final View voiceButton = findViewById(R.id.voice_button);
+ final View voiceButtonProxy = findViewById(R.id.voice_button_proxy);
final SearchManager searchManager =
(SearchManager) getSystemService(Context.SEARCH_SERVICE);
@@ -2753,6 +2754,7 @@ public final class Launcher extends Activity
if (voiceButtonContainer != null) voiceButtonContainer.setVisibility(View.GONE);
searchButton.setVisibility(View.GONE);
voiceButton.setVisibility(View.GONE);
+ voiceButtonProxy.setVisibility(View.GONE);
return false;
}
}
@@ -2768,6 +2770,7 @@ public final class Launcher extends Activity
final View searchDivider = findViewById(R.id.search_divider);
final View voiceButtonContainer = findViewById(R.id.voice_button_container);
final View voiceButton = findViewById(R.id.voice_button);
+ final View voiceButtonProxy = findViewById(R.id.voice_button_proxy);
// We only show/update the voice search icon if the search icon is enabled as well
Intent intent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
@@ -2779,12 +2782,14 @@ public final class Launcher extends Activity
if (searchDivider != null) searchDivider.setVisibility(View.VISIBLE);
if (voiceButtonContainer != null) voiceButtonContainer.setVisibility(View.VISIBLE);
voiceButton.setVisibility(View.VISIBLE);
+ voiceButtonProxy.setVisibility(View.VISIBLE);
invalidatePressedFocusedStates(voiceButtonContainer, voiceButton);
return true;
} else {
if (searchDivider != null) searchDivider.setVisibility(View.GONE);
if (voiceButtonContainer != null) voiceButtonContainer.setVisibility(View.GONE);
voiceButton.setVisibility(View.GONE);
+ voiceButtonProxy.setVisibility(View.GONE);
return false;
}
}