Commit 09829aca authored by Peter Kotwicz's avatar Peter Kotwicz Committed by Commit Bot

[Android] Remove always-true SingleTabActivity#supportsAppSwitcher()

BUG=None

Change-Id: I3acd459cddc8bfdeae25b0f6fa9c99e431fa7f13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1884516Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710082}
parent 872d4a4a
...@@ -4,11 +4,8 @@ ...@@ -4,11 +4,8 @@
package org.chromium.chrome.browser; package org.chromium.chrome.browser;
import android.content.pm.PackageManager;
import android.os.Bundle; import android.os.Bundle;
import android.util.Pair; import android.util.Pair;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import org.chromium.base.ActivityState; import org.chromium.base.ActivityState;
import org.chromium.base.ApplicationStatus; import org.chromium.base.ApplicationStatus;
...@@ -122,11 +119,6 @@ public abstract class SingleTabActivity<C extends ChromeActivityComponent> ...@@ -122,11 +119,6 @@ public abstract class SingleTabActivity<C extends ChromeActivityComponent>
*/ */
protected abstract TabState restoreTabState(Bundle savedInstanceState, int tabId); protected abstract TabState restoreTabState(Bundle savedInstanceState, int tabId);
private boolean supportsAppSwitcher() {
return getPackageManager().hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN)
|| KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_APP_SWITCH);
}
@Override @Override
protected boolean handleBackPressed() { protected boolean handleBackPressed() {
Tab tab = getActivityTab(); Tab tab = getActivityTab();
...@@ -139,13 +131,6 @@ public abstract class SingleTabActivity<C extends ChromeActivityComponent> ...@@ -139,13 +131,6 @@ public abstract class SingleTabActivity<C extends ChromeActivityComponent>
return true; return true;
} }
if (!supportsAppSwitcher()) {
// If the device has no way to get to the task switcher, we don't want the default back
// button behavior of finishing the Activity. If the device is low on memory LMK will
// kill us, and if not, we'll start up faster when returned to.
moveTaskToBack(true);
return true;
}
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment