From 9a7711331b992edb1d313910f521d21c699f66d1 Mon Sep 17 00:00:00 2001 From: markholland Date: Wed, 1 May 2013 02:05:27 +0000 Subject: [PATCH] 2013-05-01 Mark Holland * Connect to new svn git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8092 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- .../res/drawable-hdpi/pandorafms_logo.png | Bin 0 -> 3197 bytes .../res/drawable-mdpi/pandorafms_logo.png | Bin 0 -> 3197 bytes .../res/drawable-xhdpi/pandorafms_logo.png | Bin 0 -> 3197 bytes pandora_agents/android/res/layout/about.xml | 28 +-- pandora_agents/android/res/layout/setup.xml | 3 +- pandora_agents/android/res/layout/status.xml | 53 +++-- .../android/res/layout/statusnosim.xml | 27 ++- pandora_agents/android/res/layout/welcome.xml | 14 +- .../pandroid/agent/PandroidAgentListener.java | 225 +++++++++++------- .../pandroid/agent/PandroidAgentTentacle.java | 2 +- .../android/src/pandroid/agent/Setup.java | 14 +- .../android/src/pandroid/agent/Status.java | 11 +- 12 files changed, 217 insertions(+), 160 deletions(-) create mode 100644 pandora_agents/android/res/drawable-hdpi/pandorafms_logo.png create mode 100644 pandora_agents/android/res/drawable-mdpi/pandorafms_logo.png create mode 100644 pandora_agents/android/res/drawable-xhdpi/pandorafms_logo.png diff --git a/pandora_agents/android/res/drawable-hdpi/pandorafms_logo.png b/pandora_agents/android/res/drawable-hdpi/pandorafms_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..5369386f92eb7fec72898191caf4a7628058c4a5 GIT binary patch literal 3197 zcmV-@41)8CP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#00007bV*G`2ipl9 z3m^h)kpU0@000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000ZvNkl)A%X{3=x8fm1FMjC0P@&63;_pnJ3q3YVo!QD>e zb4iYm&}*)u&W&)+ZHo;)6% zTlz*D5%J%J0B<%tWp>0*3_cdy|6r%ndW&YK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7PEkGEO zRsQwG*3KFf*RgR*DX#&7=S4yWS+VwHQ?FB-mhQ&c0Es*Fr&ReT5g~(2 z=cBIo8vYt5RaL#Ga^Qi^og2I!oHVm&(ZbB4S&KV-bl6mWp4jKBgT6E3)#bgCNF2V^ z;UpZkq1h1zi-1Lh$!7%jFDzSY_qH~sJHIA?_iim(91(UKN(GDW9`bzjuOWbGb8=yp zuW$o-v!-*+BnZmzDSzeH2Uj(H(!(6K{RF&LoH69mB*(>J8;;n}Vq4i(!N1?R`EvEj z7Y_0{D!|l^pnjD~&rwS7aEOZr=O8fm1FMjC0PkwzM6 jq>)A%X{3?Hr-1(hL^u{cKD^$d00000NkvXXu0mjf*%1-m literal 0 HcmV?d00001 diff --git a/pandora_agents/android/res/drawable-mdpi/pandorafms_logo.png b/pandora_agents/android/res/drawable-mdpi/pandorafms_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..5369386f92eb7fec72898191caf4a7628058c4a5 GIT binary patch literal 3197 zcmV-@41)8CP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#00007bV*G`2ipl9 z3m^h)kpU0@000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000ZvNkl)A%X{3=x8fm1FMjC0P@&63;_pnJ3q3YVo!QD>e zb4iYm&}*)u&W&)+ZHo;)6% zTlz*D5%J%J0B<%tWp>0*3_cdy|6r%ndW&YK(BT9KV5LkFfq+~BB0>PjX9PbQ5GtLU zf@z9>7WjqLczNgIutPKtvP~Nonr2 zlV%TpVWat3BENX|Kg_Rf-7rs!69%A&2p|#>Ap$`lU}i-`AQ%7%F3&8Ro|Jh1CwJde z&!PhW6aXPo(Cm;&78IG1Y2~g^q-wQjlf@ZzB=-Io02@CO9`JO{)N$?c<8O64k^V#^ zsqiEsVP+B%1XQrwRDoY*nmL;ycH4f2tv_E_*|fD~)k|^R^+f^+x$Yq%tb9fgK_k4h zPvEjOoleWx&g99PZH^BP8sT>rmv8yTXC?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Zr=O8fm1FMjC0PkwzM6 jq>)A%X{3?Hr-1(hL^u{cKD^$d00000NkvXXu0mjf*%1-m literal 0 HcmV?d00001 diff --git a/pandora_agents/android/res/drawable-xhdpi/pandorafms_logo.png b/pandora_agents/android/res/drawable-xhdpi/pandorafms_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..5369386f92eb7fec72898191caf4a7628058c4a5 GIT binary patch literal 3197 zcmV-@41)8CP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#00007bV*G`2ipl9 z3m^h)kpU0@000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000ZvNkl)A%X{3=x8fm1FMjC0P@&63;_pnJ3q3YVo!QD>e zb4iYm&}*)u&W&)+ZHo;)6% zTlz*D5%J%J0B<%tWp>0*3_cdy|6r%ndW&YK(BT9KV5LkFfq+~BB0>PjX9PbQ5GtLU zf@z9>7WjqLczNgIutPKtvP~Nonr2 zlV%TpVWat3BENX|Kg_Rf-7rs!69%A&2p|#>Ap$`lU}i-`AQ%7%F3&8Ro|Jh1CwJde z&!PhW6aXPo(Cm;&78IG1Y2~g^q-wQjlf@ZzB=-Io02@CO9`JO{)N$?c<8O64k^V#^ zsqiEsVP+B%1XQrwRDoY*nmL;ycH4f2tv_E_*|fD~)k|^R^+f^+x$Yq%tb9fgK_k4h zPvEjOoleWx&g99PZH^BP8sT>rmv8yTXC?dn{ByjQjJhGnhEBi|Mg0{~bw24{_*GN<&lbr)TLAMLxB z?iv14@R1$YGnQU1P?s8ZG2-=$MXRwQ~BueF`LZ4i3iNvR&gw9pX%!phi62BKvR~l zaQ$~jEWe>3P^`~E!hCRBc|7UF2uguONB|*_8l8Xrux}0f{{ByT?=KHMAKu*bdS_C1 z3k%aF!GU+Ei%ov+yI0jjosJ?!%B4;s03cw>^%bpndfcYT=OPaP^S57Jn{c8kRSVs0 zN$RrjsA+$SJOF%U;CCX0{sC7Bga{-NyY1GCD!{@WlU8)=u8{;K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V0FEIc}=Gudph$ckDxwnx)0jhB6@{MxMX; zp{lX#sxL@@r*?hi-lpz`msqqADS)IWc!dODxXQcbjQlFton;mN^W=W_tf;tTYV>FC zKag45u`%LsLV8lWN5)cqnm+K6U`5|)@pEnFsa>~x^H}V|pBu{Xa$`z+LeLD?FD?JW z=gzK1*N=BZ&x-5FT?E6I zznyLMdG4{XzncdD{@ob_07qi=lao3QmxP=)A%JXOpXI%gcMmBiA2XDx1!A0bGJu82 zZ-oA+)2r*)xpU>Dw(S7!TYvN?q3cU#N6$M4JhNxUeT`jpixfyi*v;}@Y6qo0J_tmF z!dCu!cMbi))q`@%ddNIH`Yi!~sMGOqPbKJS2HY87zQ6eC-Zt{w-kIY*I<@UGkRd(2 zgb0Wf1T4d|D^>#Q&swu`Qd`egp7SB!bF_SJ@60b9?%Ml;0x^*{gLkVm1VX7PEkGEO zRsQwG*3KFf*RgR*DX#&7=S4yWS+VwHQ?FB-mhQ&c0Es*Fr&ReT5g~(2 z=cBIo8vYt5RaL#Ga^Qi^og2I!oHVm&(ZbB4S&KV-bl6mWp4jKBgT6E3)#bgCNF2V^ z;UpZkq1h1zi-1Lh$!7%jFDzSY_qH~sJHIA?_iim(91(UKN(GDW9`bzjuOWbGb8=yp zuW$o-v!-*+BnZmzDSzeH2Uj(H(!(6K{RF&LoH69mB*(>J8;;n}Vq4i(!N1?R`EvEj z7Y_0{D!|l^pnjD~&rwS7aEOZr=O8fm1FMjC0PkwzM6 jq>)A%X{3?Hr-1(hL^u{cKD^$d00000NkvXXu0mjf*%1-m literal 0 HcmV?d00001 diff --git a/pandora_agents/android/res/layout/about.xml b/pandora_agents/android/res/layout/about.xml index 5037d62d0b..ae2da085b1 100644 --- a/pandora_agents/android/res/layout/about.xml +++ b/pandora_agents/android/res/layout/about.xml @@ -14,23 +14,21 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. --> - + android:padding="10dip" > + + android:id="@+id/img_logo_about" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_weight="0" + android:contentDescription="@string/about_desc" + android:src="@drawable/pandorafms_logo" /> + + android:maxLines="1" + /> + + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:layout_margin="5dp" > @@ -50,7 +51,7 @@ android:id="@+id/lastContactInfo_label_str" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -59,7 +60,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" - android:padding="5px" + android:padding="5dp" android:src="@drawable/logo" /> @@ -69,7 +70,7 @@ android:layout_height="wrap_content" android:layout_below="@id/lastContactInfo_label_str" android:text="@string/latitude" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -86,7 +87,7 @@ android:layout_height="wrap_content" android:layout_below="@id/latitude_value_str" android:text="@string/longitude" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -103,7 +104,7 @@ android:layout_height="wrap_content" android:layout_below="@id/longitude_value_str" android:text="@string/battery_level" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -153,7 +154,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/task" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -168,7 +169,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/memory" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -180,7 +181,7 @@ @@ -214,7 +215,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/sim_id" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -236,7 +237,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/network_operator" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" android:paddingRight="5dip" /> @@ -259,7 +260,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/network_type" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -282,7 +283,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/phone_type" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -304,7 +305,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/signal_strength" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -326,7 +327,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/sms_received" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -348,7 +349,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/sms_sent" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -370,7 +371,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/incoming_calls" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -392,7 +393,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/missed_calls" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -414,7 +415,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/outgoing_calls" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -436,7 +437,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/receive_bytes" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -458,7 +459,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/transmit_bytes" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -479,7 +480,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/roaming" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> diff --git a/pandora_agents/android/res/layout/statusnosim.xml b/pandora_agents/android/res/layout/statusnosim.xml index cfd311192c..7d6f8d23a5 100644 --- a/pandora_agents/android/res/layout/statusnosim.xml +++ b/pandora_agents/android/res/layout/statusnosim.xml @@ -19,10 +19,12 @@ android:layout_width="fill_parent" android:layout_height="fill_parent" > + + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:layout_margin="5sp" > + @@ -45,23 +47,24 @@ android:id="@+id/lastContactInfo_label_str" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> @@ -77,7 +80,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/longitude" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" android:layout_below="@id/latitude_value_str" /> @@ -92,7 +95,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/battery_level" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" android:layout_below="@id/longitude_value_str" /> @@ -138,7 +141,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/task" - android:textSize="14dip" + android:textSize="14sp" android:textStyle="bold" /> - + - + + + + + + android:textSize="40sp" /> \ No newline at end of file diff --git a/pandora_agents/android/src/pandroid/agent/PandroidAgentListener.java b/pandora_agents/android/src/pandroid/agent/PandroidAgentListener.java index d503d4cc67..e70b092f29 100644 --- a/pandora_agents/android/src/pandroid/agent/PandroidAgentListener.java +++ b/pandora_agents/android/src/pandroid/agent/PandroidAgentListener.java @@ -41,6 +41,10 @@ import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; +import android.hardware.Sensor; +import android.hardware.SensorEvent; +import android.hardware.SensorEventListener; +import android.hardware.SensorManager; import android.database.Cursor; import android.location.Criteria; import android.location.Location; @@ -68,7 +72,13 @@ public class PandroidAgentListener extends Service { Handler h = new Handler(); String lastGpsContactDateTime = ""; - boolean showLastXML = true; + double latitude; + double longitude; + //boolean showLastXML = true; + + + private LocationManager locmgr = null; + @Override public void onCreate() { @@ -222,8 +232,8 @@ public class PandroidAgentListener extends Service { } new contactTask().execute(xml); - - updateValues(); + //TODO ensure not a problem + //updateValues(); }//end contact @@ -270,7 +280,7 @@ public class PandroidAgentListener extends Service { file.delete(); if (Core.helloSignal >= 1) Core.helloSignal = 0; - Core.updateConf(getApplicationContext()); + Core.updateConf(getApplicationContext()); } if(tentacleRet == -1){ @@ -308,7 +318,6 @@ public class PandroidAgentListener extends Service { File file = new File("/data/data/pandroid.agent/files/" + buffer[i]); bufferSize += file.length(); } - Log.d("Buffer size:",""+bufferSize); //Check if size of buffer is less than a value if((bufferSize/1024) < Core.bufferSize){ @@ -551,67 +560,101 @@ public class PandroidAgentListener extends Service { return module_xml; } - private void gpsLocation() { - // Starts with GPS, if no GPS then gets network location - - LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); - List providers = lm.getProviders(true); - Log.d("PANDROID providers count", "" + providers.size()); - - /* Loop over the array backwards, and if you get an accurate location, then break out the loop*/ - Location loc = null; - - for (int i=providers.size()-1; i>=0; i--) { - Log.d("PANDROID providers", providers.get(i)); - loc = lm.getLastKnownLocation(providers.get(i)); - if (loc != null) break; - } - - if (loc != null) { - Log.d("PANDROID", "loc != null"); - //if(latitude != loc.getLatitude() || longitude != loc.getLongitude()) { - lastGpsContactDateTime = getHumanDateTime(-1); - //} - putSharedData("PANDROID_DATA", "latitude", Double.valueOf(loc.getLatitude()).toString(), "float"); - putSharedData("PANDROID_DATA", "longitude", Double.valueOf(loc.getLongitude()).toString(), "float"); - } - else { - Criteria criteria = new Criteria(); - criteria.setAccuracy(Criteria.ACCURACY_COARSE); - criteria.setPowerRequirement(Criteria.POWER_LOW); - criteria.setAltitudeRequired(false); - criteria.setBearingRequired(false); - criteria.setCostAllowed(true); - String bestProvider = lm.getBestProvider(criteria, true); - - // If not provider found, abort GPS retrieving - if (bestProvider == null) { - Log.e("LOCATION", "No location provider found!"); - return; - } - - lm.requestLocationUpdates(bestProvider, Core.defaultInterval, 1000, - new LocationListener() { - public void onLocationChanged(Location location) { - putSharedData("PANDROID_DATA", "latitude", - Double.valueOf(location.getLatitude()).toString(), "float"); - putSharedData("PANDROID_DATA", "longitude", - Double.valueOf(location.getLongitude()).toString(), "float"); - } - public void onStatusChanged(String s, int i, Bundle bundle) { - - } - public void onProviderEnabled(String s) { - // try switching to a different provider - } - public void onProviderDisabled(String s) { - putSharedData("PANDROID_DATA", "enabled_location_provider", - "disabled", "string"); - } - }); - } + private void gpsLocation(){ - } + + //Start a location listener + LocationListener onLocationChange=new LocationListener() { + public void onLocationChanged(Location loc) { + Log.d("latitude",""+loc.getLatitude()); + Log.d("Longitude",""+loc.getLongitude()); + + } + + public void onProviderDisabled(String provider) { + // required for interface, not used + } + + public void onProviderEnabled(String provider) { + // required for interface, not used + } + + public void onStatusChanged(String provider, int status, + Bundle extras) { + // required for interface, not used + } + }; + + locmgr.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,10000.0f,onLocationChange); + + } + + +// private void gpsLocation() { +// // Starts with GPS, if no GPS then gets network location +// +// LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); +// List providers = lm.getProviders(true); +// Log.d("PANDROID providers count", "" + providers.size()); +// +//// /* Loop over the array backwards, and if you get an accurate location, then break out the loop*/ +//// Location loc = null; +//// +//// for (int i=providers.size()-1; i>=0; i--) { +//// Log.d("PANDROID providers", providers.get(i)); +//// loc = lm.getLastKnownLocation(providers.get(i)); +//// if (loc != null) break; +//// } +//// +//// if (loc != null) { +//// Log.d("PANDROID", "loc != null"); +//// //if(latitude != loc.getLatitude() || longitude != loc.getLongitude()) { +//// lastGpsContactDateTime = getHumanDateTime(-1); +//// //`} +//// Log.d("LATITUDE",Double.valueOf(loc.getLatitude()).toString()); +//// Log.d("LONGITUDE",Double.valueOf(loc.getLongitude()).toString()); +//// putSharedData("PANDROID_DATA", "latitude", Double.valueOf(loc.getLatitude()).toString(), "float"); +//// putSharedData("PANDROID_DATA", "longitude", Double.valueOf(loc.getLongitude()).toString(), "float"); +//// } +//// else { +// Criteria criteria = new Criteria(); +// criteria.setAccuracy(Criteria.ACCURACY_COARSE); +// criteria.setPowerRequirement(Criteria.POWER_LOW); +// criteria.setAltitudeRequired(false); +// criteria.setBearingRequired(false); +// criteria.setCostAllowed(true); +// String bestProvider = lm.getBestProvider(criteria, true); +// +// // If not provider found, abort GPS retrieving +// if (bestProvider == null) { +// Log.e("LOCATION", "No location provider found!"); +// return; +// } +// +// lm.requestLocationUpdates(bestProvider, Core.defaultInterval, 1000, +// new LocationListener() { +// public void onLocationChanged(Location location) { +// Log.d("Best latitude", Double.valueOf(location.getLatitude()).toString()); +// putSharedData("PANDROID_DATA", "latitude", +// Double.valueOf(location.getLatitude()).toString(), "float"); +// Log.d("Best longitude", Double.valueOf(location.getLongitude()).toString()); +// putSharedData("PANDROID_DATA", "longitude", +// Double.valueOf(location.getLongitude()).toString(), "float"); +// } +// public void onStatusChanged(String s, int i, Bundle bundle) { +// +// } +// public void onProviderEnabled(String s) { +// // try switching to a different provider +// } +// public void onProviderDisabled(String s) { +// putSharedData("PANDROID_DATA", "enabled_location_provider", +// "disabled", "string"); +// } +// }); +// //} +// +// } private void batteryLevel() { @@ -1137,30 +1180,30 @@ public class PandroidAgentListener extends Service { - /////////////////////////////////////////// - // Getting values from device functions - /////////////////////////////////////////// - - public class MyLocationListener implements LocationListener { - - @Override - public void onLocationChanged(Location loc) { - putSharedData("PANDROID_DATA", "latitude", Double.valueOf(loc.getLatitude()).toString(), "float"); - putSharedData("PANDROID_DATA", "longitude", Double.valueOf(loc.getLongitude()).toString(), "float"); - } - - @Override - public void onProviderDisabled(String provider) { - } - - @Override - public void onProviderEnabled(String provider) { - } - - - @Override - public void onStatusChanged(String provider, int status, Bundle extras) { - } - - }/* End of Class MyLocationListener */ +// /////////////////////////////////////////// +// // Getting values from device functions +// /////////////////////////////////////////// +// +// public class MyLocationListener implements LocationListener { +// +// @Override +// public void onLocationChanged(Location loc) { +// putSharedData("PANDROID_DATA", "latitude", Double.valueOf(loc.getLatitude()).toString(), "float"); +// putSharedData("PANDROID_DATA", "longitude", Double.valueOf(loc.getLongitude()).toString(), "float"); +// } +// +// @Override +// public void onProviderDisabled(String provider) { +// } +// +// @Override +// public void onProviderEnabled(String provider) { +// } +// +// +// @Override +// public void onStatusChanged(String provider, int status, Bundle extras) { +// } +// +// }/* End of Class MyLocationListener */ } diff --git a/pandora_agents/android/src/pandroid/agent/PandroidAgentTentacle.java b/pandora_agents/android/src/pandroid/agent/PandroidAgentTentacle.java index f36ffcea06..dac11115d5 100755 --- a/pandora_agents/android/src/pandroid/agent/PandroidAgentTentacle.java +++ b/pandora_agents/android/src/pandroid/agent/PandroidAgentTentacle.java @@ -192,7 +192,7 @@ class tentacle_client { } private void log (String msg) { - Log.e("Tentacle",msg); + //Log.e("Tentacle",msg); //Context context = getApplicationContext(); //int duration = Toast.LENGTH_SHORT; diff --git a/pandora_agents/android/src/pandroid/agent/Setup.java b/pandora_agents/android/src/pandroid/agent/Setup.java index 525994c6ca..f0255758ad 100644 --- a/pandora_agents/android/src/pandroid/agent/Setup.java +++ b/pandora_agents/android/src/pandroid/agent/Setup.java @@ -29,8 +29,8 @@ import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.net.Uri; import android.os.AsyncTask; -import android.os.Build; import android.os.Bundle; +import android.os.Handler; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; @@ -53,6 +53,8 @@ import android.widget.Toast; public class Setup extends Activity { + Handler h = new Handler(); + private HashMap listProcesses; @Override @@ -60,7 +62,8 @@ public class Setup extends Activity { super.onCreate(savedInstanceState); listProcesses = new HashMap(); - Core.loadConf(getApplicationContext()); + //TODO removed to improve performance, untested + //Core.loadConf(getApplicationContext()); } public void onResume() { @@ -71,10 +74,11 @@ public class Setup extends Activity { else setContentView(R.layout.setupnosim); - loadViews(); + loadViews(); loadInBackgroundProcessInExecution(); - setButtonEvents(); - + setButtonEvents(); + + if(Core.password.equals(Core.defaultPassword)) { if(Core.passwordCheck.equals("enabled")) diff --git a/pandora_agents/android/src/pandroid/agent/Status.java b/pandora_agents/android/src/pandroid/agent/Status.java index 6b497a9cd1..10344b0694 100644 --- a/pandora_agents/android/src/pandroid/agent/Status.java +++ b/pandora_agents/android/src/pandroid/agent/Status.java @@ -40,9 +40,9 @@ public class Status extends Activity { else setContentView(R.layout.statusnosim); - Core.loadLastValues(getApplicationContext()); - showLastValues(); - updateLastContactInfo(); +// Core.loadLastValues(getApplicationContext()); +// showLastValues(); +// updateLastContactInfo(); //setButtonEvents(); } //TODO maybe remove duplicate from onCreate @@ -54,10 +54,13 @@ public class Status extends Activity { setContentView(R.layout.status); else setContentView(R.layout.statusnosim); - + Core.loadLastValues(getApplicationContext()); + showLastValues(); + updateLastContactInfo(); + } public void onStart(){