Move packages to com.moez.QKSMS

This commit is contained in:
Moez Bhatti
2018-06-20 14:29:07 -04:00
parent d8141737b3
commit a5f518042e
268 changed files with 1101 additions and 1116 deletions
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package compat package com.moez.QKSMS.compat
import android.annotation.TargetApi import android.annotation.TargetApi
import android.os.Build import android.os.Build
@@ -16,12 +16,12 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package compat package com.moez.QKSMS.compat
import android.content.Context import android.content.Context
import android.os.Build import android.os.Build
import android.telephony.SubscriptionManager import android.telephony.SubscriptionManager
import manager.PermissionManager import com.moez.QKSMS.manager.PermissionManager
import javax.inject.Inject import javax.inject.Inject
class SubscriptionManagerCompat @Inject constructor(context: Context, private val permissions: PermissionManager) { class SubscriptionManagerCompat @Inject constructor(context: Context, private val permissions: PermissionManager) {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package compat package com.moez.QKSMS.compat
import android.content.Context import android.content.Context
import android.database.sqlite.SqliteWrapper import android.database.sqlite.SqliteWrapper
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package util.extensions package com.moez.QKSMS.extensions
import android.database.Cursor import android.database.Cursor
import io.reactivex.Flowable import io.reactivex.Flowable
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package util.extensions package com.moez.QKSMS.extensions
import com.google.android.mms.ContentType import com.google.android.mms.ContentType
import model.MmsPart import com.moez.QKSMS.model.MmsPart
fun MmsPart.isSmil() = ContentType.APP_SMIL == type fun MmsPart.isSmil() = ContentType.APP_SMIL == type
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package util.extensions package com.moez.QKSMS.extensions
import io.reactivex.Observable import io.reactivex.Observable
import io.realm.Realm import io.realm.Realm
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package util.extensions package com.moez.QKSMS.extensions
import java.text.Normalizer import java.text.Normalizer
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package filter package com.moez.QKSMS.filter
import model.Contact import com.moez.QKSMS.extensions.removeAccents
import util.extensions.removeAccents import com.moez.QKSMS.model.Contact
import javax.inject.Inject import javax.inject.Inject
class ContactFilter @Inject constructor(private val phoneNumberFilter: PhoneNumberFilter) : Filter<Contact>() { class ContactFilter @Inject constructor(private val phoneNumberFilter: PhoneNumberFilter) : Filter<Contact>() {
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package filter package com.moez.QKSMS.filter
import model.Conversation import com.moez.QKSMS.model.Conversation
import javax.inject.Inject import javax.inject.Inject
class ConversationFilter @Inject constructor(private val recipientFilter: RecipientFilter) : Filter<Conversation>() { class ConversationFilter @Inject constructor(private val recipientFilter: RecipientFilter) : Filter<Conversation>() {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package filter package com.moez.QKSMS.filter
abstract class Filter<in T> { abstract class Filter<in T> {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package filter package com.moez.QKSMS.filter
import android.telephony.PhoneNumberUtils import android.telephony.PhoneNumberUtils
import javax.inject.Inject import javax.inject.Inject
@@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package filter package com.moez.QKSMS.filter
import model.Recipient import com.moez.QKSMS.model.Recipient
import javax.inject.Inject import javax.inject.Inject
class RecipientFilter @Inject constructor( class RecipientFilter @Inject constructor(
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package manager package com.moez.QKSMS.manager
import android.content.ComponentName import android.content.ComponentName
import android.content.Context import android.content.Context
@@ -27,11 +27,11 @@ import android.os.IBinder
import android.os.Message import android.os.Message
import android.os.Messenger import android.os.Messenger
import androidx.os.bundleOf import androidx.os.bundleOf
import com.moez.QKSMS.util.Preferences
import com.moez.QKSMS.util.tryOrNull
import io.reactivex.Single import io.reactivex.Single
import io.reactivex.subjects.SingleSubject import io.reactivex.subjects.SingleSubject
import timber.log.Timber import timber.log.Timber
import util.Preferences
import util.tryOrNull
import javax.inject.Inject import javax.inject.Inject
class ExternalBlockingManagerImpl @Inject constructor( class ExternalBlockingManagerImpl @Inject constructor(
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package manager package com.moez.QKSMS.manager
import com.moez.QKSMS.model.Message
import io.realm.Realm import io.realm.Realm
import model.Message
import javax.inject.Inject import javax.inject.Inject
import javax.inject.Singleton import javax.inject.Singleton
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package manager package com.moez.QKSMS.manager
import android.Manifest import android.Manifest
import android.content.Context import android.content.Context
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package manager package com.moez.QKSMS.manager
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
@@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package mapper package com.moez.QKSMS.mapper
import android.content.Context import android.content.Context
import android.database.Cursor import android.database.Cursor
import android.provider.ContactsContract.CommonDataKinds.Phone.* import android.provider.ContactsContract.CommonDataKinds.Phone.*
import manager.PermissionManager import com.moez.QKSMS.manager.PermissionManager
import model.Contact import com.moez.QKSMS.model.Contact
import model.PhoneNumber import com.moez.QKSMS.model.PhoneNumber
import javax.inject.Inject import javax.inject.Inject
class CursorToContactImpl @Inject constructor( class CursorToContactImpl @Inject constructor(
@@ -16,15 +16,15 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package mapper package com.moez.QKSMS.mapper
import android.content.Context import android.content.Context
import android.database.Cursor import android.database.Cursor
import android.net.Uri import android.net.Uri
import android.provider.Telephony.Threads import android.provider.Telephony.Threads
import manager.PermissionManager import com.moez.QKSMS.manager.PermissionManager
import model.Conversation import com.moez.QKSMS.model.Conversation
import model.Recipient import com.moez.QKSMS.model.Recipient
import javax.inject.Inject import javax.inject.Inject
class CursorToConversationImpl @Inject constructor( class CursorToConversationImpl @Inject constructor(
@@ -16,17 +16,17 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package mapper package com.moez.QKSMS.mapper
import android.content.Context import android.content.Context
import android.database.Cursor import android.database.Cursor
import android.net.Uri import android.net.Uri
import android.provider.Telephony.* import android.provider.Telephony.*
import com.google.android.mms.pdu_alt.PduHeaders import com.google.android.mms.pdu_alt.PduHeaders
import manager.KeyManager import com.moez.QKSMS.extensions.map
import manager.PermissionManager import com.moez.QKSMS.manager.KeyManager
import model.Message import com.moez.QKSMS.manager.PermissionManager
import util.extensions.map import com.moez.QKSMS.model.Message
import javax.inject.Inject import javax.inject.Inject
class CursorToMessageImpl @Inject constructor( class CursorToMessageImpl @Inject constructor(
@@ -16,19 +16,19 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package mapper package com.moez.QKSMS.mapper
import android.content.ContentUris import android.content.ContentUris
import android.content.Context import android.content.Context
import android.database.Cursor import android.database.Cursor
import android.net.Uri import android.net.Uri
import android.provider.Telephony import android.provider.Telephony
import model.MmsPart import com.moez.QKSMS.extensions.isImage
import com.moez.QKSMS.extensions.isSmil
import com.moez.QKSMS.extensions.isText
import com.moez.QKSMS.extensions.isVideo
import com.moez.QKSMS.model.MmsPart
import timber.log.Timber import timber.log.Timber
import util.extensions.isImage
import util.extensions.isSmil
import util.extensions.isText
import util.extensions.isVideo
import java.io.BufferedReader import java.io.BufferedReader
import java.io.InputStreamReader import java.io.InputStreamReader
import javax.inject.Inject import javax.inject.Inject
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package mapper package com.moez.QKSMS.mapper
import android.content.Context import android.content.Context
import android.database.Cursor import android.database.Cursor
import android.net.Uri import android.net.Uri
import manager.PermissionManager import com.moez.QKSMS.manager.PermissionManager
import model.Recipient import com.moez.QKSMS.model.Recipient
import javax.inject.Inject import javax.inject.Inject
class CursorToRecipientImpl @Inject constructor( class CursorToRecipientImpl @Inject constructor(
@@ -16,12 +16,12 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package mapper package com.moez.QKSMS.mapper
import com.f2prateek.rx.preferences2.RxSharedPreferences import com.f2prateek.rx.preferences2.RxSharedPreferences
import com.moez.QKSMS.manager.AnalyticsManager
import com.moez.QKSMS.manager.RatingManager
import io.reactivex.rxkotlin.Observables import io.reactivex.rxkotlin.Observables
import manager.AnalyticsManager
import manager.RatingManager
import javax.inject.Inject import javax.inject.Inject
class RatingManagerImpl @Inject constructor( class RatingManagerImpl @Inject constructor(
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package migration package com.moez.QKSMS.migration
import io.realm.DynamicRealm import io.realm.DynamicRealm
import io.realm.FieldAttribute import io.realm.FieldAttribute
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
@@ -24,9 +24,9 @@ import android.content.Intent
import android.os.Build import android.os.Build
import android.provider.Telephony import android.provider.Telephony
import android.support.annotation.RequiresApi import android.support.annotation.RequiresApi
import com.moez.QKSMS.interactor.SyncMessages
import com.moez.QKSMS.util.Preferences
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.SyncMessages
import util.Preferences
import javax.inject.Inject import javax.inject.Inject
class DefaultSmsChangedReceiver : BroadcastReceiver() { class DefaultSmsChangedReceiver : BroadcastReceiver() {
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import com.moez.QKSMS.interactor.MarkRead
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.MarkRead
import javax.inject.Inject import javax.inject.Inject
class MarkReadReceiver : BroadcastReceiver() { class MarkReadReceiver : BroadcastReceiver() {
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import com.moez.QKSMS.interactor.MarkSeen
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.MarkSeen
import javax.inject.Inject import javax.inject.Inject
class MarkSeenReceiver : BroadcastReceiver() { class MarkSeenReceiver : BroadcastReceiver() {
@@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.net.Uri import android.net.Uri
import com.klinker.android.send_message.MmsReceivedReceiver import com.klinker.android.send_message.MmsReceivedReceiver
import com.moez.QKSMS.interactor.ReceiveMms
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.ReceiveMms
import javax.inject.Inject import javax.inject.Inject
class MmsReceivedReceiver : MmsReceivedReceiver() { class MmsReceivedReceiver : MmsReceivedReceiver() {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import com.android.mms.transaction.PushReceiver import com.android.mms.transaction.PushReceiver
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.app.Activity import android.app.Activity
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
@@ -29,8 +29,8 @@ import android.provider.Telephony
import com.google.android.mms.MmsException import com.google.android.mms.MmsException
import com.google.android.mms.util_alt.SqliteWrapper import com.google.android.mms.util_alt.SqliteWrapper
import com.klinker.android.send_message.Transaction import com.klinker.android.send_message.Transaction
import com.moez.QKSMS.interactor.SyncMessage
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.SyncMessage
import timber.log.Timber import timber.log.Timber
import java.io.File import java.io.File
import javax.inject.Inject import javax.inject.Inject
@@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.net.Uri import android.net.Uri
import com.moez.QKSMS.interactor.SyncMessage
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.SyncMessage
import javax.inject.Inject import javax.inject.Inject
class MmsUpdatedReceiver : BroadcastReceiver() { class MmsUpdatedReceiver : BroadcastReceiver() {
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import com.moez.QKSMS.util.NightModeManager
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import util.NightModeManager
import javax.inject.Inject import javax.inject.Inject
class NightModeReceiver : BroadcastReceiver() { class NightModeReceiver : BroadcastReceiver() {
@@ -16,18 +16,18 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.support.v4.app.RemoteInput import android.support.v4.app.RemoteInput
import compat.SubscriptionManagerCompat import com.moez.QKSMS.compat.SubscriptionManagerCompat
import com.moez.QKSMS.interactor.MarkRead
import com.moez.QKSMS.interactor.SendMessage
import com.moez.QKSMS.repository.ConversationRepository
import com.moez.QKSMS.repository.MessageRepository
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.MarkRead
import interactor.SendMessage
import repository.ConversationRepository
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class RemoteMessagingReceiver : BroadcastReceiver() { class RemoteMessagingReceiver : BroadcastReceiver() {
@@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import com.moez.QKSMS.interactor.RetrySending
import com.moez.QKSMS.repository.MessageRepository
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.RetrySending
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class SendSmsReceiver : BroadcastReceiver() { class SendSmsReceiver : BroadcastReceiver() {
@@ -16,15 +16,15 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.app.Activity import android.app.Activity
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import com.moez.QKSMS.interactor.MarkDelivered
import com.moez.QKSMS.interactor.MarkDeliveryFailed
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.MarkDelivered
import interactor.MarkDeliveryFailed
import javax.inject.Inject import javax.inject.Inject
class SmsDeliveredReceiver : BroadcastReceiver() { class SmsDeliveredReceiver : BroadcastReceiver() {
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import com.moez.QKSMS.interactor.SyncMessage
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.SyncMessage
import javax.inject.Inject import javax.inject.Inject
/** /**
@@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.provider.Telephony.Sms import android.provider.Telephony.Sms
import com.moez.QKSMS.interactor.ReceiveSms
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.ReceiveSms
import javax.inject.Inject import javax.inject.Inject
class SmsReceiver : BroadcastReceiver() { class SmsReceiver : BroadcastReceiver() {
@@ -16,16 +16,16 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package receiver package com.moez.QKSMS.receiver
import android.app.Activity import android.app.Activity
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.telephony.SmsManager import android.telephony.SmsManager
import com.moez.QKSMS.interactor.MarkFailed
import com.moez.QKSMS.interactor.MarkSent
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.MarkFailed
import interactor.MarkSent
import javax.inject.Inject import javax.inject.Inject
class SmsSentReceiver : BroadcastReceiver() { class SmsSentReceiver : BroadcastReceiver() {
@@ -16,20 +16,20 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package repository package com.moez.QKSMS.repository
import android.content.Context import android.content.Context
import android.net.Uri import android.net.Uri
import android.provider.BaseColumns import android.provider.BaseColumns
import android.provider.ContactsContract import android.provider.ContactsContract
import com.moez.QKSMS.extensions.asFlowable
import com.moez.QKSMS.extensions.mapNotNull
import com.moez.QKSMS.model.Contact
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.Single import io.reactivex.Single
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
import io.realm.Realm import io.realm.Realm
import model.Contact
import util.extensions.asFlowable
import util.extensions.mapNotNull
import javax.inject.Inject import javax.inject.Inject
import javax.inject.Singleton import javax.inject.Singleton
@@ -1,24 +1,24 @@
package repository package com.moez.QKSMS.repository
import android.content.ContentUris import android.content.ContentUris
import android.content.Context import android.content.Context
import android.provider.Telephony import android.provider.Telephony
import android.telephony.PhoneNumberUtils import android.telephony.PhoneNumberUtils
import compat.TelephonyCompat import com.moez.QKSMS.compat.TelephonyCompat
import filter.ConversationFilter import com.moez.QKSMS.extensions.anyOf
import com.moez.QKSMS.extensions.map
import com.moez.QKSMS.filter.ConversationFilter
import com.moez.QKSMS.mapper.CursorToConversation
import com.moez.QKSMS.mapper.CursorToRecipient
import com.moez.QKSMS.model.Contact
import com.moez.QKSMS.model.Conversation
import com.moez.QKSMS.model.Message
import com.moez.QKSMS.model.SearchResult
import com.moez.QKSMS.util.tryOrNull
import io.realm.Case import io.realm.Case
import io.realm.Realm import io.realm.Realm
import io.realm.RealmResults import io.realm.RealmResults
import io.realm.Sort import io.realm.Sort
import mapper.CursorToConversation
import mapper.CursorToRecipient
import model.Contact
import model.Conversation
import model.Message
import model.SearchResult
import util.extensions.anyOf
import util.extensions.map
import util.tryOrNull
import javax.inject.Inject import javax.inject.Inject
class ConversationRepositoryImpl @Inject constructor( class ConversationRepositoryImpl @Inject constructor(
@@ -1,4 +1,4 @@
package repository package com.moez.QKSMS.repository
import android.content.ContentResolver import android.content.ContentResolver
import android.content.ContentUris import android.content.ContentUris
@@ -11,7 +11,7 @@ import android.net.Uri
import android.provider.MediaStore import android.provider.MediaStore
import android.provider.MediaStore.Images import android.provider.MediaStore.Images
import android.support.media.ExifInterface import android.support.media.ExifInterface
import util.tryOrNull import com.moez.QKSMS.util.tryOrNull
import javax.inject.Inject import javax.inject.Inject
class ImageRepostoryImpl @Inject constructor(private val context: Context) : ImageRepository { class ImageRepostoryImpl @Inject constructor(private val context: Context) : ImageRepository {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package repository package com.moez.QKSMS.repository
import android.app.AlarmManager import android.app.AlarmManager
import android.app.PendingIntent import android.app.PendingIntent
@@ -27,37 +27,25 @@ import android.content.Intent
import android.graphics.Bitmap import android.graphics.Bitmap
import android.os.Build import android.os.Build
import android.provider.Telephony import android.provider.Telephony
import android.telephony.PhoneNumberUtils
import android.telephony.SmsManager import android.telephony.SmsManager
import com.google.android.mms.ContentType import com.google.android.mms.ContentType
import com.klinker.android.send_message.BroadcastUtils import com.klinker.android.send_message.BroadcastUtils
import com.klinker.android.send_message.Settings import com.klinker.android.send_message.Settings
import com.klinker.android.send_message.StripAccents import com.klinker.android.send_message.StripAccents
import com.klinker.android.send_message.Transaction import com.klinker.android.send_message.Transaction
import compat.TelephonyCompat import com.moez.QKSMS.extensions.anyOf
import filter.ConversationFilter import com.moez.QKSMS.extensions.insertOrUpdate
import com.moez.QKSMS.manager.KeyManager
import com.moez.QKSMS.model.Attachment
import com.moez.QKSMS.model.Conversation
import com.moez.QKSMS.model.Message
import com.moez.QKSMS.model.MmsPart
import com.moez.QKSMS.util.Preferences
import io.realm.Case import io.realm.Case
import io.realm.Realm import io.realm.Realm
import io.realm.RealmList
import io.realm.RealmResults import io.realm.RealmResults
import io.realm.Sort import io.realm.Sort
import manager.KeyManager
import mapper.CursorToConversation
import mapper.CursorToRecipient
import model.Attachment
import model.Contact
import model.Conversation
import model.Message
import model.MmsPart
import model.Recipient
import model.SearchResult
import timber.log.Timber import timber.log.Timber
import util.Preferences
import util.extensions.anyOf
import util.extensions.forEach
import util.extensions.insertOrUpdate
import util.extensions.map
import util.tryOrNull
import java.io.ByteArrayOutputStream import java.io.ByteArrayOutputStream
import javax.inject.Inject import javax.inject.Inject
import javax.inject.Singleton import javax.inject.Singleton
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package repository package com.moez.QKSMS.repository
import android.content.ContentResolver import android.content.ContentResolver
import android.content.ContentUris import android.content.ContentUris
@@ -24,23 +24,23 @@ import android.net.Uri
import android.provider.Telephony import android.provider.Telephony
import android.telephony.PhoneNumberUtils import android.telephony.PhoneNumberUtils
import com.f2prateek.rx.preferences2.RxSharedPreferences import com.f2prateek.rx.preferences2.RxSharedPreferences
import com.moez.QKSMS.extensions.insertOrUpdate
import com.moez.QKSMS.extensions.map
import com.moez.QKSMS.manager.KeyManager
import com.moez.QKSMS.mapper.CursorToContact
import com.moez.QKSMS.mapper.CursorToConversation
import com.moez.QKSMS.mapper.CursorToMessage
import com.moez.QKSMS.mapper.CursorToRecipient
import com.moez.QKSMS.model.Contact
import com.moez.QKSMS.model.Conversation
import com.moez.QKSMS.model.Message
import com.moez.QKSMS.model.MmsPart
import com.moez.QKSMS.model.Recipient
import com.moez.QKSMS.model.SyncLog
import com.moez.QKSMS.util.tryOrNull
import io.reactivex.subjects.BehaviorSubject import io.reactivex.subjects.BehaviorSubject
import io.reactivex.subjects.Subject import io.reactivex.subjects.Subject
import io.realm.Realm import io.realm.Realm
import manager.KeyManager
import mapper.CursorToContact
import mapper.CursorToConversation
import mapper.CursorToMessage
import mapper.CursorToRecipient
import model.Contact
import model.Conversation
import model.Message
import model.MmsPart
import model.Recipient
import model.SyncLog
import util.extensions.insertOrUpdate
import util.extensions.map
import util.tryOrNull
import javax.inject.Inject import javax.inject.Inject
import javax.inject.Singleton import javax.inject.Singleton
@@ -16,15 +16,15 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package service package com.moez.QKSMS.service
import android.app.IntentService import android.app.IntentService
import android.content.Intent import android.content.Intent
import android.net.Uri import android.net.Uri
import android.telephony.TelephonyManager import android.telephony.TelephonyManager
import com.moez.QKSMS.interactor.SendMessage
import com.moez.QKSMS.repository.ConversationRepository
import dagger.android.AndroidInjection import dagger.android.AndroidInjection
import interactor.SendMessage
import repository.ConversationRepository
import javax.inject.Inject import javax.inject.Inject
class HeadlessSmsSendService : IntentService("HeadlessSmsSendService") { class HeadlessSmsSendService : IntentService("HeadlessSmsSendService") {
@@ -1,7 +1,7 @@
package util package com.moez.QKSMS.util
import compat.SubscriptionInfoCompat import com.moez.QKSMS.compat.SubscriptionInfoCompat
import compat.SubscriptionManagerCompat import com.moez.QKSMS.compat.SubscriptionManagerCompat
import io.reactivex.Observable import io.reactivex.Observable
import io.reactivex.Observer import io.reactivex.Observer
import io.reactivex.disposables.Disposable import io.reactivex.disposables.Disposable
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package util package com.moez.QKSMS.util
import android.app.AlarmManager import android.app.AlarmManager
import android.app.PendingIntent import android.app.PendingIntent
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import receiver.NightModeReceiver import com.moez.QKSMS.receiver.NightModeReceiver
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.* import java.util.*
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package util package com.moez.QKSMS.util
import android.os.Build import android.os.Build
import android.provider.Settings import android.provider.Settings
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package util package com.moez.QKSMS.util
fun <T> tryOrNull(body: () -> T?): T? { fun <T> tryOrNull(body: () -> T?): T? {
return try { return try {
@@ -17,7 +17,7 @@
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package util.extensions package com.moez.QKSMS.extensions
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.Observable import io.reactivex.Observable
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class CancelDelayedMessage @Inject constructor(private val messageRepo: MessageRepository) : Interactor<Long>() { class CancelDelayedMessage @Inject constructor(private val messageRepo: MessageRepository) : Interactor<Long>() {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.SyncRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.SyncRepository
import timber.log.Timber import timber.log.Timber
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import javax.inject.Inject import javax.inject.Inject
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.ConversationRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.ConversationRepository
import javax.inject.Inject import javax.inject.Inject
class DeleteConversations @Inject constructor( class DeleteConversations @Inject constructor(
@@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.ConversationRepository
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.ConversationRepository
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class DeleteMessages @Inject constructor( class DeleteMessages @Inject constructor(
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class MarkAllSeen @Inject constructor(private val messageRepo: MessageRepository) : Interactor<Unit>() { class MarkAllSeen @Inject constructor(private val messageRepo: MessageRepository) : Interactor<Unit>() {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.ConversationRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.ConversationRepository
import javax.inject.Inject import javax.inject.Inject
class MarkArchived @Inject constructor(private val conversationRepo: ConversationRepository) : Interactor<List<Long>>() { class MarkArchived @Inject constructor(private val conversationRepo: ConversationRepository) : Interactor<List<Long>>() {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.ConversationRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.ConversationRepository
import javax.inject.Inject import javax.inject.Inject
class MarkBlocked @Inject constructor(private val conversationRepo: ConversationRepository) : Interactor<List<Long>>() { class MarkBlocked @Inject constructor(private val conversationRepo: ConversationRepository) : Interactor<List<Long>>() {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class MarkDelivered @Inject constructor(private val messageRepo: MessageRepository) : Interactor<Long>() { class MarkDelivered @Inject constructor(private val messageRepo: MessageRepository) : Interactor<Long>() {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class MarkDeliveryFailed @Inject constructor( class MarkDeliveryFailed @Inject constructor(
@@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.manager.NotificationManager
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import manager.NotificationManager
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class MarkFailed @Inject constructor( class MarkFailed @Inject constructor(
@@ -16,12 +16,12 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.manager.NotificationManager
import com.moez.QKSMS.repository.ConversationRepository
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import manager.NotificationManager
import repository.ConversationRepository
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class MarkRead @Inject constructor( class MarkRead @Inject constructor(
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class MarkSeen @Inject constructor(private val messageRepo: MessageRepository) : Interactor<Long>() { class MarkSeen @Inject constructor(private val messageRepo: MessageRepository) : Interactor<Long>() {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class MarkSent @Inject constructor(private val messageRepo: MessageRepository) : Interactor<Long>() { class MarkSent @Inject constructor(private val messageRepo: MessageRepository) : Interactor<Long>() {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.ConversationRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.ConversationRepository
import javax.inject.Inject import javax.inject.Inject
class MarkUnarchived @Inject constructor(private val conversationRepo: ConversationRepository) : Interactor<List<Long>>() { class MarkUnarchived @Inject constructor(private val conversationRepo: ConversationRepository) : Interactor<List<Long>>() {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.ConversationRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.ConversationRepository
import javax.inject.Inject import javax.inject.Inject
class MarkUnblocked @Inject constructor(private val conversationRepo: ConversationRepository) : Interactor<List<Long>>() { class MarkUnblocked @Inject constructor(private val conversationRepo: ConversationRepository) : Interactor<List<Long>>() {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class MarkUnread @Inject constructor( class MarkUnread @Inject constructor(
@@ -16,16 +16,16 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import android.net.Uri import android.net.Uri
import com.moez.QKSMS.extensions.mapNotNull
import com.moez.QKSMS.manager.ExternalBlockingManager
import com.moez.QKSMS.manager.NotificationManager
import com.moez.QKSMS.repository.ConversationRepository
import com.moez.QKSMS.repository.MessageRepository
import com.moez.QKSMS.repository.SyncRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import manager.ExternalBlockingManager
import manager.NotificationManager
import repository.ConversationRepository
import repository.MessageRepository
import repository.SyncRepository
import util.extensions.mapNotNull
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import javax.inject.Inject import javax.inject.Inject
@@ -16,15 +16,15 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import android.telephony.SmsMessage import android.telephony.SmsMessage
import com.moez.QKSMS.extensions.mapNotNull
import com.moez.QKSMS.manager.ExternalBlockingManager
import com.moez.QKSMS.manager.NotificationManager
import com.moez.QKSMS.repository.ConversationRepository
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import manager.ExternalBlockingManager
import manager.NotificationManager
import repository.ConversationRepository
import repository.MessageRepository
import util.extensions.mapNotNull
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import javax.inject.Inject import javax.inject.Inject
@@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.model.Message
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import model.Message
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class RetrySending @Inject constructor(private val messageRepo: MessageRepository) : Interactor<Message>() { class RetrySending @Inject constructor(private val messageRepo: MessageRepository) : Interactor<Message>() {
@@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.ImageRepository
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.ImageRepository
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class SaveImage @Inject constructor( class SaveImage @Inject constructor(
@@ -16,12 +16,12 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.model.Attachment
import com.moez.QKSMS.repository.ConversationRepository
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import model.Attachment
import repository.ConversationRepository
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class SendMessage @Inject constructor( class SendMessage @Inject constructor(
@@ -16,13 +16,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import android.net.Uri import android.net.Uri
import com.moez.QKSMS.extensions.mapNotNull
import com.moez.QKSMS.repository.ConversationRepository
import com.moez.QKSMS.repository.SyncRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.ConversationRepository
import repository.SyncRepository
import util.extensions.mapNotNull
import javax.inject.Inject import javax.inject.Inject
class SyncMessage @Inject constructor( class SyncMessage @Inject constructor(
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.repository.SyncRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import repository.SyncRepository
import timber.log.Timber import timber.log.Timber
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import javax.inject.Inject import javax.inject.Inject
@@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package interactor package com.moez.QKSMS.interactor
import com.moez.QKSMS.manager.WidgetManager
import com.moez.QKSMS.repository.MessageRepository
import io.reactivex.Flowable import io.reactivex.Flowable
import manager.WidgetManager
import repository.MessageRepository
import javax.inject.Inject import javax.inject.Inject
class UpdateBadge @Inject constructor( class UpdateBadge @Inject constructor(
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package manager package com.moez.QKSMS.manager
interface AnalyticsManager { interface AnalyticsManager {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package manager package com.moez.QKSMS.manager
import io.reactivex.Single import io.reactivex.Single
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package manager package com.moez.QKSMS.manager
/** /**
* Helper class for generating incrementing ids for messages * Helper class for generating incrementing ids for messages
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package manager package com.moez.QKSMS.manager
interface NotificationManager { interface NotificationManager {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package manager package com.moez.QKSMS.manager
interface PermissionManager { interface PermissionManager {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package manager package com.moez.QKSMS.manager
import io.reactivex.Observable import io.reactivex.Observable
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package manager package com.moez.QKSMS.manager
interface WidgetManager { interface WidgetManager {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package mapper package com.moez.QKSMS.mapper
import android.database.Cursor import android.database.Cursor
import model.Contact import com.moez.QKSMS.model.Contact
interface CursorToContact : Mapper<Cursor, Contact> { interface CursorToContact : Mapper<Cursor, Contact> {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package mapper package com.moez.QKSMS.mapper
import android.database.Cursor import android.database.Cursor
import model.Conversation import com.moez.QKSMS.model.Conversation
interface CursorToConversation : Mapper<Cursor, Conversation> { interface CursorToConversation : Mapper<Cursor, Conversation> {
@@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package mapper package com.moez.QKSMS.mapper
import android.database.Cursor import android.database.Cursor
import android.provider.Telephony.* import android.provider.Telephony.*
import model.Message import com.moez.QKSMS.model.Message
import timber.log.Timber import timber.log.Timber
import java.util.* import java.util.*
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package mapper package com.moez.QKSMS.mapper
import android.database.Cursor import android.database.Cursor
import model.MmsPart import com.moez.QKSMS.model.MmsPart
interface CursorToPart : Mapper<Cursor, MmsPart> { interface CursorToPart : Mapper<Cursor, MmsPart> {
@@ -16,10 +16,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package mapper package com.moez.QKSMS.mapper
import android.database.Cursor import android.database.Cursor
import model.Recipient import com.moez.QKSMS.model.Recipient
interface CursorToRecipient : Mapper<Cursor, Recipient> { interface CursorToRecipient : Mapper<Cursor, Recipient> {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package mapper package com.moez.QKSMS.mapper
interface Mapper<in From, out To> { interface Mapper<in From, out To> {
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package model package com.moez.QKSMS.model
import android.content.Context import android.content.Context
import android.net.Uri import android.net.Uri
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package model package com.moez.QKSMS.model
import io.realm.RealmList import io.realm.RealmList
import io.realm.RealmObject import io.realm.RealmObject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package model package com.moez.QKSMS.model
import io.realm.RealmList import io.realm.RealmList
import io.realm.RealmObject import io.realm.RealmObject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package model package com.moez.QKSMS.model
import android.content.ContentUris import android.content.ContentUris
import android.net.Uri import android.net.Uri
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package model package com.moez.QKSMS.model
import androidx.net.toUri import androidx.net.toUri
import io.realm.RealmObject import io.realm.RealmObject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package model package com.moez.QKSMS.model
import io.realm.RealmObject import io.realm.RealmObject
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package model package com.moez.QKSMS.model
import android.telephony.PhoneNumberUtils import android.telephony.PhoneNumberUtils
import io.realm.RealmObject import io.realm.RealmObject
@@ -1,3 +1,3 @@
package model package com.moez.QKSMS.model
data class SearchResult(val query: String, val conversation: Conversation, val messages: Int) data class SearchResult(val query: String, val conversation: Conversation, val messages: Int)
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package model package com.moez.QKSMS.model
import io.realm.RealmObject import io.realm.RealmObject
@@ -16,12 +16,12 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package repository package com.moez.QKSMS.repository
import android.net.Uri import android.net.Uri
import com.moez.QKSMS.model.Contact
import io.reactivex.Flowable import io.reactivex.Flowable
import io.reactivex.Single import io.reactivex.Single
import model.Contact
interface ContactRepository { interface ContactRepository {
@@ -1,8 +1,8 @@
package repository package com.moez.QKSMS.repository
import com.moez.QKSMS.model.Conversation
import com.moez.QKSMS.model.SearchResult
import io.realm.RealmResults import io.realm.RealmResults
import model.Conversation
import model.SearchResult
interface ConversationRepository { interface ConversationRepository {
@@ -1,4 +1,4 @@
package repository package com.moez.QKSMS.repository
import android.graphics.Bitmap import android.graphics.Bitmap
import android.net.Uri import android.net.Uri
@@ -16,12 +16,12 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package repository package com.moez.QKSMS.repository
import com.moez.QKSMS.model.Attachment
import com.moez.QKSMS.model.Message
import com.moez.QKSMS.model.MmsPart
import io.realm.RealmResults import io.realm.RealmResults
import model.Attachment
import model.Message
import model.MmsPart
interface MessageRepository { interface MessageRepository {
@@ -16,11 +16,11 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>. * along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/ */
package repository package com.moez.QKSMS.repository
import android.net.Uri import android.net.Uri
import com.moez.QKSMS.model.Message
import io.reactivex.Observable import io.reactivex.Observable
import model.Message
interface SyncRepository { interface SyncRepository {

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