2013-04-28 Mark Holland <mark@mark-holland.me.uk>

* AndroidMainfest.xml: Set theme to themes.xml, moved permissions
	and uses to top of file.

	* layout/spinner.xml: Theme for spinner that sets text
	color to grey.	

	* values/themes.xml: For setting theme on devices < sdk 11
	(android 3.0)	

	* values-v11/themes.xml: For setting theme on device above
	sdk 11

	* src/pandroid/agent/Setup.java: Set spinnner to use new
	theme for setting text color

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8076 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
markholland 2013-04-28 04:43:12 +00:00
parent a27a539b97
commit 7873e09439
14 changed files with 69 additions and 32 deletions

View File

@ -18,12 +18,29 @@
package="pandroid.agent" package="pandroid.agent"
android:versionCode="2" android:versionCode="2"
android:versionName="1.5"> android:versionName="1.5">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.BATTERY_STATS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.READ_CALL_LOG"/>
<uses-permission android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-feature android:name="android.hardware.sensor.light" />
<uses-feature android:name="android.hardware.location" />
<application android:icon="@drawable/ic_launcher" android:label="@string/app_name"> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name">
<activity <activity
android:name=".PandroidAgent" android:name=".PandroidAgent"
android:label="@string/app_name" android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
android:theme="@android:style/Theme.NoTitleBar" android:theme="@style/MainTheme"
> >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@ -69,20 +86,7 @@
</application> </application>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.BATTERY_STATS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-feature android:name="android.hardware.sensor.light" />
<uses-feature android:name="android.hardware.location" />
<uses-sdk android:minSdkVersion="8"/> <uses-sdk android:minSdkVersion="8"/>
</manifest> </manifest>

View File

@ -1,3 +1,20 @@
2013-04-28 Mark Holland <mark@mark-holland.me.uk>
* AndroidMainfest.xml: Set theme to themes.xml, moved permissions
and uses to top of file.
* layout/spinner.xml: Theme for spinner that sets text
color to grey.
* values/themes.xml: For setting theme on devices < sdk 11
(android 3.0)
* values-v11/themes.xml: For setting theme on device above
sdk 11
* src/pandroid/agent/Setup.java: Set spinnner to use new
theme for setting text color
2013-04-28 Mark Holland <mark@mark-holland.me.uk> 2013-04-28 Mark Holland <mark@mark-holland.me.uk>
* assets/database/pandroid.zip: Removed as no longer needed * assets/database/pandroid.zip: Removed as no longer needed

View File

@ -11,4 +11,4 @@
#proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt #proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt
# Project target. # Project target.
target=android-8 target=android-17

View File

@ -12,8 +12,7 @@
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.-->
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/p" android:id="@+id/p"
android:layout_width="fill_parent" android:layout_width="fill_parent"
@ -26,9 +25,10 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="88dp" android:layout_marginTop="50dp"
android:text="@string/yes" /> android:text="@string/yes" />
<Button <Button
android:id="@+id/no_button" android:id="@+id/no_button"
style="?android:attr/buttonStyleSmall" style="?android:attr/buttonStyleSmall"

View File

@ -31,7 +31,7 @@
<requestFocus /> <requestFocus />
</EditText> </EditText>
<Button <Button
android:id="@+id/password_create_button" android:id="@+id/password_create_button"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -39,7 +39,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/notificationCheck" android:text="@string/notificationCheck"
android:textColor="#bbbbbb" android:textColor="#bbbbbb"
android:textSize="14sp" /> android:textSize="14sp"
android:paddingTop="5sp"/>
<TextView <TextView
android:id="@+id/field1" android:id="@+id/field1"
@ -146,7 +147,8 @@
android:id="@+id/processes_combo" android:id="@+id/processes_combo"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone" /> />
</LinearLayout> </LinearLayout>
<CheckBox <CheckBox

View File

@ -38,7 +38,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/notificationCheck" android:text="@string/notificationCheck"
android:textColor="#bbbbbb" android:textColor="#bbbbbb"
android:textSize="14sp" /> android:textSize="14sp"
android:paddingTop="5sp"/>
<TextView <TextView
android:id="@+id/field1" android:id="@+id/field1"

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="#bdbdbd">
</TextView>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MainTheme" parent="@android:style/Theme.Holo.NoActionBar">
<item name="android:typeface">normal</item>
<item name="android:textSize">15sp</item>
</style>
</resources>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MainTheme" parent="@android:style/Theme.NoTitleBar">
<item name="android:typeface">normal</item>
<item name="android:textSize">15sp</item>
</style>
</resources>

View File

@ -56,7 +56,6 @@ public class Core {
static volatile public String defaultDeviceUpTimeReport = "enabled"; // "disabled" or "enabled" static volatile public String defaultDeviceUpTimeReport = "enabled"; // "disabled" or "enabled"
static volatile public String defaultInventoryReport = "disabled"; // "disabled" or "enabled" static volatile public String defaultInventoryReport = "disabled"; // "disabled" or "enabled"
static volatile public String defaultHelloSignalReport = "enabled"; // "disabled" or "enabled" static volatile public String defaultHelloSignalReport = "enabled"; // "disabled" or "enabled"
//TODO
static volatile public String defaultNotificationCheck = "enabled"; // "disabled" or "enabled" static volatile public String defaultNotificationCheck = "enabled"; // "disabled" or "enabled"
static volatile public boolean defaultHasSim = false; static volatile public boolean defaultHasSim = false;
@ -136,7 +135,6 @@ public class Core {
static volatile public String InventoryReport = defaultRoamingReport; static volatile public String InventoryReport = defaultRoamingReport;
static volatile public String HelloSignalReport = defaultHelloSignalReport; static volatile public String HelloSignalReport = defaultHelloSignalReport;
static volatile public String RoamingReport = defaultRoamingReport; static volatile public String RoamingReport = defaultRoamingReport;
//TODO
static volatile public String NotificationCheck = defaultNotificationCheck; static volatile public String NotificationCheck = defaultNotificationCheck;
//hasSim values //hasSim values
@ -298,7 +296,6 @@ public class Core {
HelloSignalReport = agentPreferences.getString("HelloSignalReport", defaultHelloSignalReport); HelloSignalReport = agentPreferences.getString("HelloSignalReport", defaultHelloSignalReport);
password = agentPreferences.getString("password", defaultPassword); password = agentPreferences.getString("password", defaultPassword);
passwordCheck = agentPreferences.getString("passwordCheck", defaultPasswordCheck); passwordCheck = agentPreferences.getString("passwordCheck", defaultPasswordCheck);
//TODO
NotificationCheck = agentPreferences.getString("NotificationCheck", defaultNotificationCheck); NotificationCheck = agentPreferences.getString("NotificationCheck", defaultNotificationCheck);
hasSim = agentPreferences.getBoolean("hasSim", defaultHasSim); hasSim = agentPreferences.getBoolean("hasSim", defaultHasSim);
//hasSim values //hasSim values
@ -329,7 +326,6 @@ public class Core {
signalStrength, SignalStrengthReport, SMSReceived, ReceivedSMSReport, SMSSent, SentSMSReport, signalStrength, SignalStrengthReport, SMSReceived, ReceivedSMSReport, SMSSent, SentSMSReport,
incomingCalls, IncomingCallsReport, missedCalls, MissedCallsReport, outgoingCalls, OutgoingCallsReport, incomingCalls, IncomingCallsReport, missedCalls, MissedCallsReport, outgoingCalls, OutgoingCallsReport,
receiveBytes, BytesReceivedReport, transmitBytes, BytesSentReport, RoamingReport, roaming, receiveBytes, BytesReceivedReport, transmitBytes, BytesSentReport, RoamingReport, roaming,
//TODO
NotificationCheck NotificationCheck
); );
@ -368,7 +364,6 @@ public class Core {
editor.putString("gpsStatus", _gpsStatus); editor.putString("gpsStatus", _gpsStatus);
editor.putString("BatteryLevelReport", _BatteryLevelReport); editor.putString("BatteryLevelReport", _BatteryLevelReport);
editor.putString("memoryStatus", _memoryStatus); editor.putString("memoryStatus", _memoryStatus);
//TODO
editor.putLong("UpTime", _upTime); editor.putLong("UpTime", _upTime);
editor.putString("DeviceUpTimeReport", _DeviceUpTimeReport); editor.putString("DeviceUpTimeReport", _DeviceUpTimeReport);
editor.putString("InventoryReport", _InventoryReport); editor.putString("InventoryReport", _InventoryReport);
@ -405,7 +400,6 @@ public class Core {
editor.putString("BytesSentReport", _BytesSentReport); editor.putString("BytesSentReport", _BytesSentReport);
editor.putString("RoamingReport", _RoamingReport); editor.putString("RoamingReport", _RoamingReport);
editor.putInt("roaming", _roaming); editor.putInt("roaming", _roaming);
//TODO
editor.putString("NotificationCheck", _NotificationCheck); editor.putString("NotificationCheck", _NotificationCheck);

View File

@ -1129,7 +1129,6 @@ public class PandroidAgentListener extends Service {
return humanDateTime; return humanDateTime;
} }
//TODO
public static void CancelNotification(Context ctx, int notifyId) { public static void CancelNotification(Context ctx, int notifyId) {
String ns = Context.NOTIFICATION_SERVICE; String ns = Context.NOTIFICATION_SERVICE;
NotificationManager nMgr = (NotificationManager) ctx.getSystemService(ns); NotificationManager nMgr = (NotificationManager) ctx.getSystemService(ns);

View File

@ -29,6 +29,7 @@ import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri; import android.net.Uri;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
@ -241,7 +242,7 @@ public class Setup extends Activity {
} }
ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<String>(getApplicationContext(), ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<String>(getApplicationContext(),
android.R.layout.simple_spinner_item, listProcessHuman); R.layout.spinner, listProcessHuman);
combo.setAdapter(spinnerArrayAdapter); combo.setAdapter(spinnerArrayAdapter);
combo.setSelection(position); combo.setSelection(position);
@ -799,7 +800,6 @@ public class Setup extends Activity {
ParentActivity.switchTab(indexTabToSwitchTo); ParentActivity.switchTab(indexTabToSwitchTo);
} }
//TODO
public static void CancelNotification(Context ctx, int notifyId) { public static void CancelNotification(Context ctx, int notifyId) {
String ns = Context.NOTIFICATION_SERVICE; String ns = Context.NOTIFICATION_SERVICE;
NotificationManager nMgr = (NotificationManager) ctx.getSystemService(ns); NotificationManager nMgr = (NotificationManager) ctx.getSystemService(ns);