diff --git a/enabler/res/drawable/bluetooth_white.png b/enabler/res/drawable/bluetooth_white.png
new file mode 100644
index 000000000..9f8d1feea
Binary files /dev/null and b/enabler/res/drawable/bluetooth_white.png differ
diff --git a/enabler/res/drawable/network_white.png b/enabler/res/drawable/network_white.png
new file mode 100644
index 000000000..e214daa20
Binary files /dev/null and b/enabler/res/drawable/network_white.png differ
diff --git a/enabler/res/drawable/play_from_file_white.png b/enabler/res/drawable/play_from_file_white.png
new file mode 100644
index 000000000..298014e96
Binary files /dev/null and b/enabler/res/drawable/play_from_file_white.png differ
diff --git a/enabler/res/drawable/questionmark_white.png b/enabler/res/drawable/questionmark_white.png
new file mode 100644
index 000000000..ca05b0ad7
Binary files /dev/null and b/enabler/res/drawable/questionmark_white.png differ
diff --git a/enabler/res/drawable/usb_white.png b/enabler/res/drawable/usb_white.png
new file mode 100644
index 000000000..18b8bcb47
Binary files /dev/null and b/enabler/res/drawable/usb_white.png differ
diff --git a/enabler/res/drawable/warning.png b/enabler/res/drawable/warning.png
new file mode 100644
index 000000000..e838460d9
Binary files /dev/null and b/enabler/res/drawable/warning.png differ
diff --git a/enabler/res/layout-land/main.xml b/enabler/res/layout-land/main.xml
index 9d58d442f..a4c57fc45 100644
--- a/enabler/res/layout-land/main.xml
+++ b/enabler/res/layout-land/main.xml
@@ -6,20 +6,64 @@
android:paddingRight="5sp"
android:orientation="vertical">
+
+
+
+
+
-
-
-
-
-
+ android:text="@string/status_label"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -31,29 +75,4 @@
style="@style/ItemData"/>
-
-
-
-
-
-
-
-
-
-
-
diff --git a/enabler/res/layout/main.xml b/enabler/res/layout/main.xml
index b59bab304..499a951de 100644
--- a/enabler/res/layout/main.xml
+++ b/enabler/res/layout/main.xml
@@ -6,20 +6,64 @@
android:paddingRight="5sp"
android:orientation="vertical">
+
+
+
+
+
-
-
-
-
-
+ android:text="@string/status_label"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -29,24 +73,5 @@
-
-
-
-
-
-
-
-
-
-
+
diff --git a/enabler/res/values/strings.xml b/enabler/res/values/strings.xml
index d1f067fba..38872381e 100644
--- a/enabler/res/values/strings.xml
+++ b/enabler/res/values/strings.xml
@@ -2,9 +2,15 @@
OpenXC Enabler
Status
- Vehicle Service:
+ Active Connections:
Recording Status:
Messages Received:
+ Unknown
+ File
+ Bluetooth
+ USB
+ Network
+ None
Settings
Recording
@@ -44,4 +50,6 @@
Version
Version Number
application_version
+ VehicleService not running.
+ Warning
diff --git a/enabler/res/values/styles.xml b/enabler/res/values/styles.xml
index b6df4033c..68d1a1cc1 100644
--- a/enabler/res/values/styles.xml
+++ b/enabler/res/values/styles.xml
@@ -36,6 +36,18 @@
- right
+
+
+
+
+
+
+
+
diff --git a/enabler/src/com/openxc/enabler/OpenXcEnablerActivity.java b/enabler/src/com/openxc/enabler/OpenXcEnablerActivity.java
index 71da8b382..2ac52e08f 100644
--- a/enabler/src/com/openxc/enabler/OpenXcEnablerActivity.java
+++ b/enabler/src/com/openxc/enabler/OpenXcEnablerActivity.java
@@ -14,7 +14,7 @@
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
-import android.widget.ListView;
+import android.view.View;
import android.widget.TextView;
import com.openxc.VehicleManager;
@@ -42,10 +42,14 @@
public class OpenXcEnablerActivity extends Activity {
private static String TAG = "OpenXcEnablerActivity";
- private TextView mVehicleManagerStatusView;
+ private View mServiceNotRunningWarningView;
private TextView mMessageCountView;
- private ListView mSourceListView;
- private ListView mSinkListView;
+ private View mUnknownConnIV;
+ private View mBluetoothConnIV;
+ private View mUsbConnIV;
+ private View mNetworkConnIV;
+ private View mFileConnIV;
+ private View mNoneConnView;
private TimerTask mUpdateMessageCountTask;
private TimerTask mUpdatePipelineStatusTask;
private Timer mTimer;
@@ -63,7 +67,7 @@ public void run() {
mVehicleManager.waitUntilBound();
OpenXcEnablerActivity.this.runOnUiThread(new Runnable() {
public void run() {
- mVehicleManagerStatusView.setText("Running");
+ mServiceNotRunningWarningView.setVisibility(View.GONE);
}
});
}
@@ -73,7 +77,8 @@ public void run() {
OpenXcEnablerActivity.this, mMessageCountView);
mUpdatePipelineStatusTask = new PipelineStatusUpdateTask(
mVehicleManager, OpenXcEnablerActivity.this,
- mSourceListView, mSinkListView);
+ mUnknownConnIV, mFileConnIV, mNetworkConnIV,
+ mBluetoothConnIV, mUsbConnIV, mNoneConnView);
mTimer = new Timer();
mTimer.schedule(mUpdateMessageCountTask, 100, 1000);
mTimer.schedule(mUpdatePipelineStatusTask, 100, 1000);
@@ -84,7 +89,7 @@ public void onServiceDisconnected(ComponentName className) {
mVehicleManager = null;
OpenXcEnablerActivity.this.runOnUiThread(new Runnable() {
public void run() {
- mVehicleManagerStatusView.setText("Not running");
+ mServiceNotRunningWarningView.setVisibility(View.VISIBLE);
}
});
}
@@ -99,15 +104,18 @@ public void onCreate(Bundle savedInstanceState) {
startService(new Intent(this, VehicleManager.class));
startService(new Intent(this, PreferenceManagerService.class));
- mVehicleManagerStatusView = (TextView) findViewById(
- R.id.vehicle_service_status);
+ mServiceNotRunningWarningView = findViewById(R.id.service_not_running_bar);
mMessageCountView = (TextView) findViewById(R.id.message_count);
- mSourceListView = (ListView) findViewById(R.id.source_list);
- mSinkListView = (ListView) findViewById(R.id.sink_list);
+ mBluetoothConnIV = findViewById(R.id.connection_bluetooth);
+ mUsbConnIV = findViewById(R.id.connection_usb);
+ mFileConnIV = findViewById(R.id.connection_file);
+ mNetworkConnIV = findViewById(R.id.connection_network);
+ mUnknownConnIV = findViewById(R.id.connection_unknown);
+ mNoneConnView = findViewById(R.id.connection_none);
OpenXcEnablerActivity.this.runOnUiThread(new Runnable() {
public void run() {
- mVehicleManagerStatusView.setText("Not running");
+ mServiceNotRunningWarningView.setVisibility(View.VISIBLE);
}
});
}
diff --git a/enabler/src/com/openxc/enabler/PipelineStatusUpdateTask.java b/enabler/src/com/openxc/enabler/PipelineStatusUpdateTask.java
index de79e974d..f3d28ce74 100644
--- a/enabler/src/com/openxc/enabler/PipelineStatusUpdateTask.java
+++ b/enabler/src/com/openxc/enabler/PipelineStatusUpdateTask.java
@@ -1,55 +1,94 @@
package com.openxc.enabler;
+import java.util.List;
import java.util.TimerTask;
import android.app.Activity;
import com.openxc.VehicleManager;
-import android.widget.ListView;
-import android.widget.ArrayAdapter;
+import com.openxc.interfaces.InterfaceType;
+
+import android.view.View;
public class PipelineStatusUpdateTask extends TimerTask {
- private VehicleManager mVehicleManager;
+ private VehicleManager mVehicleManager;
private Activity mActivity;
- private ListView mSourceListView;
- private ListView mSinkListView;
- private ArrayAdapter