packages/apps/Taskbar
Revisión | 0f9d3eaa092fb2227b16741596830b72ef3babaf (tree) |
---|---|
Tiempo | 2019-01-18 15:08:32 |
Autor | Braden Farmer <farmerbb@gmai...> |
Commiter | Braden Farmer |
One more soft keyboard flicker fix
@@ -95,6 +95,7 @@ public class StartMenuService extends Service { | ||
95 | 95 | private boolean shouldShowSearchBox = false; |
96 | 96 | private boolean hasSubmittedQuery = false; |
97 | 97 | private boolean hasHardwareKeyboard = false; |
98 | + private boolean applySoftKeyboardFix = false; | |
98 | 99 | |
99 | 100 | private int layoutId = R.layout.start_menu_left; |
100 | 101 |
@@ -177,6 +178,7 @@ public class StartMenuService extends Service { | ||
177 | 178 | super.onCreate(); |
178 | 179 | |
179 | 180 | hasHardwareKeyboard = getResources().getConfiguration().keyboard != Configuration.KEYBOARD_NOKEYS; |
181 | + applySoftKeyboardFix = hasHardwareKeyboard && U.isChromeOs(this); | |
180 | 182 | |
181 | 183 | SharedPreferences pref = U.getSharedPreferences(this); |
182 | 184 | if(pref.getBoolean("taskbar_active", false) || LauncherHelper.getInstance().isOnHomeScreen()) { |
@@ -589,8 +591,6 @@ public class StartMenuService extends Service { | ||
589 | 591 | layout.setOnClickListener(ocl); |
590 | 592 | layout.setVisibility(View.VISIBLE); |
591 | 593 | |
592 | - boolean applySoftKeyboardFix = hasHardwareKeyboard && U.isChromeOs(this); | |
593 | - | |
594 | 594 | if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.N_MR1 && !applySoftKeyboardFix) |
595 | 595 | layout.setAlpha(1); |
596 | 596 |
@@ -681,7 +681,10 @@ public class StartMenuService extends Service { | ||
681 | 681 | |
682 | 682 | layout.postDelayed(() -> { |
683 | 683 | layout.setVisibility(View.GONE); |
684 | - searchView.setQuery(null, false); | |
684 | + | |
685 | + if(!applySoftKeyboardFix) | |
686 | + searchView.setQuery(null, false); | |
687 | + | |
685 | 688 | searchView.setIconified(true); |
686 | 689 | searchView.setOnQueryTextFocusChangeListener(null); |
687 | 690 | hasSubmittedQuery = false; |