This source file includes following definitions.
- JNINamespace
- maxTouchPoints
package org.chromium.ui.base;
import android.content.Context;
import android.content.pm.PackageManager;
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
@JNINamespace("ui")
public class TouchDevice {
private TouchDevice() { }
@CalledByNative
private static int maxTouchPoints(Context context) {
if (context.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND)) {
return 5;
} else if (context.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT)) {
return 2;
} else if (context.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH)) {
return 2;
} else if (context.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_TOUCHSCREEN)) {
return 1;
} else {
return 0;
}
}
}