OSDN Git Service

Revert "SearchView focus should be preserved in split-screen."
authorTarandeep Singh <tarandeep@google.com>
Wed, 18 Oct 2017 17:38:50 +0000 (17:38 +0000)
committerTarandeep Singh <tarandeep@google.com>
Fri, 20 Oct 2017 17:55:53 +0000 (17:55 +0000)
This reverts commit 96d68d45f0be6c9589ca4509d3d6dd3b50bfa8f1.

Reason for revert: This CL fixed the bug but introduced a new one as described in bug 31298450 comment#10
Bug: 31298450
Bug: 31444175
Test: Manually done as follows
  1. Open system settings.
  2. Tap "System"
  3. Tap "Languages & input"
  4. Tap "Languages"
  6. Tap "Add a language"
  7. Select "English"
  8. Tap the back button on the NavBar
  9. Make sure that the user is navigate back to "Add a language" screen.
Change-Id: I1c98476e962a2d767ec8ed6462c50715a95be9bc

core/java/com/android/internal/app/LocalePickerWithRegion.java

index 3d5cd0f..d0719ee 100644 (file)
@@ -238,7 +238,7 @@ public class LocalePickerWithRegion extends ListFragment implements SearchView.O
             mSearchView.setOnQueryTextListener(this);
 
             // Restore previous search status
-            if (mPreviousSearch != null) {
+            if (!TextUtils.isEmpty(mPreviousSearch)) {
                 searchMenuItem.expandActionView();
                 mSearchView.setIconified(false);
                 mSearchView.setActivated(true);