Here you can find the source of isTouchScreen(Context context)
public static boolean isTouchScreen(Context context)
//package com.java2s; import android.content.Context; import android.content.res.Configuration; public class Main { public static boolean isTouchScreen(Context context) { int touchscreen = context.getResources().getConfiguration().touchscreen; switch (touchscreen) { case Configuration.TOUCHSCREEN_NOTOUCH: return false; default://from ww w . ja v a 2s . c om return true; } } }