Commit ac41244b authored by Claes Sjofors's avatar Claes Sjofors

Android app, default graph icon added

parent 5a77516c
......@@ -1056,22 +1056,26 @@ public class MainActivity extends Activity implements PlowAppl, GraphApplIfc, Gd
continue;
String image = sret.str;
URL url = null;
try {
if ( image.startsWith("$pwr_exe/")) {
// url = new URL("http://10.0.2.2/data0/x4-8-6/rls/os_linux/hw_x86/exp/exe/" + filename.substring(9));
url = new URL("http://" + pwrHost + "/pwr_exe/" + image.substring(9));
}
else {
// url = new URL("http://10.0.2.2/data0/pwrp/opg7/bld/x86_linux/exe/" + filename);
url = new URL("http://" + pwrHost + "/pwrp_exe/" + image);
if ( image.equals("")) {
info.bpm = BitmapFactory.decodeResource(getResources(), R.drawable.graph_icon);
}
else {
URL url = null;
try {
if ( image.startsWith("$pwr_exe/")) {
// url = new URL("http://10.0.2.2/data0/x4-8-6/rls/os_linux/hw_x86/exp/exe/" + filename.substring(9));
url = new URL("http://" + pwrHost + "/pwr_exe/" + image.substring(9));
}
else {
// url = new URL("http://10.0.2.2/data0/pwrp/opg7/bld/x86_linux/exe/" + filename);
url = new URL("http://" + pwrHost + "/pwrp_exe/" + image);
}
info.bpm = BitmapFactory.decodeStream(url.openConnection().getInputStream());
} catch ( IOException e) {
info.bpm = BitmapFactory.decodeResource(getResources(), R.drawable.graph_icon);
System.out.println( "Unable to open file " + image + " " + url);
}
info.bpm = BitmapFactory.decodeStream(url.openConnection().getInputStream());
} catch ( IOException e) {
System.out.println( "Unable to open file " + image + " " + url);
continue;
}
aName = name + ".Name";
sret = gdh.getObjectInfoString(aName);
if ( sret.evenSts())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment