Merge pull request #156 from qklabs/develop

Develop
This commit is contained in:
Moez Bhatti
2015-08-20 01:11:27 -04:00
174 changed files with 881 additions and 1048 deletions
+2 -21
View File
@@ -1,4 +1,3 @@
<<<<<<< HEAD
# Built application files
build/
@@ -10,23 +9,13 @@ local.properties
# Gradle generated files
.gradle/
build/
# Signing files
.signing/
# User-specific configurations
.idea/libraries/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/inspectionProfiles/Project_Default.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/
*.iml
# OS-specific files
@@ -37,11 +26,3 @@ local.properties
.Trashes
ehthumbs.db
Thumbs.db
=======
.gradle/
.idea/
build/
gen/
*.iml
module_android-smsmms.xml
>>>>>>> added android-smsmms
+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
+1 -1
View File
@@ -76,4 +76,4 @@
-dontwarn freemarker.** # freemarker templating library (for creating hCards) not used
-dontwarn org.jsoup.** # jsoup library (for hCard parsing) not used
-dontwarn sun.misc.Perf
-keep class ezvcard.property.** { *; } # keep all VCard properties (created at runtime)
-keep class ezvcard.property.** { *; } # keep all VCard properties (created at runtime)
@@ -67,4 +67,4 @@ public class EmojiRegistryTest extends TestCase {
String expected = EmojiParser.parseToUnicode("\n:" + Emojis.SMILEY + ":\n");
assertEquals(EmojiParser.parseToUnicode(expected), EmojiRegistry.parseEmojis(src));
}
}
}
@@ -0,0 +1,40 @@
package com.moez.QKSMS.common.utils;
import android.content.SharedPreferences;
import android.test.AndroidTestCase;
import android.util.Log;
import com.moez.QKSMS.ui.MainActivity;
import com.moez.QKSMS.ui.settings.SettingsFragment;
import java.text.SimpleDateFormat;
import java.util.Locale;
public class DateFormatterTest extends AndroidTestCase {
protected void setUp() throws Exception {
super.setUp();
}
public void test24Hours(){
SharedPreferences prefs = MainActivity.getPrefs(getContext());
prefs.edit().putBoolean(SettingsFragment.TIMESTAMPS_24H, true).commit();
assertTrue(DateFormatter.accountFor24HourTime(getContext(), new SimpleDateFormat("h:mm a")).equals(new SimpleDateFormat("H:mm")));
prefs.edit().putBoolean(SettingsFragment.TIMESTAMPS_24H, false).commit();
}
public void testFlippedMonthDay(){
Locale.setDefault(Locale.UK);
Log.d("TestFlippedMonthDay", DateFormatter.accountForFlippedDayMonth(new SimpleDateFormat("MMM d, h:mm a")).toPattern());
assertTrue(DateFormatter.accountForFlippedDayMonth(new SimpleDateFormat("MMM d, h:mm a")).equals(new SimpleDateFormat("d MMM, h:mm a")));
Locale.setDefault(Locale.US);
assertTrue(DateFormatter.accountForFlippedDayMonth(new SimpleDateFormat("MMM d, h:mm a")).equals(new SimpleDateFormat("MMM d, h:mm a")));
}
public void testDateSymbolsAPI(){
assertEquals(new SimpleDateFormat("H:mm a").toPattern(), "H:mm a");
}
protected void tearDown() throws Exception {
super.tearDown();
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -199,4 +199,4 @@ public class Country implements Parcelable {
public String toString() {
return "Country {ISO=" + mCountryIso + ", source=" + mSource + ", time=" + mTimestamp + "}";
}
}
}
@@ -134,4 +134,4 @@ public class CountryDetector {
}
}
}
}
}
@@ -27,4 +27,4 @@ public interface CountryListener {
* @param country the changed or detected country.
*/
void onCountryDetected(Country country);
}
}
@@ -38,4 +38,4 @@ interface ICountryDetector
* Remove the listener
*/
void removeCountryListener(ICountryListener listener);
}
}
@@ -23,4 +23,4 @@ package android.location;
interface ICountryListener
{
void onCountryDetected(Country country);
}
}
@@ -14,4 +14,4 @@ public class APN {
public APN() {
}
}
}
@@ -7,4 +7,4 @@ public class MMSPart {
public String MimeType = "";
public byte[] Data;
public Uri Path;
}
}
@@ -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;
}
}
}
@@ -4,6 +4,7 @@ import android.util.Log;
import android.view.View;
import com.moez.QKSMS.R;
import com.moez.QKSMS.data.Conversation;
import com.moez.QKSMS.transaction.SmsHelper;
import com.moez.QKSMS.ui.MainActivity;
import com.moez.QKSMS.ui.conversationlist.ConversationListAdapter;
import com.moez.QKSMS.ui.dialog.DefaultSmsHelper;
@@ -22,6 +23,27 @@ public class DialogHelper {
showDeleteConversationDialog(context, threadIds);
}
public static void showDeleteFailedMessagesDialog(final MainActivity context, final long threadId) {
new DefaultSmsHelper(context, null, R.string.not_default_delete).showIfNotDefault(null);
new QKDialog()
.setContext(context)
.setTitle(R.string.delete_all_failed)
.setMessage(R.string.delete_all_failed_confirmation)
.setPositiveButton(R.string.yes, new View.OnClickListener() {
@Override
public void onClick(View v) {
new Thread(new Runnable() {
public void run() {
SmsHelper.deleteFailedMessages(context, threadId);
}
}).start();
}
}).setNegativeButton(R.string.cancel, null)
.show(context.getFragmentManager(), QKDialog.CONFIRMATION_TAG);
}
public static void showDeleteConversationDialog(final MainActivity context, final List<Long> threadIds) {
new DefaultSmsHelper(context, null, R.string.not_default_delete).showIfNotDefault(null);
@@ -70,4 +92,5 @@ public class DialogHelper {
}).setNegativeButton(R.string.cancel, null)
.show(context.getFragmentManager(), QKDialog.CONFIRMATION_TAG);
}
}
@@ -121,12 +121,12 @@ public class FontManager {
}
// Otherwise, get the heavy font weight.
if (fontWeight == RobotoTypefaceManager.TextWeight.LIGHT) {
return RobotoTypefaceManager.TextWeight.NORMAL;
} else if (fontFamily == RobotoTypefaceManager.FontFamily.ROBOTO) {
return RobotoTypefaceManager.TextWeight.MEDIUM;
if (fontWeight == TypefaceManager.TextWeight.LIGHT) {
return TypefaceManager.TextWeight.NORMAL;
} else if (fontFamily == TypefaceManager.FontFamily.ROBOTO || fontFamily == TypefaceManager.FontFamily.LATO) {
return TypefaceManager.TextWeight.MEDIUM;
} else {
return RobotoTypefaceManager.TextWeight.BOLD;
return TypefaceManager.TextWeight.BOLD;
}
}
}
@@ -29,13 +29,13 @@ import com.moez.QKSMS.R;
*
* @author Evgeny Shishkin
*/
public class RobotoTextViewUtils {
public class TextViewUtils {
private RobotoTextViewUtils() {
private TextViewUtils() {
}
/**
* Typeface initialization using the attributes. Used in RobotoTextView constructor.
* Typeface initialization using the attributes. Used in TextView constructor.
*
* @param textView The roboto text view
* @param context The context the widget is running in, through which it can
@@ -49,15 +49,15 @@ public class RobotoTextViewUtils {
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.RobotoTextView);
if (a.hasValue(R.styleable.RobotoTextView_typeface)) {
int typefaceValue = a.getInt(R.styleable.RobotoTextView_typeface, RobotoTypefaceManager.Typeface.ROBOTO_REGULAR);
typeface = RobotoTypefaceManager.obtainTypeface(context, typefaceValue);
int typefaceValue = a.getInt(R.styleable.RobotoTextView_typeface, TypefaceManager.Typeface.ROBOTO_REGULAR);
typeface = TypefaceManager.obtainTypeface(context, typefaceValue);
}
a.recycle();
}
if (typeface == null) {
typeface = RobotoTypefaceManager.obtainTypeface(context, RobotoTypefaceManager.Typeface.ROBOTO_REGULAR);
typeface = TypefaceManager.obtainTypeface(context, TypefaceManager.Typeface.ROBOTO_REGULAR);
}
setTypeface(textView, typeface);
@@ -86,4 +86,4 @@ public class RobotoTextViewUtils {
paint.setTypeface(typeface);
}
}
}
@@ -6,7 +6,7 @@ import android.util.SparseArray;
/**
* Stripped down version of https://github.com/johnkil/Android-RobotoTextView/blob/master/robototextview/src/main/java/com/devspark/robototextview/util/RobotoTypefaceManager.java
*/
public class RobotoTypefaceManager {
public class TypefaceManager {
private final static SparseArray<android.graphics.Typeface> mTypefaces = new SparseArray<>();
@@ -113,6 +113,58 @@ public class RobotoTypefaceManager {
throw new IllegalArgumentException("`textWeight` attribute value " + textWeight +
" is not supported for this font family " + fontFamily);
}
} else if (fontFamily == FontFamily.LATO) {
if (textWeight == TextWeight.NORMAL) {
switch (textStyle) {
case TextStyle.NORMAL:
typeface = Typeface.LATO_REGULAR;
break;
default:
throw new IllegalArgumentException("`textStyle` attribute value " + textStyle +
" is not supported for this fontFamily " + fontFamily +
" and textWeight " + textWeight);
}
} else if (textWeight == TextWeight.THIN) {
switch (textStyle) {
case TextStyle.NORMAL:
typeface = Typeface.LATO_THIN;
break;
default:
throw new IllegalArgumentException("`textStyle` attribute value " + textStyle +
" is not supported for this fontFamily " + fontFamily +
" and textWeight " + textWeight);
}
} else if (textWeight == TextWeight.LIGHT) {
switch (textStyle) {
case TextStyle.NORMAL:
typeface = Typeface.LATO_LIGHT;
break;
default:
throw new IllegalArgumentException("`textStyle` attribute value " + textStyle +
" is not supported for this fontFamily " + fontFamily +
" and textWeight " + textWeight);
}
} else if (textWeight == TextWeight.MEDIUM) {
switch (textStyle) {
case TextStyle.NORMAL:
typeface = Typeface.LATO_MEDIUM;
break;
default:
throw new IllegalArgumentException("`textStyle` attribute value " + textStyle +
" is not supported for this fontFamily " + fontFamily +
" and textWeight " + textWeight);
}
} else if (textWeight == TextWeight.BOLD) {
switch (textStyle) {
default:
throw new IllegalArgumentException("`textStyle` attribute value " + textStyle +
" is not supported for this fontFamily " + fontFamily +
" and textWeight " + textWeight);
}
} else {
throw new IllegalArgumentException("`textWeight` attribute value " + textWeight +
" is not supported for this font family " + fontFamily);
}
} else {
throw new IllegalArgumentException("Unknown `fontFamily` attribute value " + fontFamily);
}
@@ -143,6 +195,18 @@ public class RobotoTypefaceManager {
case Typeface.ROBOTO_CONDENSED_BOLD:
typefacePath = "fonts/RobotoCondensed-Bold.ttf";
break;
case Typeface.LATO_THIN:
typefacePath = "fonts/Lato-Hairline.ttf";
break;
case Typeface.LATO_LIGHT:
typefacePath = "fonts/Lato-Light.ttf";
break;
case Typeface.LATO_REGULAR:
typefacePath = "fonts/Lato-Regular.ttf";
break;
case Typeface.LATO_MEDIUM:
typefacePath = "fonts/Lato-Bold.ttf";
break;
default:
throw new IllegalArgumentException("Unknown `typeface` attribute value " + typefaceValue);
}
@@ -158,11 +222,16 @@ public class RobotoTypefaceManager {
public final static int ROBOTO_CONDENSED_LIGHT = 12;
public final static int ROBOTO_CONDENSED_REGULAR = 14;
public final static int ROBOTO_CONDENSED_BOLD = 16;
public final static int LATO_THIN = 22;
public final static int LATO_LIGHT = 24;
public final static int LATO_REGULAR = 26;
public final static int LATO_MEDIUM = 28;
}
public class FontFamily {
public static final int ROBOTO = 0;
public static final int ROBOTO_CONDENSED = 1;
public static final int LATO = 2;
}
public class TextWeight {
@@ -177,4 +246,4 @@ public class RobotoTypefaceManager {
public static final int NORMAL = 0;
}
}
}
@@ -846,4 +846,4 @@ public class Emojis {
public static final String LARGE_BLUE_DIAMOND = "large_blue_diamond";
public static final String SMALL_ORANGE_DIAMOND = "small_orange_diamond";
public static final String SMALL_BLUE_DIAMOND = "small_blue_diamond";
}
}
@@ -257,4 +257,4 @@ public class DraftCache {
String s = String.format(format, args);
Log.d(TAG, "[DraftCache/" + Thread.currentThread().getId() + "] " + s);
}
}
}
@@ -4,91 +4,107 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.text.format.DateUtils;
import com.moez.QKSMS.QKSMSApp;
import com.moez.QKSMS.R;
import com.moez.QKSMS.ui.MainActivity;
import com.moez.QKSMS.ui.settings.SettingsFragment;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public abstract class DateFormatter {
public static String getConversationTimestamp(Context context, long date) {
SharedPreferences prefs = MainActivity.getPrefs(context);
SimpleDateFormat formatter = new SimpleDateFormat("D, y");
SimpleDateFormat formatter;
if (formatter.format(date).equals(formatter.format(System.currentTimeMillis()))) {
formatter = new SimpleDateFormat(prefs.getBoolean(SettingsFragment.TIMESTAMPS_24H, false) ? "H:mm" : "h:mm a");
if (isSameDay(date)) {
formatter = accountFor24HourTime(context, new SimpleDateFormat("h:mm a"));
} else if (isSameWeek(date)) {
formatter = new SimpleDateFormat("EEE");
} else if (isSameYear(date)) {
formatter = new SimpleDateFormat("MMM d");
} else {
formatter = new SimpleDateFormat("w, y");
if (formatter.format(date).equals(formatter.format(System.currentTimeMillis()))) {
formatter = new SimpleDateFormat("EEE");
} else {
formatter = new SimpleDateFormat("y");
if (formatter.format(date).equals(formatter.format(System.currentTimeMillis()))) {
formatter = new SimpleDateFormat("MMM d");
} else {
formatter = new SimpleDateFormat("MMM d y");
}
}
formatter = new SimpleDateFormat("MMM d y");
}
return formatter.format(date);
}
public static String getMessageTimestamp(Context context, long date) {
private static boolean isSameDay(long date) {
SimpleDateFormat formatter = new SimpleDateFormat("D, y");
return formatter.format(date).equals(formatter.format(System.currentTimeMillis()));
}
private static boolean isSameWeek(long date) {
SimpleDateFormat formatter = new SimpleDateFormat("w, y");
return formatter.format(date).equals(formatter.format(System.currentTimeMillis()));
}
private static boolean isSameYear(long date) {
SimpleDateFormat formatter = new SimpleDateFormat("y");
return formatter.format(date).equals(formatter.format(System.currentTimeMillis()));
}
private static boolean isYesterday(long date) {
SimpleDateFormat formatter = new SimpleDateFormat("yD");
return Integer.parseInt(formatter.format(date)) + 1 == Integer.parseInt(formatter.format(System.currentTimeMillis()));
}
public static SimpleDateFormat accountFor24HourTime(Context context, SimpleDateFormat input) { //pass in 12 hour time. If needed, change to 24 hr.
SharedPreferences prefs = MainActivity.getPrefs(context);
boolean isUsing24HourTime = prefs.getBoolean(SettingsFragment.TIMESTAMPS_24H, false);
SimpleDateFormat formatter = new SimpleDateFormat("D, y");
if (formatter.format(date).equals(formatter.format(System.currentTimeMillis()))) {
return new SimpleDateFormat(isUsing24HourTime ? "H:mm" : "h:mm a").format(date);
if (isUsing24HourTime) {
return new SimpleDateFormat(input.toPattern().replace('h', 'H').replaceAll(" a", ""));
} else return input;
}
public static SimpleDateFormat accountForFlippedDayMonth(SimpleDateFormat input) { //Pass in MMM d, if needed, change to d MMM. fix https://github.com/qklabs/qksms/issues/128.
boolean shouldBeFlipped = !(Locale.getDefault().equals(Locale.US) || Locale.getDefault().equals(Locale.CANADA));
if (shouldBeFlipped) {
return new SimpleDateFormat(input.toPattern().replaceAll("MMM", "temp").replaceAll("d", "MMM").replaceAll("temp", "d"));
} else return input;
}
public static String getMessageTimestamp(Context context, long date) {
if (isSameDay(date)) {
return accountFor24HourTime(context, new SimpleDateFormat("h:mm a")).format(date);
} else if (isYesterday(date)) {
return context.getString(R.string.date_yesterday) +" " + accountFor24HourTime(context, new SimpleDateFormat("h:mm a")).format(date);
} else if (isSameWeek(date)) {
return accountFor24HourTime(context, new SimpleDateFormat("EEE h:mm a")).format(date);
} else if (isSameYear(date)) {
return accountForFlippedDayMonth(accountFor24HourTime(context, new SimpleDateFormat("MMM d, h:mm a"))).format(date);
}
// Yesterday
formatter = new SimpleDateFormat("yD");
if (Integer.parseInt(formatter.format(date)) + 1 == Integer.parseInt(formatter.format(System.currentTimeMillis()))) {
return "Yesterday " + new SimpleDateFormat(isUsing24HourTime ? "H:mm" : "h:mm a").format(date);
}
// In the same week
formatter = new SimpleDateFormat("w, y");
if (formatter.format(date).equals(formatter.format(System.currentTimeMillis()))) {
return new SimpleDateFormat(isUsing24HourTime ? "EEE H:mm" : "EEE h:mm a").format(date);
}
// In the same year
formatter = new SimpleDateFormat("y");
if (formatter.format(date).equals(formatter.format(System.currentTimeMillis()))) {
return new SimpleDateFormat(isUsing24HourTime ? "MMM d, H:mm" : "MMM d, h:mm a").format(date);
}
return new SimpleDateFormat(isUsing24HourTime ? "MMM d y, H:mm" : "MMM d y, h:mm a").format(date);
return accountForFlippedDayMonth(accountFor24HourTime(context, new SimpleDateFormat("MMM d y, h:mm a"))).format(date);
}
public static String getDate(Context context, long date) {
SharedPreferences prefs = MainActivity.getPrefs(context);
SimpleDateFormat formatter = new SimpleDateFormat(prefs.getBoolean(SettingsFragment.TIMESTAMPS_24H, false) ? "MMMM d y, H:mm:ss" : "MMMM d y, h:mm:ss a");
SimpleDateFormat formatter = accountForFlippedDayMonth(accountFor24HourTime(context, new SimpleDateFormat("MMMM d y, h:mm:ss a")));
return formatter.format(date);
}
public static String getRelativeTimestamp(long date) {
String relativeTimestamp = (String) DateUtils.getRelativeTimeSpanString(date);
if (relativeTimestamp.equals("in 0 minutes") || relativeTimestamp.equals("0 minutes ago"))
return "Just now";
return QKSMSApp.getApplication().getString(com.moez.QKSMS.R.string.date_just_now);
return relativeTimestamp;
}
public static String getSummaryTimestamp(Context context, String time) {
SharedPreferences prefs = MainActivity.getPrefs(context);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("H:mm");
Date date;
try {
date = simpleDateFormat.parse(time);
simpleDateFormat = prefs.getBoolean(SettingsFragment.TIMESTAMPS_24H, false) ? new SimpleDateFormat("H:mm") : new SimpleDateFormat("h:mm a");
simpleDateFormat = accountFor24HourTime(context, new SimpleDateFormat("H:mm"));
time = simpleDateFormat.format(date);
} catch (Exception e) {
} catch (ParseException e) {
e.printStackTrace();
}
@@ -120,4 +120,4 @@ public class AndroidCustomField extends VCardProperty {
warnings.add(new Warning("Items must contain exactly one value."));
}
}
}
}
@@ -557,4 +557,4 @@ public class ContactOperations {
return contentValues;
}
}
}
}
@@ -284,4 +284,4 @@ public class DataMappings {
private DataMappings(){
//hide constructor
}
}
}
@@ -1182,4 +1182,4 @@ public class Contact {
private static void log(String msg) {
Log.d(TAG, msg);
}
}
}
@@ -17,7 +17,7 @@ import android.provider.BaseColumns;
import android.provider.ContactsContract;
import android.telephony.PhoneNumberUtils;
import android.util.Log;
import com.moez.QKSMS.common.RobotoTypefaceManager;
import com.moez.QKSMS.common.TypefaceManager;
import com.moez.QKSMS.common.utils.Units;
import com.moez.QKSMS.ui.MainActivity;
import com.moez.QKSMS.ui.ThemeManager;
@@ -205,7 +205,7 @@ public class ContactHelper {
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
paint.setColor(Color.WHITE);
paint.setTypeface(RobotoTypefaceManager.obtainTypeface(context, RobotoTypefaceManager.Typeface.ROBOTO_LIGHT));
paint.setTypeface(TypefaceManager.obtainTypeface(context, TypefaceManager.Typeface.ROBOTO_LIGHT));
paint.setTextSize(length / 2);
Rect bounds = new Rect();
@@ -175,4 +175,4 @@ public class ContactList extends ArrayList<Contact> {
private void log(String msg) {
Log.d(LogTag.TAG, "[ContactList] " + msg);
}
}
}
@@ -1468,4 +1468,4 @@ public class Conversation {
}
return address;
}
}
}
@@ -318,4 +318,4 @@ public class ConversationLegacy {
}
}.execute((Void[]) null);
}
}
}
@@ -193,4 +193,4 @@ public class Message {
e.printStackTrace();
}
}
}
}
@@ -273,4 +273,4 @@ public class RecipientIdCache {
}.start();
}
}
}
@@ -133,4 +133,4 @@ class CountedDataInputStream extends FilterInputStream {
readOrThrow(buf);
return new String(buf, charset);
}
}
}
@@ -20,4 +20,4 @@ public class ExifInvalidFormatException extends Exception {
public ExifInvalidFormatException(String meg) {
super(meg);
}
}
}
@@ -40,4 +40,4 @@ public class IabException extends Exception {
/** Returns the IAB result (error) that this exception signals. */
public IabResult getResult() { return mResult; }
}
}
@@ -18,4 +18,4 @@ public class MarkSeenService extends IntentService {
SmsHelper.markMmsSeen(this);
NotificationManager.update(this);
}
}
}
@@ -542,6 +542,35 @@ public class SmsHelper {
return messages;
}
public static List<Message> deleteFailedMessages(Context context, long threadId) {
Log.d(TAG, "Deleting failed messages");
List<Message> messages = new ArrayList<Message>();
try {
cursor = context.getContentResolver().query(SMS_CONTENT_PROVIDER, new String[]{COLUMN_ID}, FAILED_SELECTION, null, sortDateDesc);
cursor.moveToFirst();
for (int i = 0; i < cursor.getCount(); i++) {
messages.add(new Message(context, cursor.getLong(cursor.getColumnIndexOrThrow(COLUMN_ID))));
cursor.moveToNext();
}
} catch (Exception e) {
e.printStackTrace();
} finally {
cursor.close();
}
for (Message m : messages)
{
if(m.getThreadId() == threadId) {
Log.d(TAG, "Deleting failed message to " + m.getName() + "\n Body: " + m.getBody());
m.delete();
}
}
return messages;
}
/**
* Add an SMS to the given URI.
*
@@ -51,8 +51,9 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
private final int MENU_VIEW_DETAILS = 3;
private final int MENU_MARK_READ = 4;
private final int MENU_MARK_UNREAD = 5;
private final int MENU_DELETE_CONVERSATION = 6;
private final int MENU_MULTI_SELECT = 7;
private final int MENU_DELETE_FAILED = 6;
private final int MENU_DELETE_CONVERSATION = 7;
private final int MENU_MULTI_SELECT = 8;
private RecyclerView mRecyclerView;
private FloatingActionButton mFab;
@@ -193,6 +194,10 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
dialog.addMenuItem(R.string.menu_notification_settings, MENU_NOTIFICATION_SETTINGS);
dialog.addMenuItem(R.string.menu_view_details, MENU_VIEW_DETAILS);
if (conversation.hasError()) {
dialog.addMenuItem(R.string.delete_all_failed, MENU_DELETE_FAILED);
}
dialog.addMenuItem(R.string.menu_delete_conversation, MENU_DELETE_CONVERSATION);
dialog.buildMenu(new AdapterView.OnItemClickListener() {
@@ -233,6 +238,10 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
case MENU_DELETE_CONVERSATION:
DialogHelper.showDeleteConversationDialog((MainActivity) mContext, threadId);
break;
case MENU_DELETE_FAILED:
//Deletes all failed messages from all conversations
DialogHelper.showDeleteFailedMessagesDialog((MainActivity) mContext, threadId);
break;
}
}
}).show(((MainActivity) mContext).getFragmentManager(), "conversation options");
@@ -159,4 +159,4 @@ public class AsyncDialog {
}
}
}
}
}
@@ -60,4 +60,4 @@ public class MessageItemCache extends LruCache<Long, MessageItem> {
}
return item;
}
}
}
@@ -1,5 +1,6 @@
package com.moez.QKSMS.ui.messagelist;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.LoaderManager;
import android.content.ClipData;
@@ -218,8 +219,8 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa
}
@Override
public void onStart() {
super.onStart();
public void onAttach(Activity activity) {
super.onAttach(activity);
// Make sure to notify that this conversation has been opened. This will mark it as read, load new drafts, etc.
onOpenConversation();
@@ -234,4 +234,4 @@ public class MessageListViewHolder extends ClickyViewHolder<MessageItem> impleme
}
}
}
}
}
@@ -148,4 +148,4 @@ public class QKComposeActivity extends QKPopupActivity implements ComposeView.On
mStarredContactsView.collapse();
mCompose.requestReplyTextFocus();
}
}
}
@@ -64,4 +64,4 @@ class ViewHolder {
int position;
QKTextView mResponseIndex;
QKEditText mResponse;
}
}
@@ -10,7 +10,7 @@ import com.android.ex.chips.RecipientEditTextView;
import com.moez.QKSMS.interfaces.LiveView;
import com.moez.QKSMS.common.FontManager;
import com.moez.QKSMS.common.LiveViewManager;
import com.moez.QKSMS.common.RobotoTypefaceManager;
import com.moez.QKSMS.common.TypefaceManager;
import com.moez.QKSMS.ui.MainActivity;
import com.moez.QKSMS.ui.ThemeManager;
import com.moez.QKSMS.ui.settings.SettingsFragment;
@@ -57,8 +57,8 @@ public class AutoCompleteContactView extends RecipientEditTextView implements Li
@Override
public void refresh() {
setTypeface(RobotoTypefaceManager.obtainTypeface(mContext, FontManager.getFontFamily(mContext),
FontManager.getFontWeight(mContext, false), RobotoTypefaceManager.TextStyle.NORMAL));
setTypeface(TypefaceManager.obtainTypeface(mContext, FontManager.getFontFamily(mContext),
FontManager.getFontWeight(mContext, false), TypefaceManager.TextStyle.NORMAL));
setTextSize(TypedValue.COMPLEX_UNIT_SP, FontManager.getTextSize(mContext, FontManager.TEXT_TYPE_PRIMARY));
setTextColor(ThemeManager.getTextOnBackgroundPrimary());
@@ -24,7 +24,7 @@ import android.widget.ImageView;
import com.moez.QKSMS.R;
import com.moez.QKSMS.interfaces.LiveView;
import com.moez.QKSMS.common.LiveViewManager;
import com.moez.QKSMS.common.RobotoTypefaceManager;
import com.moez.QKSMS.common.TypefaceManager;
import com.moez.QKSMS.common.utils.ImageUtils;
import com.moez.QKSMS.common.utils.PhoneNumberUtils;
import com.moez.QKSMS.common.utils.Units;
@@ -77,7 +77,7 @@ public class AvatarView extends ImageView implements View.OnClickListener, LiveV
mPaint.setTextSize(Units.dpToPx(context, 32));
mPaint.setTextAlign(Paint.Align.CENTER);
mPaint.setAntiAlias(true);
mPaint.setTypeface(RobotoTypefaceManager.obtainTypeface(context, RobotoTypefaceManager.Typeface.ROBOTO_LIGHT));
mPaint.setTypeface(TypefaceManager.obtainTypeface(context, TypefaceManager.Typeface.ROBOTO_LIGHT));
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AvatarView, defStyle, 0);
for (int i = 0; i < a.getIndexCount(); i++) {
@@ -357,7 +357,7 @@ public class ComposeView extends LinearLayout implements View.OnClickListener, L
if (mButtonState != buttonState) {
mButtonState = buttonState;
float translation = Units.dpToPx(mContext, 16) / 3;
float translation = Units.dpToPx(mContext, 14) / 3;
float barRotation1 = mButtonBar1.getRotation();
float barTranslation1 = mButtonBar1.getTranslationY();
float barRotation2 = mButtonBar2.getRotation();
@@ -367,23 +367,18 @@ public class ComposeView extends LinearLayout implements View.OnClickListener, L
float barRotationTarget2 = mButtonState == SendButtonState.ATTACH ? 90 : 135;
float barTranslationTarget2 = mButtonState == SendButtonState.SEND ? translation : 0;
if (barRotation1 != barRotationTarget1) {
ObjectAnimator.ofFloat(mButtonBar1, "rotation", barRotation1, barRotationTarget1)
.setDuration(ANIMATION_DURATION)
.start();
ObjectAnimator.ofFloat(mButtonBar2, "rotation", barRotation2, barRotationTarget2)
.setDuration(ANIMATION_DURATION)
.start();
}
if (barTranslation1 != barTranslationTarget1) {
ObjectAnimator.ofFloat(mButtonBar1, "translationY", barTranslation1, barTranslationTarget1)
.setDuration(ANIMATION_DURATION)
.start();
ObjectAnimator.ofFloat(mButtonBar2, "translationY", barTranslation2, barTranslationTarget2)
.setDuration(ANIMATION_DURATION)
.start();
}
ObjectAnimator.ofFloat(mButtonBar1, "rotation", barRotation1, barRotationTarget1)
.setDuration(ANIMATION_DURATION)
.start();
ObjectAnimator.ofFloat(mButtonBar2, "rotation", barRotation2, barRotationTarget2)
.setDuration(ANIMATION_DURATION)
.start();
ObjectAnimator.ofFloat(mButtonBar1, "translationY", barTranslation1, barTranslationTarget1)
.setDuration(ANIMATION_DURATION)
.start();
ObjectAnimator.ofFloat(mButtonBar2, "translationY", barTranslation2, barTranslationTarget2)
.setDuration(ANIMATION_DURATION)
.start();
}
}
@@ -77,4 +77,4 @@ public class MessageListRecyclerView extends RecyclerView {
return mContextMenuInfo;
}
}
}
@@ -37,4 +37,4 @@ public class MmsImageView extends ImageView {
super.setImageDrawable(drawable);
}
}
}
}
@@ -11,7 +11,7 @@ import android.util.TypedValue;
import com.moez.QKSMS.interfaces.LiveView;
import com.moez.QKSMS.common.FontManager;
import com.moez.QKSMS.common.LiveViewManager;
import com.moez.QKSMS.common.RobotoTypefaceManager;
import com.moez.QKSMS.common.TypefaceManager;
import com.moez.QKSMS.ui.ThemeManager;
import com.moez.QKSMS.ui.settings.SettingsFragment;
@@ -97,8 +97,8 @@ public class QKEditText extends android.widget.EditText implements LiveView {
// Typeface and colors
int fontFamily = FontManager.getFontFamily(mContext);
int fontWeight = FontManager.getFontWeight(mContext, false);
setTypeface(RobotoTypefaceManager.obtainTypeface(mContext, fontFamily, fontWeight,
RobotoTypefaceManager.TextStyle.NORMAL));
setTypeface(TypefaceManager.obtainTypeface(mContext, fontFamily, fontWeight,
TypefaceManager.TextStyle.NORMAL));
setTextColor(ThemeManager.getTextOnBackgroundPrimary());
setHintTextColor(ThemeManager.getTextOnBackgroundSecondary());
@@ -74,4 +74,4 @@ public class QKLinearLayout extends LinearLayout {
background.mutate().setColorFilter(mBackgroundTint, PorterDuff.Mode.MULTIPLY);
super.setBackgroundDrawable(background);
}
}
}
@@ -11,7 +11,7 @@ import android.widget.TextView;
import com.moez.QKSMS.interfaces.LiveView;
import com.moez.QKSMS.common.FontManager;
import com.moez.QKSMS.common.LiveViewManager;
import com.moez.QKSMS.common.RobotoTypefaceManager;
import com.moez.QKSMS.common.TypefaceManager;
import com.moez.QKSMS.common.utils.MessageUtils;
import com.moez.QKSMS.ui.MainActivity;
import com.moez.QKSMS.ui.ThemeManager;
@@ -162,8 +162,8 @@ public class QKTextView extends TextView implements LiveView {
// Typeface
int fontFamily = FontManager.getFontFamily(mContext);
int fontWeight = FontManager.getFontWeight(mContext, FontManager.getIsFontHeavy(mType));
setTypeface(RobotoTypefaceManager.obtainTypeface(mContext, fontFamily, fontWeight,
RobotoTypefaceManager.TextStyle.NORMAL));
setTypeface(TypefaceManager.obtainTypeface(mContext, fontFamily, fontWeight,
TypefaceManager.TextStyle.NORMAL));
// Text size and color
setTextSize(TypedValue.COMPLEX_UNIT_SP, FontManager.getTextSize(mContext, mType));
@@ -172,4 +172,4 @@ public class QKTextView extends TextView implements LiveView {
// Markdown support enabled
setText(getText(), BufferType.NORMAL);
}
}
}
@@ -3,7 +3,7 @@ package com.moez.QKSMS.ui.view;
import android.content.Context;
import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;
import com.moez.QKSMS.common.RobotoTextViewUtils;
import com.moez.QKSMS.common.TextViewUtils;
public class RobotoTextView extends AppCompatTextView {
@@ -15,7 +15,7 @@ public class RobotoTextView extends AppCompatTextView {
super(context, attrs);
if (!isInEditMode()) {
RobotoTextViewUtils.initTypeface(this, context, attrs);
TextViewUtils.initTypeface(this, context, attrs);
}
}
@@ -23,8 +23,8 @@ public class RobotoTextView extends AppCompatTextView {
super(context, attrs, defStyle);
if (!isInEditMode()) {
RobotoTextViewUtils.initTypeface(this, context, attrs);
TextViewUtils.initTypeface(this, context, attrs);
}
}
}
}
@@ -189,4 +189,4 @@ public class WrappingLinearLayoutManager extends android.support.v7.widget.Linea
recycler.recycleView(child);
}
}
}
@@ -116,4 +116,4 @@ public class ColorPickerDialog extends DialogFragment implements ColorPickerSwat
mPalette.setVisibility(View.GONE);
}
}
}
}
@@ -128,4 +128,4 @@ public class ColorPickerPalette extends TableLayout {
mDescription = resources.getString(R.string.color_swatch_description);
mDescriptionSelected = resources.getString(R.string.color_swatch_description_selected);
}
}
}
@@ -50,4 +50,4 @@ public class ColorPickerSwatch extends FrameLayout implements View.OnClickListen
public interface OnColorSelectedListener {
void onColorSelected(int color);
}
}
}
@@ -40,4 +40,4 @@ public class ColorStateDrawable extends LayerDrawable {
return super.onStateChange(states);
}
}
}
@@ -296,4 +296,4 @@ public class WidgetService extends RemoteViewsService {
}
}
}
}
@@ -6,4 +6,4 @@
<corners android:radius="2dp" />
</shape>
</item>
</ripple>
</ripple>
@@ -6,4 +6,4 @@
<corners android:radius="2dp" />
</shape>
</item>
</ripple>
</ripple>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 776 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 902 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 998 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Some files were not shown because too many files have changed in this diff Show More