From: Alexander Smorkalov Date: Tue, 18 Sep 2012 06:09:31 +0000 (+0400) Subject: "in use" label update fix in OpenCV Manager UI. X-Git-Tag: accepted/2.0/20130307.220821~364^2~206 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0105d0a241dafc799a1f77c4743124a168583887;p=profile%2Fivi%2Fopencv.git "in use" label update fix in OpenCV Manager UI. --- diff --git a/android/service/engine/src/org/opencv/engine/manager/ManagerActivity.java b/android/service/engine/src/org/opencv/engine/manager/ManagerActivity.java index 6f106d6..6813164 100644 --- a/android/service/engine/src/org/opencv/engine/manager/ManagerActivity.java +++ b/android/service/engine/src/org/opencv/engine/manager/ManagerActivity.java @@ -185,7 +185,7 @@ public class ManagerActivity extends Activity filter.addAction(Intent.ACTION_PACKAGE_INSTALL); filter.addAction(Intent.ACTION_PACKAGE_REMOVED); filter.addAction(Intent.ACTION_PACKAGE_REPLACED); - + registerReceiver(mPackageChangeReciever, filter); } @@ -199,7 +199,11 @@ public class ManagerActivity extends Activity protected void onResume() { super.onResume(); Log.d(TAG, "Filling package list on resume"); - FillPackageList(); + if (!bindService(new Intent("org.opencv.engine.BIND"), mServiceConnection, Context.BIND_AUTO_CREATE)) + { + TextView EngineVersionView = (TextView)findViewById(R.id.EngineVersionValue); + EngineVersionView.setText("not avaliable"); + } } protected SimpleAdapter mInstalledPacksAdapter; @@ -218,9 +222,13 @@ public class ManagerActivity extends Activity @Override public void onReceive(Context context, Intent intent) { - Log.d("OpenCV Manager/Reciever", "Bradcast message " + intent.getAction() + " reciever"); - Log.d("OpenCV Manager/Reciever", "Filling package list on broadcast message"); - FillPackageList(); + Log.d("OpenCVManager/Reciever", "Bradcast message " + intent.getAction() + " reciever"); + Log.d("OpenCVManager/Reciever", "Filling package list on broadcast message"); + if (!bindService(new Intent("org.opencv.engine.BIND"), mServiceConnection, Context.BIND_AUTO_CREATE)) + { + TextView EngineVersionView = (TextView)findViewById(R.id.EngineVersionValue); + EngineVersionView.setText("not avaliable"); + } } }; diff --git a/android/service/engine/src/org/opencv/engine/manager/PackageListAdapter.java b/android/service/engine/src/org/opencv/engine/manager/PackageListAdapter.java index b684ce1..15987da 100644 --- a/android/service/engine/src/org/opencv/engine/manager/PackageListAdapter.java +++ b/android/service/engine/src/org/opencv/engine/manager/PackageListAdapter.java @@ -23,7 +23,6 @@ public class PackageListAdapter extends SimpleAdapter { View view = super.getView(position, convertView, parent); @SuppressWarnings("unchecked") Map item = (Map)getItem(position); - Log.d("PackageListAdapter", item.get("Activity")); if (item.get("Activity") == "y") { view.setBackgroundColor(0x50ffffff);