diff --git a/.gitignore b/.gitignore index 7c39332..a6a8540 100755 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ build/ # .idea/workspace.xml # Local configuration file (sdk path, etc) local.properties +gradle.properties keystore.properties # Windows thumbnail db .DS_Store diff --git a/androidCommon/build.gradle b/androidCommon/build.gradle deleted file mode 100755 index 4e45e09..0000000 --- a/androidCommon/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -apply plugin: 'com.android.library' - -android { - compileSdkVersion 25 - buildToolsVersion "25.0.3" - - defaultConfig { - minSdkVersion 8 - targetSdkVersion 25 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' - } - } -} - -dependencies { - - ext { - supportLibVersion = '23.4.0' - } - - compile "com.android.support:support-v4:${supportLibVersion}" - compile "com.android.support:appcompat-v7:${supportLibVersion}" - compile 'com.google.code.gson:gson:2.4' - compile files('libs/RootTools-3.4.jar') - compile files('libs/jackson-all-1.9.11.jar') -} diff --git a/androidCommon/libs/ROOTTOOLS_LICENSE b/androidCommon/libs/ROOTTOOLS_LICENSE deleted file mode 100755 index d645695..0000000 --- a/androidCommon/libs/ROOTTOOLS_LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/androidCommon/libs/android-support-v4.jar b/androidCommon/libs/android-support-v4.jar deleted file mode 100755 index aa0b1a5..0000000 Binary files a/androidCommon/libs/android-support-v4.jar and /dev/null differ diff --git a/androidCommon/libs/android-support-v7-appcompat.jar b/androidCommon/libs/android-support-v7-appcompat.jar deleted file mode 100755 index f9ad396..0000000 Binary files a/androidCommon/libs/android-support-v7-appcompat.jar and /dev/null differ diff --git a/androidCommon/libs/gson-2.2.2.jar b/androidCommon/libs/gson-2.2.2.jar deleted file mode 100755 index f2108e0..0000000 Binary files a/androidCommon/libs/gson-2.2.2.jar and /dev/null differ diff --git a/androidCommon/libs/jackson-all-1.9.11.jar b/androidCommon/libs/jackson-all-1.9.11.jar deleted file mode 100755 index 4ad3095..0000000 Binary files a/androidCommon/libs/jackson-all-1.9.11.jar and /dev/null differ diff --git a/androidCommon/lint.xml b/androidCommon/lint.xml deleted file mode 100755 index a6e4d14..0000000 --- a/androidCommon/lint.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/androidCommon/proguard-rules.txt b/androidCommon/proguard-rules.txt deleted file mode 100755 index 590d0b3..0000000 --- a/androidCommon/proguard-rules.txt +++ /dev/null @@ -1,20 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /Users/willi/android-sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} -# Allow obfuscation of android.support.v7.internal.view.menu.** -# to avoid problem on Samsung 4.2.2 devices with appcompat v21 -# see https://code.google.com/p/android/issues/detail?id=78377 diff --git a/androidCommon/src/main/AndroidManifest.xml b/androidCommon/src/main/AndroidManifest.xml deleted file mode 100755 index 6a8b267..0000000 --- a/androidCommon/src/main/AndroidManifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/androidCommon/src/main/java/com/asksven/android/common/AppRater.java b/androidCommon/src/main/java/com/asksven/android/common/AppRater.java deleted file mode 100644 index a2384a7..0000000 --- a/androidCommon/src/main/java/com/asksven/android/common/AppRater.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * - */ -package com.asksven.android.common; - - -import com.asksven.android.common.privateapiproxies.R; - -import android.app.Dialog; -import android.content.Context; -import android.content.Intent; -import android.content.SharedPreferences; -import android.net.Uri; -import android.view.View; -import android.view.Window; -import android.widget.Button; -import android.widget.LinearLayout; -import android.widget.TextView; - -/** - * @author sven From - * http://www.androidsnippets.com/prompt-engaged-users-to-rate-your-app-in-the-android-market-appirater - * Make sure to add following to strings.xml - * AndroidCommon - * com.asksven.androidcommon - * Remind me later - * Rate - * No, thanks - * If you enjoy using %s, please take a moment to rate it. Thanks for your support! - * - * To test it and to tweak the dialog appearence, you can call AppRater.showRateDialog(this, null) - * from your Activity. - * - * Normal use is to invoke AppRater.app_launched(this) each time your activity is invoked - * (eg. from within the onCreate method). If all conditions are met, the dialog appears. - */ -public class AppRater -{ - private final static int DAYS_UNTIL_PROMPT = 3; - private final static int LAUNCHES_UNTIL_PROMPT = 7; - - public static void app_launched(Context ctx) - { - SharedPreferences prefs = ctx.getSharedPreferences("apprater", 0); - - SharedPreferences.Editor editor = prefs.edit(); - - if (prefs.getBoolean("dontshowagain", false)) - { - return; - } - - - - // Increment launch counter - long launch_count = prefs.getLong("launch_count", 0) + 1; - editor.putLong("launch_count", launch_count); - - // Get date of first launch - Long date_firstLaunch = prefs.getLong("date_firstlaunch", 0); - if (date_firstLaunch == 0) - { - date_firstLaunch = System.currentTimeMillis(); - editor.putLong("date_firstlaunch", date_firstLaunch); - } - - // Wait at least n days before opening - if (launch_count >= LAUNCHES_UNTIL_PROMPT) - { - if (System.currentTimeMillis() >= date_firstLaunch + (DAYS_UNTIL_PROMPT * 24 * 60 * 60 * 1000)) - { - showRateDialog(ctx, editor); - } - } - - editor.commit(); - } - - public static void showRateDialog(final Context ctx, final SharedPreferences.Editor editor) - { - - final Dialog dialog = new Dialog(ctx); - dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); - dialog.setContentView(R.layout.dialog_rate); - - TextView dialogTitle = (TextView) dialog.findViewById(R.id.dialog_title); - dialogTitle.setText(ctx.getString(R.string.label_button_rate) + " " + ctx.getString(R.string.app_name)); - - Button buttonRate = (Button) dialog.findViewById(R.id.buttonRate); - buttonRate.setText(ctx.getString(R.string.label_button_rate)); - buttonRate.setOnClickListener(new Button.OnClickListener() - { - public void onClick(View v) - { - ctx.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + ctx.getString(R.string.app_pname)))); - if (editor != null) - { - editor.putBoolean("dontshowagain", true); - editor.commit(); - } - dialog.dismiss(); - } - }); - - Button buttonRemind = (Button) dialog.findViewById(R.id.buttonRemind); - buttonRemind.setText(R.string.label_button_remind); - buttonRemind.setOnClickListener(new Button.OnClickListener() - { - public void onClick(View v) - { - dialog.dismiss(); - } - }); - - Button buttonNoThanks = (Button) dialog.findViewById(R.id.buttonNoThanks); - buttonNoThanks.setText(R.string.label_button_no_thanks); - buttonNoThanks.setOnClickListener(new Button.OnClickListener() - { - public void onClick(View v) - { - if (editor != null) - { - editor.putBoolean("dontshowagain", true); - editor.commit(); - } - dialog.dismiss(); - } - }); - - dialog.show(); - } -} diff --git a/androidCommon/src/main/java/com/asksven/android/common/ReadmeActivity.java b/androidCommon/src/main/java/com/asksven/android/common/ReadmeActivity.java deleted file mode 100644 index 0ac6bab..0000000 --- a/androidCommon/src/main/java/com/asksven/android/common/ReadmeActivity.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 2011 asksven - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.asksven.android.common; - - -import com.asksven.android.common.privateapiproxies.R; - -import android.app.Activity; -import android.content.Intent; -import android.net.Uri; -import android.os.Bundle; -import android.view.View; -import android.webkit.WebSettings; -import android.webkit.WebView; -import android.widget.Button; - -/** - * - * @author sven - * - * Add following strings to your app - * Other Apps - * Dismiss - * Follow me - * https://twitter.com/#!/asksven - * market://search?q=com.asksven - * - * and the activity to your manifest - * - */ -public class ReadmeActivity extends Activity -{ - /** - * @see android.app.Activity#onCreate(Bundle) - */ - @Override - protected void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - - setContentView(R.layout.readmewebview); - - WebView browser = (WebView)findViewById(R.id.webview); - - WebSettings settings = browser.getSettings(); - settings.setJavaScriptEnabled(true); - - // retrieve any passed data (filename) - String strFilename = getIntent().getStringExtra("filename"); - String strURL = getIntent().getStringExtra("url"); - - // if a URL is passed open it - // if not open a local file - if ( (strURL == null) || (strURL.equals("")) ) - { - if (strFilename.equals("")) - { - browser.loadUrl("file:///android_asset/help.html"); - } - else - { - browser.loadUrl("file:///android_asset/" + strFilename); - } - } - else - { - browser.loadUrl(strURL); - } - - final Button buttonClose = (Button) findViewById(R.id.buttonClose); - buttonClose.setOnClickListener(new View.OnClickListener() - { - public void onClick(View v) - { - finish(); - } - }); - - final Button buttonRate = (Button) findViewById(R.id.buttonMarket); - buttonRate.setOnClickListener(new View.OnClickListener() - { - public void onClick(View v) - { - openURL(ReadmeActivity.this.getString(R.string.market_link)); - finish(); - } - }); - final Button buttonFollow = (Button) findViewById(R.id.buttonTwitter); - buttonFollow.setOnClickListener(new View.OnClickListener() - { - public void onClick(View v) - { - openURL(ReadmeActivity.this.getString(R.string.twitter_link)); - finish(); - } - }); - - } - - public void openURL( String inURL ) - { - Intent browse = new Intent( Intent.ACTION_VIEW , Uri.parse( inURL ) ); - - startActivity( browse ); - } - -} diff --git a/androidCommon/src/main/java/com/asksven/android/common/Shell.java b/androidCommon/src/main/java/com/asksven/android/common/Shell.java deleted file mode 100755 index 9c1888d..0000000 --- a/androidCommon/src/main/java/com/asksven/android/common/Shell.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2014 asksven - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.asksven.android.common; - -import java.util.List; -import junit.framework.TestCase; - -/** - * @author sven - */ -public class Shell extends TestCase { - public void testShell() { - List res = NonRootShell.getInstance().run("ls -l /"); - assertTrue(res != null); - assertTrue(!res.isEmpty()); - } -} diff --git a/androidCommon/src/main/java/com/asksven/android/common/kernelutils/AlarmDumpsysTests.java b/androidCommon/src/main/java/com/asksven/android/common/kernelutils/AlarmDumpsysTests.java deleted file mode 100755 index 73d2179..0000000 --- a/androidCommon/src/main/java/com/asksven/android/common/kernelutils/AlarmDumpsysTests.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * - */ -package com.asksven.android.common.kernelutils; - -import com.asksven.android.common.privateapiproxies.StatElement; -import java.util.ArrayList; -import junit.framework.TestCase; - -/** - * @author sven - */ -public class AlarmDumpsysTests extends TestCase { - - static ArrayList getTestData_4_3() { - ArrayList myRet = new ArrayList() {{ - add("Alarm Stats:"); - add(" android +1m35s119ms running, 67 wakeups:"); - add(" +39s818ms 0 wakes 9 alarms: act=com.android.server.action.NETWORK_STATS_POLL"); - add(" +4s693ms 8 wakes 8 alarms: act=android.appwidget.action.APPWIDGET_UPDATE cmp={com.devexpert.weather/com.devexpert.weather.view.WidgetWeather5x2}"); - add(" com.google.android.gsf +5s50ms running, 30 wakeups:"); - add(" +5s50ms 30 wakes 30 alarms: cmp={com.google.android.gsf/com.google.android.gsf.checkin.EventLogService$Receiver}"); - add(" com.android.vending +46ms running, 4 wakeups:"); - add(" +29ms 1 wakes 1 alarms: cmp={com.android.vending/com.google.android.finsky.services.DailyHygiene}"); - add(" +17ms 3 wakes 3 alarms: cmp={com.android.vending/com.google.android.finsky.services.ContentSyncService}"); - }}; - return myRet; - } - - static ArrayList getTestData_4_2() { - ArrayList myRet = new ArrayList() {{ - add("Alarm Stats:"); - add(" com.google.android.gsf"); - add(" 8417ms running, 204 wakeups"); - add(" 17 alarms: act=com.google.android.intent.action.GTALK_RECONNECT flg=0x4"); - add(" 187 alarms: flg=0x4"); - add(" com.carl.trafficcounter"); - add(" 446486ms running, 5584 wakeups"); - add(" 5584 alarms: act=com.carl.trafficcounter.UPDATE_RUN flg=0x4"); - }}; - - return myRet; - } - - static ArrayList getTestData_2_3_7() { - ArrayList myRet = new ArrayList() {{ - add("Alarm Stats:"); - add(" com.google.android.gsf"); - add(" Realtime wakeup (now=2014-07-01 13:18:57):"); - add(" RTC_WAKEUP #13: Alarm{409bfb70 type 0 com.google.android.gms}"); - add(" type=0 when=+5d7h36m8s686ms repeatInterval=579075000 count=0"); - add(" operation=PendingIntent{409e0ca0: PendingIntentRecord{40906778 com.google.android.gms broadcastIntent}}"); - add(" RTC_WAKEUP #12: Alarm{40a8fbb8 type 0 com.google.android.gms}"); - add(" type=0 when=+5d7h36m8s686ms repeatInterval=579075000 count=0"); - add(" operation=PendingIntent{40985ef8: PendingIntentRecord{40977218 com.google.android.gms broadcastIntent}}"); - add(" Alarm Stats:"); - add(" com.google.android.gsf"); - add(" 73040ms running, 38 wakeups"); - add(" 13 alarms: act=com.google.android.intent.action.GTALK_RECONNECT flg=0x4"); - add(" 25 alarms: act=com.google.android.intent.action.GTALK_HEARTBEAT flg=0x4"); - add(" com.android.vending"); - add(" 642ms running, 10 wakeups"); - add(" 4 alarms: flg=0x4 cmp=com.android.vending/com.google.android.finsky.services.DailyHygiene"); - add(" 6 alarms: flg=0x4 cmp=com.android.vending/com.google.android.finsky.services.ContentSyncService"); - add(" android"); - add(" 651712ms running, 44 wakeups"); - add(" 2 alarms: act=android.intent.action.DATE_CHANGED flg=0x20000004"); - add(" 1112 alarms: act=android.intent.action.TIME_TICK flg=0x40000004"); - add(" 110 alarms: act=com.android.server.ThrottleManager.action.POLL flg=0x4"); - add(" 27 alarms: act=android.net.wifi.DHCP_RENEW flg=0x4"); - add(" 4 alarms: act=android.bluetooth.profile_state.CONNECT flg=0x4"); - add(" 6 alarms: act=android.content.syncmanager.SYNC_ALARM flg=0x4"); - add(" 7 alarms: act=com.android.internal.policy.impl.KeyguardViewMediator.DELAYED_KEYGUARD flg=0x4"); - add(" com.quoord.tapatalkpro.activity"); - add(" 9573ms running, 36 wakeups"); - add(" 36 alarms: flg=0x4"); -/* com.android.providers.calendar - 8348ms running, 13 wakeups - 1 alarms: act=android.intent.action.EVENT_REMINDER dat=content://com.android.calendar/1404212922000 flg=0x4 - 2 alarms: act=android.intent.action.EVENT_REMINDER dat=content://com.android.calendar/1404154819000 flg=0x4 - 2 alarms: act=android.intent.action.EVENT_REMINDER dat=content://com.android.calendar/1404210053000 flg=0x4 - 5 alarms: act=com.android.providers.calendar.SCHEDULE_ALARM flg=0x4 - 2 alarms: act=android.intent.action.EVENT_REMINDER dat=content://com.android.calendar/1404151203000 flg=0x4 - 1 alarms: act=android.intent.action.EVENT_REMINDER dat=content://com.android.calendar/1404153003000 flg=0x4 - com.viber.voip - 31314ms running, 111 wakeups - 110 alarms: act=com.viber.voip.action.KEEP_ALIVE_RECEIVE flg=0x4 - 1 alarms: act=com.viber.voip.action.VERSION_CHECK flg=0x4 - org.sipdroid.sipua - 7413ms running, 144 wakeups - 144 alarms: flg=0x4 - com.android.deskclock - 1189ms running, 1 wakeups - 1 alarms: act=com.android.deskclock.ALARM_ALERT flg=0x4 - com.google.android.gms - 94959ms running, 67 wakeups - 47 alarms: flg=0x4 - 1 alarms: act=com.google.android.gms.icing.INDEX_RECURRING_MAINTENANCE flg=0x4 cmp=com.google.android.gms/.icing.service.IndexWorkerService - 24 alarms: act=com.google.android.intent.action.SEND_IDLE flg=0x4 - 5 alarms: act=com.google.android.intent.action.GCM_RECONNECT flg=0x4 - com.android.phone - 387ms running, 4 wakeups - 4 alarms: act=com.android.phone.PhoneApp.ACTION_VIBRATE_45 flg=0x4 -*/ - }}; - return myRet; - } - - static ArrayList getTestData_4_4_4() { - ArrayList myRet = new ArrayList() {{ - add(" Alarm Stats:"); - add(" com.android.keyguard +246ms running, 6 wakeups:"); - add(" +246ms 6 wakes 6 alarms: act=com.android.internal.policy.impl.PhoneWindowManager.DELAYED_KEYGUARD"); - add(" com.cyanogenmod.lockclock +4ms running, 0 wakeups:"); - add(" +4ms 0 wakes 2 alarms: act=com.cyanogenmod.lockclock.action.FORCE_WEATHER_UPDATE cmp={com.cyanogenmod.lockclock/com.cyanogenmod.lockclock.weather.WeatherUpdateService}"); - add(" android +1m23s914ms running, 10 wakeups:"); - add(" +1m21s585ms 0 wakes 446 alarms: act=android.intent.action.TIME_TICK"); - add(" +7s372ms 0 wakes 38 alarms: act=com.android.server.action.NETWORK_STATS_POLL"); - add(" +1s213ms 0 wakes 1 alarms: act=android.intent.action.DATE_CHANGED"); - add(" +763ms 6 wakes 6 alarms: act=android.content.syncmanager.SYNC_ALARM"); - add(" +205ms 3 wakes 3 alarms: act=com.android.server.IdleMaintenanceService.action.UPDATE_IDLE_MAINTENANCE_STATE"); - add(" +135ms 0 wakes 1 alarms: act=com.android.server.NetworkTimeUpdateService.action.POLL"); - add(" +134ms 1 wakes 1 alarms: act=android.net.ConnectivityService.action.PKT_CNT_SAMPLE_INTERVAL_ELAPSED"); - add(" com.android.deskclock +24s199ms running, 0 wakeups:"); - add(" +24s199ms 0 wakes 63 alarms: act=com.android.deskclock.ON_QUARTER_HOUR"); - add(" com.google.android.gms +51s865ms running, 0 wakeups:"); - add(" +34s205ms 0 wakes 2 alarms: cmp={com.google.android.gms/com.google.android.gms.playlog.uploader.UploaderAlarmReceiver}"); - add(" +17s530ms 0 wakes 10 alarms: cmp={com.google.android.gms/com.google.android.gms.common.download.DownloadAlarmReceiver}"); - add(" +88ms 0 wakes 2 alarms: cmp={com.google.android.gms/com.google.android.gms.security.snet.SnetService}"); - add(" +42ms 0 wakes 1 alarms: act=com.google.android.gms.icing.INDEX_RECURRING_MAINTENANCE cmp={com.google.android.gms/com.google.android.gms.icing.service.IndexWorkerService}"); - add(" com.touchtype.swiftkey +34s244ms running, 0 wakeups:"); - add(" +32s314ms 0 wakes 1 alarms: act=com.touchtype.ACTION_SCHEDULED_JOB cmp={com.touchtype.swiftkey/com.touchtype.CustomUpdaterScheduledJob}"); - add(" +1s855ms 0 wakes 3 alarms: act=com.touchtype.ACTION_SCHEDULED_JOB cmp={com.touchtype.swiftkey/com.touchtype.RefreshLanguageConfigurationScheduledJob}"); - add(" +75ms 0 wakes 1 alarms: act=com.touchtype.ACTION_SCHEDULED_JOB cmp={com.touchtype.swiftkey/com.touchtype.KeyboardUsesDailyScheduledJob}"); - add(" +2ms 0 wakes 1 alarms: cmp={com.touchtype.swiftkey/com.touchtype.ReferrerRegistrationService}"); - add(" com.android.phone +189ms running, 0 wakeups:"); - add(" +189ms 0 wakes 2 alarms: act=com.android.phone.UPDATE_CALLER_INFO_CACHE cmp={com.android.phone/com.android.phone.CallerInfoCacheUpdateReceiver}"); - }}; - return myRet; - } - - /** - * Test method for {@link com.asksven.android.common.kernelutils.AlarmsDumpsys#getAlarms()}. - */ - public void testGetAlarms() { - ArrayList test4_3 = AlarmsDumpsys.getAlarmsFrom_4_3(getTestData_4_3()); - assertNotNull(test4_3); - assertTrue(test4_3.size() > 1); - System.out.print(test4_3); - - ArrayList test2_3_7 = AlarmsDumpsys.getAlarmsPriorTo_4_2_2(getTestData_2_3_7()); - assertNotNull(test2_3_7); - assertTrue(test2_3_7.size() > 1); - System.out.print(test2_3_7); - - ArrayList test4_4_4 = AlarmsDumpsys.getAlarmsFrom_4_3(getTestData_4_4_4()); - assertNotNull(test4_4_4); - assertTrue(test4_4_4.size() > 1); - System.out.print(test4_4_4); - } -} diff --git a/androidCommon/src/main/java/com/asksven/android/common/kernelutils/NetstatsTests.java b/androidCommon/src/main/java/com/asksven/android/common/kernelutils/NetstatsTests.java deleted file mode 100755 index 1af8af4..0000000 --- a/androidCommon/src/main/java/com/asksven/android/common/kernelutils/NetstatsTests.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * - */ -package com.asksven.android.common.kernelutils; - -import com.asksven.android.common.privateapiproxies.StatElement; -import java.util.ArrayList; -import java.util.List; -import junit.framework.TestCase; - -/** - * @author sven - */ -public class NetstatsTests extends TestCase { - - static ArrayList getTestData_1() { - ArrayList myRet = new ArrayList() {{ - add("idx iface acct_tag_hex uid_tag_int cnt_set rx_bytes rx_packets tx_bytes tx_packets rx_tcp_bytes rx_tcp_packets rx_udp_bytes rx_udp_packets rx_other_bytes rx_other_packets tx_tcp_bytes tx_tcp_packets tx_udp_bytes tx_udp_packets tx_other_bytes tx_other_packets"); - add("2 rmnet0 0x0 10054 0 126043 536 83128 521 126043 536 0 0 0 0 83128 521 0 0 0 0"); - add("3 rmnet0 0x0 10054 1 797329 826 84364 551 797329 826 0 0 0 0 84364 551 0 0 0 0"); - add("4 rmnet0 0x1010000000000000 10054 0 113846 407 75741 372 113846 407 0 0 0 0 75741 372 0 0 0 0"); - add("5 rmnet0 0x1010000000000000 10054 1 9618 41 12646 43 9618 41 0 0 0 0 12646 43 0 0 0 0"); - add("6 rmnet0 0xffffff0100000000 10054 0 7595 14 1663 14 7595 14 0 0 0 0 1663 14 0 0 0 0"); - add("7 rmnet0 0xffffff0100000000 10054 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"); - add("8 wlan0 0x0 10054 0 130404 350 72333 387 130404 350 0 0 0 0 72333 387 0 0 0 0"); - add("9 wlan0 0x0 10054 1 66344 113 24746 124 66344 113 0 0 0 0 24746 124 0 0 0 0"); - add("10 wlan0 0x1010000000000000 10054 0 107098 302 64738 321 107098 302 0 0 0 0 64738 321 0 0 0 0"); - add("11 wlan0 0x1010000000000000 10054 1 12130 69 20782 74 12130 69 0 0 0 0 20782 74 0 0 0 0"); - add("12 wlan0 0xffffff0100000000 10054 0 21831 27 3570 26 21831 27 0 0 0 0 3570 26 0 0 0 0"); - add("13 wlan0 0xffffff0100000000 10054 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"); - add("14 wlan0 0xffffff0300000000 10054 0 591 4 2117 4 591 4 0 0 0 0 2117 4 0 0 0 0"); - add("15 wlan0 0xffffff0300000000 10054 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"); - }}; - return myRet; - } - - /** - * Test method for {@link com.asksven.android.common.kernelutils.Netstats#parseNetstats(List))}. - */ - public void testGetAlarms() { - ArrayList test1 = Netstats.parseNetstats(getTestData_1()); - assertNotNull(test1); - assertTrue(test1.size() > 1); - System.out.print(test1); - } -} diff --git a/androidCommon/src/main/res/drawable-hdpi/icon.png b/androidCommon/src/main/res/drawable-hdpi/icon.png deleted file mode 100755 index 8074c4c..0000000 Binary files a/androidCommon/src/main/res/drawable-hdpi/icon.png and /dev/null differ diff --git a/androidCommon/src/main/res/drawable-ldpi/icon.png b/androidCommon/src/main/res/drawable-ldpi/icon.png deleted file mode 100755 index 1095584..0000000 Binary files a/androidCommon/src/main/res/drawable-ldpi/icon.png and /dev/null differ diff --git a/androidCommon/src/main/res/drawable-mdpi/icon.png b/androidCommon/src/main/res/drawable-mdpi/icon.png deleted file mode 100755 index a07c69f..0000000 Binary files a/androidCommon/src/main/res/drawable-mdpi/icon.png and /dev/null differ diff --git a/androidCommon/src/main/res/layout/dialog_rate.xml b/androidCommon/src/main/res/layout/dialog_rate.xml deleted file mode 100755 index 96aab5c..0000000 --- a/androidCommon/src/main/res/layout/dialog_rate.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -