| Index: ui/android/java/src/org/chromium/ui/base/TouchDevice.java
|
| diff --git a/ui/android/java/src/org/chromium/ui/base/TouchDevice.java b/ui/android/java/src/org/chromium/ui/base/TouchDevice.java
|
| index b28503735e3658f422f99c104c5f6d82a507eeef..40f0f4c688112c290bdb445df85c0724c7a90a55 100644
|
| --- a/ui/android/java/src/org/chromium/ui/base/TouchDevice.java
|
| +++ b/ui/android/java/src/org/chromium/ui/base/TouchDevice.java
|
| @@ -4,10 +4,10 @@
|
|
|
| package org.chromium.ui.base;
|
|
|
| -import android.content.Context;
|
| import android.content.pm.PackageManager;
|
| import android.view.InputDevice;
|
|
|
| +import org.chromium.base.ContextUtils;
|
| import org.chromium.base.annotations.CalledByNative;
|
| import org.chromium.base.annotations.JNINamespace;
|
|
|
| @@ -26,22 +26,22 @@ public class TouchDevice {
|
| * @return Maximum supported touch points.
|
| */
|
| @CalledByNative
|
| - private static int maxTouchPoints(Context context) {
|
| + private static int maxTouchPoints() {
|
| // Android only tells us if the device belongs to a "Touchscreen Class" which only
|
| // guarantees a minimum number of touch points. Be conservative and return the minimum,
|
| // checking membership from the highest class down.
|
|
|
| - if (context.getPackageManager().hasSystemFeature(
|
| - PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND)) {
|
| + if (ContextUtils.getApplicationContext().getPackageManager().hasSystemFeature(
|
| + PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND)) {
|
| return 5;
|
| - } else if (context.getPackageManager().hasSystemFeature(
|
| - PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT)) {
|
| + } else if (ContextUtils.getApplicationContext().getPackageManager().hasSystemFeature(
|
| + PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT)) {
|
| return 2;
|
| - } else if (context.getPackageManager().hasSystemFeature(
|
| - PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH)) {
|
| + } else if (ContextUtils.getApplicationContext().getPackageManager().hasSystemFeature(
|
| + PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH)) {
|
| return 2;
|
| - } else if (context.getPackageManager().hasSystemFeature(
|
| - PackageManager.FEATURE_TOUCHSCREEN)) {
|
| + } else if (ContextUtils.getApplicationContext().getPackageManager().hasSystemFeature(
|
| + PackageManager.FEATURE_TOUCHSCREEN)) {
|
| return 1;
|
| } else {
|
| return 0;
|
| @@ -54,7 +54,7 @@ public class TouchDevice {
|
| * corresponding type (PointerType/HoverType) bits.
|
| */
|
| @CalledByNative
|
| - private static int[] availablePointerAndHoverTypes(Context context) {
|
| + private static int[] availablePointerAndHoverTypes() {
|
| int[] result = new int[2];
|
| result[0] = result[1] = 0;
|
|
|
|
|