public void initialize(){
try {
method = Surface.class.getMethod("screenshot", int.class,
int.class);
} catch (Exception e) {
initialize2();
}
if(dm == null){
}
}
public void initialize2(){
try {
Class<?> c = Class.forName("android.view.SurfaceControl");
method = c.getMethod("screenshot", int.class,
int.class);
} catch (Exception e) {
Log.e(TAG, "exception call screenshot");
e.printStackTrace();
}
}