summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2012-04-24 19:27:54 -0700
committerJim Miller <jaggies@google.com>2012-04-24 19:27:54 -0700
commit14091b1df4dded743ecdbfe7caabfbaaaaaf0713 (patch)
tree0ff9233d7b25159d3261f1cd46668b992b489247
parent3b1b36bf2ebed328ab60f1f78fe4d5bdd5322f2e (diff)
downloadandroid_packages_apps_Trebuchet-14091b1df4dded743ecdbfe7caabfbaaaaaf0713.tar.gz
android_packages_apps_Trebuchet-14091b1df4dded743ecdbfe7caabfbaaaaaf0713.tar.bz2
android_packages_apps_Trebuchet-14091b1df4dded743ecdbfe7caabfbaaaaaf0713.zip
Fix crash in launcher on tablets.
It appears tablets are missing a voice proxy button. Interrim fix until the launcher guys can look at it. Change-Id: I1dae632035421b4c566713358c1f2255def5b110
-rw-r--r--src/com/android/launcher2/Launcher.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index e78ee4a36..e2b86a4bd 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -378,7 +378,7 @@ public final class Launcher extends Activity
}
mSearchDropTargetBar.onSearchPackagesChanged(searchVisible, voiceVisible);
- final String forceEnableRotation =
+ final String forceEnableRotation =
SystemProperties.get(FORCE_ENABLE_ROTATION_PROPERTY, "false");
boolean enableRotation = getResources().getBoolean(R.bool.allow_rotation);
@@ -2793,14 +2793,18 @@ 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);
+ if (voiceButtonProxy != null) {
+ 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);
+ if (voiceButtonProxy != null) {
+ voiceButtonProxy.setVisibility(View.GONE);
+ }
return false;
}
}