forked from upstream-mirrors/quik
Convert ThemePicker Activity to Controller
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||
*
|
||||
* This file is part of QKSMS.
|
||||
*
|
||||
* QKSMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* QKSMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.moez.QKSMS.injection.android
|
||||
|
||||
import com.moez.QKSMS.feature.blocked.BlockedActivity
|
||||
import com.moez.QKSMS.feature.blocked.BlockedActivityModule
|
||||
import com.moez.QKSMS.feature.compose.ComposeActivity
|
||||
import com.moez.QKSMS.feature.compose.ComposeActivityModule
|
||||
import com.moez.QKSMS.feature.conversationinfo.ConversationInfoActivity
|
||||
import com.moez.QKSMS.feature.conversationinfo.ConversationInfoActivityModule
|
||||
import com.moez.QKSMS.feature.gallery.GalleryActivity
|
||||
import com.moez.QKSMS.feature.gallery.GalleryActivityModule
|
||||
import com.moez.QKSMS.feature.main.MainActivity
|
||||
import com.moez.QKSMS.feature.main.MainActivityModule
|
||||
import com.moez.QKSMS.feature.notificationprefs.NotificationPrefsActivity
|
||||
import com.moez.QKSMS.feature.notificationprefs.NotificationPrefsActivityModule
|
||||
import com.moez.QKSMS.feature.plus.PlusActivity
|
||||
import com.moez.QKSMS.feature.plus.PlusActivityModule
|
||||
import com.moez.QKSMS.feature.qkreply.QkReplyActivity
|
||||
import com.moez.QKSMS.feature.qkreply.QkReplyActivityModule
|
||||
import com.moez.QKSMS.feature.scheduled.ScheduledActivity
|
||||
import com.moez.QKSMS.feature.scheduled.ScheduledActivityModule
|
||||
import com.moez.QKSMS.feature.settings.SettingsActivity
|
||||
import com.moez.QKSMS.feature.themepicker.ThemePickerActivity
|
||||
import com.moez.QKSMS.injection.scope.ActivityScope
|
||||
import dagger.Module
|
||||
import dagger.android.ContributesAndroidInjector
|
||||
|
||||
@Module
|
||||
abstract class ActivityBuilderModule {
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector(modules = [MainActivityModule::class])
|
||||
abstract fun bindMainActivity(): MainActivity
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector(modules = [PlusActivityModule::class])
|
||||
abstract fun bindPlusActivity(): PlusActivity
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector(modules = [ComposeActivityModule::class])
|
||||
abstract fun bindComposeActivity(): ComposeActivity
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector(modules = [ConversationInfoActivityModule::class])
|
||||
abstract fun bindConversationInfoActivity(): ConversationInfoActivity
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector(modules = [GalleryActivityModule::class])
|
||||
abstract fun bindGalleryActivity(): GalleryActivity
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector(modules = [NotificationPrefsActivityModule::class])
|
||||
abstract fun bindNotificationPrefsActivity(): NotificationPrefsActivity
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector(modules = [QkReplyActivityModule::class])
|
||||
abstract fun bindQkReplyActivity(): QkReplyActivity
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector(modules = [ScheduledActivityModule::class])
|
||||
abstract fun bindScheduledActivity(): ScheduledActivity
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector(modules = [])
|
||||
abstract fun bindSettingsActivity(): SettingsActivity
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector(modules = [BlockedActivityModule::class])
|
||||
abstract fun bindBlockedActivity(): BlockedActivity
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector(modules = [])
|
||||
abstract fun bindThemePickerActivity(): ThemePickerActivity
|
||||
|
||||
}
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||
*
|
||||
* This file is part of QKSMS.
|
||||
*
|
||||
* QKSMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* QKSMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.moez.QKSMS.injection.android
|
||||
|
||||
import com.moez.QKSMS.feature.widget.WidgetProvider
|
||||
import com.moez.QKSMS.injection.scope.ActivityScope
|
||||
import com.moez.QKSMS.receiver.BootReceiver
|
||||
import com.moez.QKSMS.receiver.DefaultSmsChangedReceiver
|
||||
import com.moez.QKSMS.receiver.MarkReadReceiver
|
||||
import com.moez.QKSMS.receiver.MarkSeenReceiver
|
||||
import com.moez.QKSMS.receiver.MmsReceivedReceiver
|
||||
import com.moez.QKSMS.receiver.MmsReceiver
|
||||
import com.moez.QKSMS.receiver.MmsSentReceiver
|
||||
import com.moez.QKSMS.receiver.MmsUpdatedReceiver
|
||||
import com.moez.QKSMS.receiver.NightModeReceiver
|
||||
import com.moez.QKSMS.receiver.RemoteMessagingReceiver
|
||||
import com.moez.QKSMS.receiver.SendScheduledMessageReceiver
|
||||
import com.moez.QKSMS.receiver.SendSmsReceiver
|
||||
import com.moez.QKSMS.receiver.SmsDeliveredReceiver
|
||||
import com.moez.QKSMS.receiver.SmsProviderChangedReceiver
|
||||
import com.moez.QKSMS.receiver.SmsReceiver
|
||||
import com.moez.QKSMS.receiver.SmsSentReceiver
|
||||
import dagger.Module
|
||||
import dagger.android.ContributesAndroidInjector
|
||||
|
||||
@Module
|
||||
abstract class BroadcastReceiverBuilderModule {
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindBootReceiver(): BootReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindDefaultSmsChangedReceiver(): DefaultSmsChangedReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindMarkReadReceiver(): MarkReadReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindMarkSeenReceiver(): MarkSeenReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindMmsReceivedReceiver(): MmsReceivedReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindMmsReceiver(): MmsReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindMmsSentReceiver(): MmsSentReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindMmsUpdatedReceiver(): MmsUpdatedReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindNightModeReceiver(): NightModeReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindRemoteMessagingReceiver(): RemoteMessagingReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindSendScheduledMessageReceiver(): SendScheduledMessageReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindSendSmsReceiver(): SendSmsReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindSmsDeliveredReceiver(): SmsDeliveredReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindSmsProviderChangedReceiver(): SmsProviderChangedReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindSmsReceiver(): SmsReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindSmsSentReceiver(): SmsSentReceiver
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindWidgetProvider(): WidgetProvider
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||
*
|
||||
* This file is part of QKSMS.
|
||||
*
|
||||
* QKSMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* QKSMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.moez.QKSMS.injection.android
|
||||
|
||||
import com.moez.QKSMS.injection.scope.ActivityScope
|
||||
import com.moez.QKSMS.service.HeadlessSmsSendService
|
||||
import dagger.Module
|
||||
import dagger.android.ContributesAndroidInjector
|
||||
|
||||
@Module
|
||||
abstract class ServiceBuilderModule {
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector()
|
||||
abstract fun bindHeadlessSmsSendService(): HeadlessSmsSendService
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user