Bug 1128521 - Don't use API 17+ method in search activity. r=mfinkle, a=sledru
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Tue, 03 Feb 2015 12:00:04 -0800
changeset 243697 9b1ff4e3ca58
parent 243696 a5992bd7d600
child 243698 74c4e5bdde78
push id4440
push userryanvm@gmail.com
push date2015-02-05 16:07 +0000
treeherdermozilla-beta@74c4e5bdde78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, sledru
bugs1128521
milestone36.0
Bug 1128521 - Don't use API 17+ method in search activity. r=mfinkle, a=sledru
mobile/android/search/java/org/mozilla/search/SearchActivity.java
--- a/mobile/android/search/java/org/mozilla/search/SearchActivity.java
+++ b/mobile/android/search/java/org/mozilla/search/SearchActivity.java
@@ -336,17 +336,17 @@ public class SearchActivity extends Loca
         set.addListener(new Animator.AnimatorListener() {
             @Override
             public void onAnimationStart(Animator animation) {
             }
 
             @Override
             public void onAnimationEnd(Animator animation) {
                 // Don't do anything if the activity is destroyed before the animation ends.
-                if (SearchActivity.this.isDestroyed()) {
+                if (searchEngineManager == null) {
                     return;
                 }
 
                 setEditState(EditState.WAITING);
                 setSearchState(SearchState.POSTSEARCH);
 
                 // We need to manually clear the animation for the views to be hidden on gingerbread.
                 animationCard.clearAnimation();