Bug 1307779 - Only start long-press timer for back button r=sebastian

Huge oversight in my original patch. Pressing any hardware button will result
in the history list being shown after the long-press delay (regardless of long-pressing).

MozReview-Commit-ID: KO8u0NzTxaO

--HG--
extra : rebase_source : 6f6932c4f35b9e580a84a2d68a7688abe4da79de
This commit is contained in:
Andrzej Hunt 2016-10-05 18:14:12 +02:00
parent 974f731a59
commit 8001b5d314

View File

@ -570,7 +570,8 @@ public class BrowserApp extends GeckoApp
// - For short presses, we cancel the callback in onKeyUp
// - For long presses, the normal keypress is marked as cancelled, hence won't be handled elsewhere
// (but Android still provides the haptic feedback), and the runnable is run.
if (!Versions.preN) {
if (!Versions.preN &&
keyCode == KeyEvent.KEYCODE_BACK) {
ThreadUtils.getUiHandler().removeCallbacks(mCheckLongPress);
ThreadUtils.getUiHandler().postDelayed(mCheckLongPress, ViewConfiguration.getLongPressTimeout());
}