v0.7.1c: removed android-specific code from several classes in core

This commit is contained in:
Evan Debenham
2019-01-10 20:30:13 -05:00
parent 18f72cd5ac
commit 7dffe6bf23
11 changed files with 38 additions and 33 deletions

View File

@@ -104,6 +104,10 @@ public class SmartTexture extends Texture {
height = bitmap.getHeight();
}
public int getPixel( int x, int y ){
return bitmap.getPixel(x, y);
}
public void reload() {
id = -1;
generate();

View File

@@ -21,7 +21,12 @@
package com.watabou.utils;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.util.Log;
import com.watabou.noosa.Game;
public class DeviceCompat {
@@ -40,5 +45,14 @@ public class DeviceCompat {
public static boolean usesISO_8859_1(){
return Build.VERSION.SDK_INT == Build.VERSION_CODES.FROYO;
}
public static void openURI( String URI ){
Intent intent = new Intent( Intent.ACTION_VIEW, Uri.parse( URI ) );
Game.instance.startActivity( intent );
}
public static void log( String tag, String message ){
Log.i( tag, message );
}
}