Merge pull request #155 from mvdan/patches

Cleanups & other patches
This commit is contained in:
Moez Bhatti
2015-08-20 00:43:27 -04:00
13 changed files with 456 additions and 842 deletions
+1 -2
View File
@@ -9,6 +9,7 @@ local.properties
# Gradle generated files
.gradle/
build/
# Signing files
.signing/
@@ -25,5 +26,3 @@ local.properties
.Trashes
ehthumbs.db
Thumbs.db
gen/
module_android-smsmms.xml
+1 -1
View File
@@ -7,7 +7,7 @@ android:
- tools
# The BuildTools version used by your project
- build-tools-22.0.1
- build-tools-23.0.0
# The SDK version used to compile your project
- android-22
+5 -15
View File
@@ -1,11 +1,3 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
apply plugin: 'com.android.application'
repositories {
@@ -16,11 +8,10 @@ android {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
compileSdkVersion 22
buildToolsVersion '22.0.1'
buildToolsVersion '23.0.0'
defaultConfig {
versionCode 110
@@ -33,7 +24,7 @@ android {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'qksms-proguard.pro'
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'qksms-proguard.pro'
}
}
}
@@ -57,12 +48,11 @@ dependencies {
compile 'com.koushikdutta.ion:ion:1.1.7'
// Google libraries
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:support-v13:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:support-v13:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.google.android.gms:play-services-analytics:7.5.0'
// External services
compile 'com.crittercism:crittercism-android-agent:5.0.3'
compile files('libs/endlessjabbersdk.jar')
}
Binary file not shown.
-822
View File
@@ -1,822 +0,0 @@
-- Merging decision tree log ---
manifest
ADDED from AndroidManifest.xml:2:1
package
ADDED from AndroidManifest.xml:3:5
android:versionName
INJECTED from AndroidManifest.xml:0:0
INJECTED from AndroidManifest.xml:0:0
xmlns:android
ADDED from AndroidManifest.xml:4:5
android:versionCode
INJECTED from AndroidManifest.xml:0:0
INJECTED from AndroidManifest.xml:0:0
uses-permission#android.permission.ACCESS_COARSE_LOCATION
ADDED from AndroidManifest.xml:6:5
android:name
ADDED from AndroidManifest.xml:6:22
uses-permission#android.permission.ACCESS_FINE_LOCATION
ADDED from AndroidManifest.xml:7:5
android:name
ADDED from AndroidManifest.xml:7:22
uses-permission#android.permission.ACCESS_NETWORK_STATE
ADDED from AndroidManifest.xml:8:5
MERGED from com.google.android.gms:play-services-analytics:7.5.0:22:5
android:name
ADDED from AndroidManifest.xml:8:22
uses-permission#android.permission.ACCESS_WIFI_STATE
ADDED from AndroidManifest.xml:9:5
android:name
ADDED from AndroidManifest.xml:9:22
uses-permission#android.permission.CALL_PHONE
ADDED from AndroidManifest.xml:10:5
android:name
ADDED from AndroidManifest.xml:10:22
uses-permission#android.permission.CAMERA
ADDED from AndroidManifest.xml:11:5
android:name
ADDED from AndroidManifest.xml:11:22
uses-permission#android.permission.CHANGE_CONFIGURATION
ADDED from AndroidManifest.xml:12:5
android:name
ADDED from AndroidManifest.xml:12:22
uses-permission#android.permission.CHANGE_NETWORK_STATE
ADDED from AndroidManifest.xml:13:5
android:name
ADDED from AndroidManifest.xml:13:22
uses-permission#android.permission.CHANGE_WIFI_STATE
ADDED from AndroidManifest.xml:14:5
android:name
ADDED from AndroidManifest.xml:14:22
uses-permission#android.permission.FLASHLIGHT
ADDED from AndroidManifest.xml:15:5
android:name
ADDED from AndroidManifest.xml:15:22
uses-permission#android.permission.GET_ACCOUNTS
ADDED from AndroidManifest.xml:16:5
android:name
ADDED from AndroidManifest.xml:16:22
uses-permission#android.permission.INTERNET
ADDED from AndroidManifest.xml:17:5
MERGED from com.google.android.gms:play-services-analytics:7.5.0:21:5
android:name
ADDED from AndroidManifest.xml:17:22
uses-permission#android.permission.MANAGE_ACCOUNTS
ADDED from AndroidManifest.xml:18:5
android:name
ADDED from AndroidManifest.xml:18:22
uses-permission#android.permission.NFC
ADDED from AndroidManifest.xml:19:5
android:name
ADDED from AndroidManifest.xml:19:22
uses-permission#android.permission.READ_CALL_LOG
ADDED from AndroidManifest.xml:20:5
android:name
ADDED from AndroidManifest.xml:20:22
uses-permission#android.permission.READ_CONTACTS
ADDED from AndroidManifest.xml:21:5
android:name
ADDED from AndroidManifest.xml:21:22
uses-permission#android.permission.READ_PHONE_STATE
ADDED from AndroidManifest.xml:22:5
android:name
ADDED from AndroidManifest.xml:22:22
uses-permission#android.permission.READ_PROFILE
ADDED from AndroidManifest.xml:23:5
android:name
ADDED from AndroidManifest.xml:23:22
uses-permission#android.permission.READ_EXTERNAL_STORAGE
ADDED from AndroidManifest.xml:24:5
android:name
ADDED from AndroidManifest.xml:24:22
uses-permission#android.permission.READ_SMS
ADDED from AndroidManifest.xml:25:5
android:name
ADDED from AndroidManifest.xml:25:22
uses-permission#android.permission.RECEIVE_BOOT_COMPLETED
ADDED from AndroidManifest.xml:26:5
android:name
ADDED from AndroidManifest.xml:26:22
uses-permission#android.permission.RECEIVE_MMS
ADDED from AndroidManifest.xml:27:5
android:name
ADDED from AndroidManifest.xml:27:22
uses-permission#android.permission.RECEIVE_SMS
ADDED from AndroidManifest.xml:28:5
android:name
ADDED from AndroidManifest.xml:28:22
uses-permission#android.permission.RECORD_AUDIO
ADDED from AndroidManifest.xml:29:5
android:name
ADDED from AndroidManifest.xml:29:22
uses-permission#android.permission.SEND_SMS
ADDED from AndroidManifest.xml:30:5
android:name
ADDED from AndroidManifest.xml:30:22
uses-permission#android.permission.SYSTEM_ALERT_WINDOW
ADDED from AndroidManifest.xml:31:5
android:name
ADDED from AndroidManifest.xml:31:22
uses-permission#android.permission.USE_CREDENTIALS
ADDED from AndroidManifest.xml:32:5
android:name
ADDED from AndroidManifest.xml:32:22
uses-permission#android.permission.VIBRATE
ADDED from AndroidManifest.xml:33:5
android:name
ADDED from AndroidManifest.xml:33:22
uses-permission#android.permission.WRITE_CONTACTS
ADDED from AndroidManifest.xml:34:5
android:name
ADDED from AndroidManifest.xml:34:22
uses-permission#android.permission.WAKE_LOCK
ADDED from AndroidManifest.xml:35:5
android:name
ADDED from AndroidManifest.xml:35:22
uses-permission#android.permission.WRITE_EXTERNAL_STORAGE
ADDED from AndroidManifest.xml:36:5
android:name
ADDED from AndroidManifest.xml:36:22
uses-permission#android.permission.WRITE_SMS
ADDED from AndroidManifest.xml:37:5
android:name
ADDED from AndroidManifest.xml:37:22
uses-permission#com.android.vending.BILLING
ADDED from AndroidManifest.xml:38:5
android:name
ADDED from AndroidManifest.xml:38:22
application
ADDED from AndroidManifest.xml:40:5
MERGED from com.android.support:appcompat-v7:22.2.0:22:5
MERGED from com.android.support:support-v4:22.2.0:22:5
MERGED from qksms:qkms:unspecified:9:5
MERGED from com.github.johnkil.android-robototextview:robototextview:2.1.0:11:5
MERGED from com.melnykov:floatingactionbutton:1.3.0:12:5
MERGED from com.android.support:support-v4:22.2.0:22:5
MERGED from com.pushbullet:android-extensions:1.0.4:9:5
MERGED from com.android.support:support-v4:22.2.0:22:5
MERGED from com.nispok:snackbar:2.10.6:10:5
MERGED from com.android.support:support-v4:22.2.0:22:5
MERGED from com.android.support:appcompat-v7:22.2.0:22:5
MERGED from com.android.support:support-v4:22.2.0:22:5
MERGED from com.android.support:support-v13:22.2.0:22:5
MERGED from com.android.support:support-v4:22.2.0:22:5
MERGED from com.android.support:support-v4:22.2.0:22:5
MERGED from com.google.android.gms:play-services-analytics:7.5.0:24:5
MERGED from com.google.android.gms:play-services-base:7.5.0:20:5
MERGED from com.android.support:support-v4:22.2.0:22:5
android:label
ADDED from AndroidManifest.xml:44:9
android:allowBackup
ADDED from AndroidManifest.xml:42:9
android:icon
ADDED from AndroidManifest.xml:43:9
android:largeHeap
ADDED from AndroidManifest.xml:45:9
android:theme
ADDED from AndroidManifest.xml:46:9
android:name
ADDED from AndroidManifest.xml:41:9
activity#com.moez.QKSMS.ui.popup.QKComposeActivity
ADDED from AndroidManifest.xml:47:9
android:excludeFromRecents
ADDED from AndroidManifest.xml:49:13
android:windowSoftInputMode
ADDED from AndroidManifest.xml:52:13
android:theme
ADDED from AndroidManifest.xml:51:13
android:taskAffinity
ADDED from AndroidManifest.xml:50:13
android:name
ADDED from AndroidManifest.xml:48:13
intent-filter#android.intent.action.SEND+android.intent.action.SENDTO+android.intent.category.BROWSABLE+android.intent.category.DEFAULT
ADDED from AndroidManifest.xml:53:13
action#android.intent.action.SEND
ADDED from AndroidManifest.xml:54:17
android:name
ADDED from AndroidManifest.xml:54:25
action#android.intent.action.SENDTO
ADDED from AndroidManifest.xml:55:17
android:name
ADDED from AndroidManifest.xml:55:25
category#android.intent.category.DEFAULT
ADDED from AndroidManifest.xml:57:17
android:name
ADDED from AndroidManifest.xml:57:27
category#android.intent.category.BROWSABLE
ADDED from AndroidManifest.xml:58:17
android:name
ADDED from AndroidManifest.xml:58:27
data
ADDED from AndroidManifest.xml:60:17
android:scheme
ADDED from AndroidManifest.xml:60:23
intent-filter#android.intent.action.SEND+android.intent.category.DEFAULT
ADDED from AndroidManifest.xml:65:13
activity#com.moez.QKSMS.ui.MainActivity
ADDED from AndroidManifest.xml:80:9
android:label
ADDED from AndroidManifest.xml:83:13
android:launchMode
ADDED from AndroidManifest.xml:84:13
android:windowSoftInputMode
ADDED from AndroidManifest.xml:86:13
android:icon
ADDED from AndroidManifest.xml:82:13
android:logo
ADDED from AndroidManifest.xml:85:13
android:name
ADDED from AndroidManifest.xml:81:13
intent-filter#android.intent.action.MAIN
ADDED from AndroidManifest.xml:87:13
action#android.intent.action.MAIN
ADDED from AndroidManifest.xml:88:17
android:name
ADDED from AndroidManifest.xml:88:25
activity-alias#com.moez.QKSMS.ui.MainActivity-Teal
ADDED from AndroidManifest.xml:92:9
android:enabled
ADDED from AndroidManifest.xml:94:13
android:label
ADDED from AndroidManifest.xml:96:13
android:targetActivity
ADDED from AndroidManifest.xml:97:13
android:icon
ADDED from AndroidManifest.xml:95:13
android:name
ADDED from AndroidManifest.xml:93:13
intent-filter#android.intent.action.MAIN+android.intent.category.LAUNCHER
ADDED from AndroidManifest.xml:98:13
category#android.intent.category.LAUNCHER
ADDED from AndroidManifest.xml:101:17
android:name
ADDED from AndroidManifest.xml:101:27
activity-alias#com.moez.QKSMS.ui.MainActivity-Red
ADDED from AndroidManifest.xml:104:9
android:enabled
ADDED from AndroidManifest.xml:106:13
android:label
ADDED from AndroidManifest.xml:108:13
android:targetActivity
ADDED from AndroidManifest.xml:109:13
android:icon
ADDED from AndroidManifest.xml:107:13
android:name
ADDED from AndroidManifest.xml:105:13
activity-alias#com.moez.QKSMS.ui.MainActivity-Pink
ADDED from AndroidManifest.xml:116:9
android:enabled
ADDED from AndroidManifest.xml:118:13
android:label
ADDED from AndroidManifest.xml:120:13
android:targetActivity
ADDED from AndroidManifest.xml:121:13
android:icon
ADDED from AndroidManifest.xml:119:13
android:name
ADDED from AndroidManifest.xml:117:13
activity-alias#com.moez.QKSMS.ui.MainActivity-Purple
ADDED from AndroidManifest.xml:128:9
android:enabled
ADDED from AndroidManifest.xml:130:13
android:label
ADDED from AndroidManifest.xml:132:13
android:targetActivity
ADDED from AndroidManifest.xml:133:13
android:icon
ADDED from AndroidManifest.xml:131:13
android:name
ADDED from AndroidManifest.xml:129:13
activity-alias#com.moez.QKSMS.ui.MainActivity-DeepPurple
ADDED from AndroidManifest.xml:140:9
android:enabled
ADDED from AndroidManifest.xml:142:13
android:label
ADDED from AndroidManifest.xml:144:13
android:targetActivity
ADDED from AndroidManifest.xml:145:13
android:icon
ADDED from AndroidManifest.xml:143:13
android:name
ADDED from AndroidManifest.xml:141:13
activity-alias#com.moez.QKSMS.ui.MainActivity-Indigo
ADDED from AndroidManifest.xml:152:9
android:enabled
ADDED from AndroidManifest.xml:154:13
android:label
ADDED from AndroidManifest.xml:156:13
android:targetActivity
ADDED from AndroidManifest.xml:157:13
android:icon
ADDED from AndroidManifest.xml:155:13
android:name
ADDED from AndroidManifest.xml:153:13
activity-alias#com.moez.QKSMS.ui.MainActivity-Blue
ADDED from AndroidManifest.xml:164:9
android:enabled
ADDED from AndroidManifest.xml:166:13
android:label
ADDED from AndroidManifest.xml:168:13
android:targetActivity
ADDED from AndroidManifest.xml:169:13
android:icon
ADDED from AndroidManifest.xml:167:13
android:name
ADDED from AndroidManifest.xml:165:13
activity-alias#com.moez.QKSMS.ui.MainActivity-LightBlue
ADDED from AndroidManifest.xml:176:9
android:enabled
ADDED from AndroidManifest.xml:178:13
android:label
ADDED from AndroidManifest.xml:180:13
android:targetActivity
ADDED from AndroidManifest.xml:181:13
android:icon
ADDED from AndroidManifest.xml:179:13
android:name
ADDED from AndroidManifest.xml:177:13
activity-alias#com.moez.QKSMS.ui.MainActivity-Cyan
ADDED from AndroidManifest.xml:188:9
android:enabled
ADDED from AndroidManifest.xml:190:13
android:label
ADDED from AndroidManifest.xml:192:13
android:targetActivity
ADDED from AndroidManifest.xml:193:13
android:icon
ADDED from AndroidManifest.xml:191:13
android:name
ADDED from AndroidManifest.xml:189:13
activity-alias#com.moez.QKSMS.ui.MainActivity-Green
ADDED from AndroidManifest.xml:200:9
android:enabled
ADDED from AndroidManifest.xml:202:13
android:label
ADDED from AndroidManifest.xml:204:13
android:targetActivity
ADDED from AndroidManifest.xml:205:13
android:icon
ADDED from AndroidManifest.xml:203:13
android:name
ADDED from AndroidManifest.xml:201:13
activity-alias#com.moez.QKSMS.ui.MainActivity-LightGreen
ADDED from AndroidManifest.xml:212:9
android:enabled
ADDED from AndroidManifest.xml:214:13
android:label
ADDED from AndroidManifest.xml:216:13
android:targetActivity
ADDED from AndroidManifest.xml:217:13
android:icon
ADDED from AndroidManifest.xml:215:13
android:name
ADDED from AndroidManifest.xml:213:13
activity-alias#com.moez.QKSMS.ui.MainActivity-Lime
ADDED from AndroidManifest.xml:224:9
android:enabled
ADDED from AndroidManifest.xml:226:13
android:label
ADDED from AndroidManifest.xml:228:13
android:targetActivity
ADDED from AndroidManifest.xml:229:13
android:icon
ADDED from AndroidManifest.xml:227:13
android:name
ADDED from AndroidManifest.xml:225:13
activity-alias#com.moez.QKSMS.ui.MainActivity-Yellow
ADDED from AndroidManifest.xml:236:9
android:enabled
ADDED from AndroidManifest.xml:238:13
android:label
ADDED from AndroidManifest.xml:240:13
android:targetActivity
ADDED from AndroidManifest.xml:241:13
android:icon
ADDED from AndroidManifest.xml:239:13
android:name
ADDED from AndroidManifest.xml:237:13
activity-alias#com.moez.QKSMS.ui.MainActivity-Amber
ADDED from AndroidManifest.xml:248:9
android:enabled
ADDED from AndroidManifest.xml:250:13
android:label
ADDED from AndroidManifest.xml:252:13
android:targetActivity
ADDED from AndroidManifest.xml:253:13
android:icon
ADDED from AndroidManifest.xml:251:13
android:name
ADDED from AndroidManifest.xml:249:13
activity-alias#com.moez.QKSMS.ui.MainActivity-Orange
ADDED from AndroidManifest.xml:260:9
android:enabled
ADDED from AndroidManifest.xml:262:13
android:label
ADDED from AndroidManifest.xml:264:13
android:targetActivity
ADDED from AndroidManifest.xml:265:13
android:icon
ADDED from AndroidManifest.xml:263:13
android:name
ADDED from AndroidManifest.xml:261:13
activity-alias#com.moez.QKSMS.ui.MainActivity-DeepOrange
ADDED from AndroidManifest.xml:272:9
android:enabled
ADDED from AndroidManifest.xml:274:13
android:label
ADDED from AndroidManifest.xml:276:13
android:targetActivity
ADDED from AndroidManifest.xml:277:13
android:icon
ADDED from AndroidManifest.xml:275:13
android:name
ADDED from AndroidManifest.xml:273:13
activity-alias#com.moez.QKSMS.ui.MainActivity-Brown
ADDED from AndroidManifest.xml:284:9
android:enabled
ADDED from AndroidManifest.xml:286:13
android:label
ADDED from AndroidManifest.xml:288:13
android:targetActivity
ADDED from AndroidManifest.xml:289:13
android:icon
ADDED from AndroidManifest.xml:287:13
android:name
ADDED from AndroidManifest.xml:285:13
activity-alias#com.moez.QKSMS.ui.MainActivity-Grey
ADDED from AndroidManifest.xml:296:9
android:enabled
ADDED from AndroidManifest.xml:298:13
android:label
ADDED from AndroidManifest.xml:300:13
android:targetActivity
ADDED from AndroidManifest.xml:301:13
android:icon
ADDED from AndroidManifest.xml:299:13
android:name
ADDED from AndroidManifest.xml:297:13
activity-alias#com.moez.QKSMS.ui.MainActivity-BlueGrey
ADDED from AndroidManifest.xml:308:9
android:enabled
ADDED from AndroidManifest.xml:310:13
android:label
ADDED from AndroidManifest.xml:312:13
android:targetActivity
ADDED from AndroidManifest.xml:313:13
android:icon
ADDED from AndroidManifest.xml:311:13
android:name
ADDED from AndroidManifest.xml:309:13
activity#com.moez.QKSMS.ui.welcome.WelcomeActivity
ADDED from AndroidManifest.xml:321:9
android:theme
ADDED from AndroidManifest.xml:323:13
android:name
ADDED from AndroidManifest.xml:322:13
activity#com.moez.QKSMS.ui.popup.QKReplyActivity
ADDED from AndroidManifest.xml:326:9
android:excludeFromRecents
ADDED from AndroidManifest.xml:328:13
android:windowSoftInputMode
ADDED from AndroidManifest.xml:331:13
android:theme
ADDED from AndroidManifest.xml:330:13
android:taskAffinity
ADDED from AndroidManifest.xml:329:13
android:name
ADDED from AndroidManifest.xml:327:13
activity#com.moez.QKSMS.ui.popup.MessagePickerActivity
ADDED from AndroidManifest.xml:334:9
android:excludeFromRecents
ADDED from AndroidManifest.xml:336:13
android:noHistory
ADDED from AndroidManifest.xml:337:13
android:theme
ADDED from AndroidManifest.xml:339:13
android:taskAffinity
ADDED from AndroidManifest.xml:338:13
android:name
ADDED from AndroidManifest.xml:335:13
activity#com.moez.QKSMS.ui.mms.SlideshowActivity
ADDED from AndroidManifest.xml:341:9
android:name
ADDED from AndroidManifest.xml:341:19
receiver#com.moez.QKSMS.receiver.WearableIntentReceiver
ADDED from AndroidManifest.xml:343:9
android:exported
ADDED from AndroidManifest.xml:345:13
android:name
ADDED from AndroidManifest.xml:344:13
intent-filter#com.moez.QKSMS.receiver.WearableIntentReceiver.REPLY
ADDED from AndroidManifest.xml:346:13
action#com.moez.QKSMS.receiver.WearableIntentReceiver.REPLY
ADDED from AndroidManifest.xml:347:17
android:name
ADDED from AndroidManifest.xml:347:25
receiver#com.moez.QKSMS.receiver.SmsReceiver
ADDED from AndroidManifest.xml:352:9
android:enabled
ADDED from AndroidManifest.xml:354:13
android:permission
ADDED from AndroidManifest.xml:355:13
android:name
ADDED from AndroidManifest.xml:353:13
intent-filter#android.provider.Telephony.SMS_DELIVER
ADDED from AndroidManifest.xml:356:13
action#android.provider.Telephony.SMS_DELIVER
ADDED from AndroidManifest.xml:357:17
android:name
ADDED from AndroidManifest.xml:357:25
receiver#com.moez.QKSMS.receiver.IconColorReceiver
ADDED from AndroidManifest.xml:360:9
android:enabled
ADDED from AndroidManifest.xml:362:13
android:exported
ADDED from AndroidManifest.xml:363:13
android:name
ADDED from AndroidManifest.xml:361:13
intent-filter#android.intent.action.PACKAGE_CHANGED
ADDED from AndroidManifest.xml:364:13
action#android.intent.action.PACKAGE_CHANGED
ADDED from AndroidManifest.xml:365:17
android:name
ADDED from AndroidManifest.xml:365:25
intent-filter#com.moez.QKSMS.action.PENDING_PACKAGE_CHANGE
ADDED from AndroidManifest.xml:369:13
action#com.moez.QKSMS.action.PENDING_PACKAGE_CHANGE
ADDED from AndroidManifest.xml:370:17
android:name
ADDED from AndroidManifest.xml:370:25
receiver#com.moez.QKSMS.receiver.SmsReceiverLegacy
ADDED from AndroidManifest.xml:375:9
android:enabled
ADDED from AndroidManifest.xml:377:13
android:name
ADDED from AndroidManifest.xml:376:13
intent-filter#android.provider.Telephony.SMS_RECEIVED
ADDED from AndroidManifest.xml:378:13
android:priority
ADDED from AndroidManifest.xml:378:28
action#android.provider.Telephony.SMS_RECEIVED
ADDED from AndroidManifest.xml:379:17
android:name
ADDED from AndroidManifest.xml:379:25
receiver#com.moez.QKSMS.receiver.PushReceiver
ADDED from AndroidManifest.xml:384:9
android:permission
ADDED from AndroidManifest.xml:386:13
android:name
ADDED from AndroidManifest.xml:385:13
intent-filter#android.provider.Telephony.WAP_PUSH_DELIVER+android.provider.Telephony.WAP_PUSH_RECEIVED
ADDED from AndroidManifest.xml:387:13
action#android.provider.Telephony.WAP_PUSH_RECEIVED
ADDED from AndroidManifest.xml:388:17
android:name
ADDED from AndroidManifest.xml:388:25
action#android.provider.Telephony.WAP_PUSH_DELIVER
ADDED from AndroidManifest.xml:389:17
android:name
ADDED from AndroidManifest.xml:389:25
receiver#com.moez.QKSMS.analytics.AnalyticsReportReceiver
ADDED from AndroidManifest.xml:394:9
android:name
ADDED from AndroidManifest.xml:394:19
intent-filter#android.intent.action.BOOT_COMPLETED
ADDED from AndroidManifest.xml:395:13
action#android.intent.action.BOOT_COMPLETED
ADDED from AndroidManifest.xml:396:17
android:name
ADDED from AndroidManifest.xml:396:25
receiver#com.moez.QKSMS.receiver.BootReceiver
ADDED from AndroidManifest.xml:399:9
android:name
ADDED from AndroidManifest.xml:399:19
receiver#com.klinker.android.send_message.SentReceiver
ADDED from AndroidManifest.xml:404:9
android:name
ADDED from AndroidManifest.xml:404:19
intent-filter#com.moez.QKSMS.SMS_SENT
ADDED from AndroidManifest.xml:405:13
action#com.moez.QKSMS.SMS_SENT
ADDED from AndroidManifest.xml:406:17
android:name
ADDED from AndroidManifest.xml:406:25
receiver#com.moez.QKSMS.receiver.DeliveredReceiver
ADDED from AndroidManifest.xml:409:9
android:name
ADDED from AndroidManifest.xml:409:19
intent-filter#com.moez.QKSMS.SMS_DELIVERED
ADDED from AndroidManifest.xml:410:13
action#com.moez.QKSMS.SMS_DELIVERED
ADDED from AndroidManifest.xml:411:17
android:name
ADDED from AndroidManifest.xml:411:25
receiver#com.moez.QKSMS.receiver.MessageFailedReceiver
ADDED from AndroidManifest.xml:414:9
android:name
ADDED from AndroidManifest.xml:414:19
intent-filter#com.moez.QKSMS.NOTIFY_SMS_FAILURE
ADDED from AndroidManifest.xml:415:13
action#com.moez.QKSMS.NOTIFY_SMS_FAILURE
ADDED from AndroidManifest.xml:416:17
android:name
ADDED from AndroidManifest.xml:416:25
receiver#com.moez.QKSMS.receiver.MarkReadReceiver
ADDED from AndroidManifest.xml:419:9
android:name
ADDED from AndroidManifest.xml:419:19
intent-filter#com.moez.QKSMS.MARK_READ
ADDED from AndroidManifest.xml:420:13
action#com.moez.QKSMS.MARK_READ
ADDED from AndroidManifest.xml:421:17
android:name
ADDED from AndroidManifest.xml:421:25
receiver#com.moez.QKSMS.receiver.MarkSeenReceiver
ADDED from AndroidManifest.xml:424:9
android:name
ADDED from AndroidManifest.xml:424:19
intent-filter#com.moez.QKSMS.MARK_SEEN
ADDED from AndroidManifest.xml:425:13
action#com.moez.QKSMS.MARK_SEEN
ADDED from AndroidManifest.xml:426:17
android:name
ADDED from AndroidManifest.xml:426:25
receiver#com.moez.QKSMS.ui.widget.WidgetProvider
ADDED from AndroidManifest.xml:430:9
android:name
ADDED from AndroidManifest.xml:430:19
intent-filter#android.appwidget.action.APPWIDGET_UPDATE
ADDED from AndroidManifest.xml:431:13
action#android.appwidget.action.APPWIDGET_UPDATE
ADDED from AndroidManifest.xml:432:17
android:name
ADDED from AndroidManifest.xml:432:25
intent-filter#com.moez.QKSMS.intent.action.ACTION_NOTIFY_DATASET_CHANGED
ADDED from AndroidManifest.xml:434:13
action#com.moez.QKSMS.intent.action.ACTION_NOTIFY_DATASET_CHANGED
ADDED from AndroidManifest.xml:435:17
android:name
ADDED from AndroidManifest.xml:435:25
meta-data#android.appwidget.provider
ADDED from AndroidManifest.xml:438:13
android:resource
ADDED from AndroidManifest.xml:440:17
android:name
ADDED from AndroidManifest.xml:439:17
receiver#com.moez.QKSMS.receiver.NightModeAutoReceiver
ADDED from AndroidManifest.xml:443:9
android:name
ADDED from AndroidManifest.xml:443:19
receiver#com.mariussoft.endlessjabber.sdk.EndlessJabberReceiver
ADDED from AndroidManifest.xml:444:9
android:enabled
ADDED from AndroidManifest.xml:446:13
android:name
ADDED from AndroidManifest.xml:445:13
intent-filter#com.mariussoft.endlessjabber.action.extend
ADDED from AndroidManifest.xml:447:13
action#com.mariussoft.endlessjabber.action.extend
ADDED from AndroidManifest.xml:448:17
android:name
ADDED from AndroidManifest.xml:448:25
service#com.mariussoft.endlessjabber.sdk.EndlessJabberWakefulService
ADDED from AndroidManifest.xml:452:9
android:name
ADDED from AndroidManifest.xml:452:18
service#com.moez.QKSMS.receiver.UnreadBadgeService
ADDED from AndroidManifest.xml:454:9
android:exported
ADDED from AndroidManifest.xml:456:13
android:name
ADDED from AndroidManifest.xml:455:13
service#com.moez.QKSMS.service.HeadlessSmsSendService
ADDED from AndroidManifest.xml:459:9
android:exported
ADDED from AndroidManifest.xml:461:13
android:permission
ADDED from AndroidManifest.xml:462:13
android:name
ADDED from AndroidManifest.xml:460:13
intent-filter#android.intent.action.RESPOND_VIA_MESSAGE+android.intent.category.DEFAULT
ADDED from AndroidManifest.xml:463:13
action#android.intent.action.RESPOND_VIA_MESSAGE
ADDED from AndroidManifest.xml:464:17
android:name
ADDED from AndroidManifest.xml:464:25
service#com.moez.QKSMS.service.PushbulletService
ADDED from AndroidManifest.xml:474:9
android:permission
ADDED from AndroidManifest.xml:476:13
android:name
ADDED from AndroidManifest.xml:475:13
intent-filter#com.pushbullet.android.extension.MessagingExtension
ADDED from AndroidManifest.xml:477:13
action#com.pushbullet.android.extension.MessagingExtension
ADDED from AndroidManifest.xml:478:17
android:name
ADDED from AndroidManifest.xml:478:25
meta-data#protocolVersion
ADDED from AndroidManifest.xml:481:13
android:value
ADDED from AndroidManifest.xml:483:17
android:name
ADDED from AndroidManifest.xml:482:17
service#com.android.mms.transaction.TransactionService
ADDED from AndroidManifest.xml:485:9
android:name
ADDED from AndroidManifest.xml:485:18
service#com.moez.QKSMS.service.NotificationService
ADDED from AndroidManifest.xml:486:9
android:name
ADDED from AndroidManifest.xml:486:18
service#com.moez.QKSMS.service.MarkReadService
ADDED from AndroidManifest.xml:487:9
android:name
ADDED from AndroidManifest.xml:487:18
service#com.moez.QKSMS.service.MarkSeenService
ADDED from AndroidManifest.xml:488:9
android:name
ADDED from AndroidManifest.xml:488:18
service#com.moez.QKSMS.service.DeleteUnreadMessageService
ADDED from AndroidManifest.xml:489:9
android:name
ADDED from AndroidManifest.xml:489:18
service#com.moez.QKSMS.service.CopyUnreadMessageTextService
ADDED from AndroidManifest.xml:490:9
android:name
ADDED from AndroidManifest.xml:490:18
service#com.moez.QKSMS.ui.widget.WidgetService
ADDED from AndroidManifest.xml:491:9
android:permission
ADDED from AndroidManifest.xml:493:13
android:name
ADDED from AndroidManifest.xml:492:13
uses-sdk
INJECTED from AndroidManifest.xml:0:0 reason: use-sdk injection requested
MERGED from qksms:slidingMenu:unspecified:7:5
MERGED from com.android.support:appcompat-v7:22.2.0:20:5
MERGED from com.android.support:support-v4:22.2.0:20:5
MERGED from qksms:colorPicker:unspecified:7:5
MERGED from qksms:qkms:unspecified:5:5
MERGED from com.github.johnkil.android-robototextview:robototextview:2.1.0:7:5
MERGED from com.melnykov:floatingactionbutton:1.3.0:8:5
MERGED from com.android.support:recyclerview-v7:22.2.0:20:5
MERGED from com.android.support:support-v4:22.2.0:20:5
MERGED from com.pushbullet:android-extensions:1.0.4:5:5
MERGED from com.klinkerapps:android-chips:1.0.0:22:5
MERGED from com.android.support:support-v4:22.2.0:20:5
MERGED from com.nispok:snackbar:2.10.6:6:5
MERGED from com.android.support:recyclerview-v7:22.2.0:20:5
MERGED from com.android.support:support-v4:22.2.0:20:5
MERGED from com.github.lzyzsd:circleprogress:1.1.0:7:5
MERGED from me.leolin:ShortcutBadger:1.1.1:7:5
MERGED from com.android.support:appcompat-v7:22.2.0:20:5
MERGED from com.android.support:support-v4:22.2.0:20:5
MERGED from com.android.support:support-v13:22.2.0:20:5
MERGED from com.android.support:support-v4:22.2.0:20:5
MERGED from com.android.support:recyclerview-v7:22.2.0:20:5
MERGED from com.android.support:support-v4:22.2.0:20:5
MERGED from com.google.android.gms:play-services-analytics:7.5.0:18:5
MERGED from com.google.android.gms:play-services-base:7.5.0:18:5
MERGED from com.android.support:support-v4:22.2.0:20:5
MERGED from com.squareup.leakcanary:leakcanary-android-no-op:1.3:20:5
android:targetSdkVersion
INJECTED from AndroidManifest.xml:0:0
INJECTED from AndroidManifest.xml:0:0
android:minSdkVersion
INJECTED from AndroidManifest.xml:0:0
INJECTED from AndroidManifest.xml:0:0
uses-permission#com.sec.android.provider.badge.permission.READ
ADDED from me.leolin:ShortcutBadger:1.1.1:19:5
android:name
ADDED from me.leolin:ShortcutBadger:1.1.1:19:22
uses-permission#com.sec.android.provider.badge.permission.WRITE
ADDED from me.leolin:ShortcutBadger:1.1.1:20:5
android:name
ADDED from me.leolin:ShortcutBadger:1.1.1:20:22
uses-permission#com.htc.launcher.permission.READ_SETTINGS
ADDED from me.leolin:ShortcutBadger:1.1.1:23:5
android:name
ADDED from me.leolin:ShortcutBadger:1.1.1:23:22
uses-permission#com.htc.launcher.permission.UPDATE_SHORTCUT
ADDED from me.leolin:ShortcutBadger:1.1.1:24:5
android:name
ADDED from me.leolin:ShortcutBadger:1.1.1:24:22
uses-permission#com.sonyericsson.home.permission.BROADCAST_BADGE
ADDED from me.leolin:ShortcutBadger:1.1.1:27:5
android:name
ADDED from me.leolin:ShortcutBadger:1.1.1:27:22
uses-permission#com.anddoes.launcher.permission.UPDATE_COUNT
ADDED from me.leolin:ShortcutBadger:1.1.1:30:5
android:name
ADDED from me.leolin:ShortcutBadger:1.1.1:30:22
uses-permission#com.majeur.launcher.permission.UPDATE_BADGE
ADDED from me.leolin:ShortcutBadger:1.1.1:33:5
android:name
ADDED from me.leolin:ShortcutBadger:1.1.1:33:22
meta-data#com.google.android.gms.version
ADDED from com.google.android.gms:play-services-base:7.5.0:21:9
android:value
ADDED from com.google.android.gms:play-services-base:7.5.0:23:13
android:name
ADDED from com.google.android.gms:play-services-base:7.5.0:22:13
@@ -0,0 +1,105 @@
package com.mariussoft.endlessjabber.sdk;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
public class EndlessJabberInterface {
/** Checks whether or not EndlessJabber is installed */
public static boolean IsInstalled(Context ctx) {
PackageManager pm = ctx.getPackageManager();
try {
pm.getPackageInfo("com.mariussoft.endlessjabber", PackageManager.GET_ACTIVITIES);
return true;
} catch (NameNotFoundException e) {
return false;
}
}
/** Opens up GooglePlay and redirects it to the EndlessJabber app */
public static void OpenGooglePlayLink(Context ctx) {
final String appPackageName = "com.mariussoft.endlessjabber";
try {
ctx.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
} catch (android.content.ActivityNotFoundException anfe) {
ctx.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + appPackageName)));
}
}
/** Launches EndlessJabber */
public static void LaunchEndlessJabber(Context ctx) {
Intent intent = ctx.getPackageManager().getLaunchIntentForPackage("com.mariussoft.endlessjabber");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
ctx.startActivity(intent);
}
/**
* Enables integration by specifying which class to call
*
* @param context
* The context to use
* @param concreteImplementation
* The concrete implementation to call on events
* @param sendSMS
* If true, your app will be responsible for sending SMS messages
* as well as presisting them to the SMS repository
* @param sendMMS
* If true, your app will be responsible for sending & persisting
* MMS messages to the MMS repository
* @throws Exception
*/
@SuppressWarnings("rawtypes")
public static void EnableIntegration(Context context, Class concreteImplementation, boolean sendSMS, boolean sendMMS) throws Exception {
Class<?> clazz = concreteImplementation;
if (!IEndlessJabberImplementation.class.isAssignableFrom(clazz)) {
throw new Exception("Class must implement IEndlessJabberImplementation");
}
SharedPreferences.Editor editor = context.getSharedPreferences("EndlessJabberSDK", Context.MODE_PRIVATE).edit();
editor.putString("InterfaceClass", concreteImplementation.getName());
editor.putBoolean("SendSMS", sendSMS);
editor.putBoolean("SendMMS", sendMMS);
editor.commit();
SendInfoToEndlessJabber(context);
}
/** Disables integration */
@SuppressWarnings("rawtypes")
public static void DisableIntegration(Context context, Class nameOfImplementation) {
SharedPreferences.Editor editor = context.getSharedPreferences("EndlessJabberSDK", Context.MODE_PRIVATE).edit();
editor.clear();
editor.commit();
SendInfoToEndlessJabber(context);
}
/**
* Refresh integration info with EndlessJabber
*
* @param ctx
* Context to use
*/
static void SendInfoToEndlessJabber(Context context) {
String EndlessJabber_INTENT = "com.mariussoft.endlessjabber.action.extendResponse";
SharedPreferences prefs = context.getSharedPreferences("EndlessJabberSDK", Context.MODE_PRIVATE);
Intent i = new Intent();
i.setAction(EndlessJabber_INTENT);
i.putExtra("Action", "UpdateInfo");
i.putExtra("PackageName", context.getPackageName());
i.putExtra("Enabled", prefs.contains("InterfaceClass"));
if (prefs.contains("InterfaceClass")) {
i.putExtra("SendSMS", prefs.getBoolean("SendSMS", false));
i.putExtra("SendMMS", prefs.getBoolean("SendMMS", false));
}
context.sendBroadcast(i);
}
}
@@ -0,0 +1,22 @@
package com.mariussoft.endlessjabber.sdk;
import android.content.Context;
import android.content.Intent;
public class EndlessJabberReceiver extends WakefulBroadcastReceiver {
public static final String EndlessJabber_INTENT = "com.mariussoft.endlessjabber.action.extend";
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(EndlessJabber_INTENT)) {
// This is the Intent to deliver to our service.
Intent service = new Intent(context, EndlessJabberWakefulService.class);
service.putExtras(intent.getExtras());
startWakefulService(context, service);
}
}
}
@@ -0,0 +1,78 @@
package com.mariussoft.endlessjabber.sdk;
import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
public class EndlessJabberWakefulService extends IntentService {
public EndlessJabberWakefulService() {
super("EndlessJabberWakefulService");
}
@Override
protected void onHandleIntent(Intent intent) {
Context context = getApplicationContext();
// Get the class to call
String implemenationClass = context.getSharedPreferences("EndlessJabberSDK", Context.MODE_PRIVATE).getString("InterfaceClass", null);
if (implemenationClass == null) {
return;
}
IEndlessJabberImplementation instanceOfMyClass;
try {
instanceOfMyClass = (IEndlessJabberImplementation) Class.forName(implemenationClass).newInstance();
Bundle extras = intent.getExtras();
switch (extras.getString("Action")) {
case "UpdateRead": {
long time = extras.getLong("Time");
int conversationID = extras.getInt("ConversationID");
instanceOfMyClass.UpdateReadMessages(context, time, conversationID);
break;
}
case "DeleteThread": {
int conversationID = extras.getInt("ConversationID");
instanceOfMyClass.DeleteThread(context, conversationID);
break;
}
case "SendMMS": {
boolean save = extras.getBoolean("Save");
boolean send = extras.getBoolean("Send");
String[] Recipients = extras.getStringArray("Recipients");
MMSPart[] parts = new MMSPart[extras.getParcelableArray("Parts").length];
for (int i = 0; i < parts.length; i++) {
parts[i] = (MMSPart) extras.getParcelableArray("Parts")[i];
}
instanceOfMyClass.SendMMS(context, Recipients, parts, extras.getString("Subject"), save, send);
break;
}
case "SendSMS": {
boolean send = extras.getBoolean("Send");
String[] Recipients = extras.getStringArray("Recipients");
String message = extras.getString("Message");
instanceOfMyClass.SendSMS(context, Recipients, message, send);
break;
}
case "UpdateInfo": {
EndlessJabberInterface.SendInfoToEndlessJabber(context);
break;
}
}
} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
}
EndlessJabberReceiver.completeWakefulIntent(intent);
}
}
@@ -0,0 +1,50 @@
package com.mariussoft.endlessjabber.sdk;
import android.content.Context;
/**
*
* Interface to implement EndlessJabber integration
*
*/
public interface IEndlessJabberImplementation {
/**
* Update all messages in the SMS/MMS repositories as read where the time <= the provided time as well as where the threadID matches the provided ID
* @param context The context to utilize
* @param time The 'time' in the SMS database to use when marking messages as read
* (NOTE* for MMS divide by 1000 as MMS repository stores times as 1/1000th of the SMS)
* @param threadID The ID of the thread in the SMS/MMS repositories to update
*/
void UpdateReadMessages(Context context, long time, int threadID);
/**
* Delete any messages/conversations in the SMS/MMS repositories where the threadID matches the provided ID
* @param context The context to utilize
* @param threadID The ID of the thread in the SMS/MMS repositories to delete
*/
void DeleteThread(Context context,int threadID);
/**
* Method gets called when EndlessJabber is requested to send an MMS message via the web app
* @param context The context to utilize
* @param recipients List of recipients to send message to
* @param parts The message parts to send along with message
* @param subject The MMS subject of the message
* @param save Whether or not to save the MMS to the MMS repository
* @param send If true, send the message along with saving it to the MMS repository
* NOTE: On KitKat save will be true only when enabled in the SDK & your app is the default messaging app on the system
*
* If both save & send are false, this call is only for informational purposes (e.g. modify notifications, update UI, etc...)
*/
void SendMMS(Context context, String[] recipients, MMSPart[] parts, String subject, boolean save, boolean send);
/**
* Method gets called when EndlessJabber is requested to send an SMS message via the web app
* @param context The context to utilize
* @param recipients List of recipients to send message to
* @param message The message to send
* @param send If true, send the message along with saving it to the SMS repository, otherwise this is only for informational purposes (e.g. modify notifications, update UI, etc...)
*/
void SendSMS(Context context, String[] recipients, String message, boolean send);
}
@@ -0,0 +1,57 @@
package com.mariussoft.endlessjabber.sdk;
import android.os.Parcel;
import android.os.Parcelable;
/**
*
* An MMS attachment
*
*/
public class MMSPart implements Parcelable {
/**
* The name of the MMS attachment
*/
public String Name = "";
/**
* The MimeType of the MMS attachment
*/
public String MimeType = "";
/**
* The byte[] of the MMS attachment
*/
public byte[] Data;
public MMSPart() {
}
public MMSPart(Parcel parcel) {
Name = parcel.readString();
MimeType = parcel.readString();
Data = new byte[parcel.readInt()];
parcel.readByteArray(Data);
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int arg1) {
dest.writeString(Name);
dest.writeString(MimeType);
dest.writeInt(Data.length);
dest.writeByteArray(Data);
}
public static final Parcelable.Creator<MMSPart> CREATOR = new Parcelable.Creator<MMSPart>() {
public MMSPart createFromParcel(Parcel in) {
return new MMSPart(in);
}
public MMSPart[] newArray(int size) {
return new MMSPart[size];
}
};
}
@@ -0,0 +1,135 @@
package com.mariussoft.endlessjabber.sdk;
/*
* Copyright (C) 2013 The Android Open Source Project
*
* 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.
*/
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.PowerManager;
import android.util.Log;
import android.util.SparseArray;
/**
* Helper for the common pattern of implementing a {@link BroadcastReceiver}
* that receives a device wakeup event and then passes the work off
* to a {@link android.app.Service}, while ensuring that the
* device does not go back to sleep during the transition.
*
* <p>This class takes care of creating and managing a partial wake lock
* for you; you must request the {@link android.Manifest.permission#WAKE_LOCK}
* permission to use it.</p>
*
* <h3>Example</h3>
*
* <p>A {@link WakefulBroadcastReceiver} uses the method
* {@link WakefulBroadcastReceiver#startWakefulService startWakefulService()}
* to start the service that does the work. This method is comparable to
* {@link android.content.Context#startService startService()}, except that
* the {@link WakefulBroadcastReceiver} is holding a wake lock when the service
* starts. The intent that is passed with
* {@link WakefulBroadcastReceiver#startWakefulService startWakefulService()}
* holds an extra identifying the wake lock.</p>
*
* {@sample development/samples/Support4Demos/src/com/example/android/supportv4/content/SimpleWakefulReceiver.java complete}
*
* <p>The service (in this example, an {@link android.app.IntentService}) does
* some work. When it is finished, it releases the wake lock by calling
* {@link WakefulBroadcastReceiver#completeWakefulIntent
* completeWakefulIntent(intent)}. The intent it passes as a parameter
* is the same intent that the {@link WakefulBroadcastReceiver} originally
* passed in.</p>
*
* {@sample development/samples/Support4Demos/src/com/example/android/supportv4/content/SimpleWakefulService.java complete}
*/
public abstract class WakefulBroadcastReceiver extends BroadcastReceiver {
private static final String EXTRA_WAKE_LOCK_ID = "android.support.content.wakelockid";
private static final SparseArray<PowerManager.WakeLock> mActiveWakeLocks
= new SparseArray<PowerManager.WakeLock>();
private static int mNextId = 1;
/**
* Do a {@link android.content.Context#startService(android.content.Intent)
* Context.startService}, but holding a wake lock while the service starts.
* This will modify the Intent to hold an extra identifying the wake lock;
* when the service receives it in {@link android.app.Service#onStartCommand
* Service.onStartCommand}, it should pass back the Intent it receives there to
* {@link #completeWakefulIntent(android.content.Intent)} in order to release
* the wake lock.
*
* @param context The Context in which it operate.
* @param intent The Intent with which to start the service, as per
* {@link android.content.Context#startService(android.content.Intent)
* Context.startService}.
*/
public static ComponentName startWakefulService(Context context, Intent intent) {
synchronized (mActiveWakeLocks) {
int id = mNextId;
mNextId++;
if (mNextId <= 0) {
mNextId = 1;
}
intent.putExtra(EXTRA_WAKE_LOCK_ID, id);
ComponentName comp = context.startService(intent);
if (comp == null) {
return null;
}
PowerManager pm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
"wake:" + comp.flattenToShortString());
wl.setReferenceCounted(false);
wl.acquire(60*1000);
mActiveWakeLocks.put(id, wl);
return comp;
}
}
/**
* Finish the execution from a previous {@link #startWakefulService}. Any wake lock
* that was being held will now be released.
*
* @param intent The Intent as originally generated by {@link #startWakefulService}.
* @return Returns true if the intent is associated with a wake lock that is
* now released; returns false if there was no wake lock specified for it.
*/
public static boolean completeWakefulIntent(Intent intent) {
final int id = intent.getIntExtra(EXTRA_WAKE_LOCK_ID, 0);
if (id == 0) {
return false;
}
synchronized (mActiveWakeLocks) {
PowerManager.WakeLock wl = mActiveWakeLocks.get(id);
if (wl != null) {
wl.release();
mActiveWakeLocks.remove(id);
return true;
}
// We return true whether or not we actually found the wake lock
// the return code is defined to indicate whether the Intent contained
// an identifier for a wake lock that it was supposed to match.
// We just log a warning here if there is no wake lock found, which could
// happen for example if this function is called twice on the same
// intent or the process is killed and restarted before processing the intent.
Log.w("WakefulBroadcastReceiver", "No active wake lock id #" + id);
return true;
}
}
}
+1 -1
View File
@@ -3,6 +3,6 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.android.tools.build:gradle:1.3.1'
}
}
+1 -1
View File
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip