Skip to content

Commit

Permalink
Merge pull request #301 from Chooloo/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
roeiedri authored Jan 3, 2022
2 parents eb0f1a4 + cfefd48 commit 67f1599
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 36 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.chooloo.www.koler"
minSdkVersion 25
targetSdkVersion 31
versionCode 65
versionName "v1.3.1"
versionCode 67
versionName "v1.3.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

javaCompileOptions {
Expand Down
36 changes: 8 additions & 28 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
package="com.chooloo.www.koler">


<!--region permissions-->

<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.BLUETOOTH" />
Expand All @@ -28,8 +26,6 @@
android:name="android.permission.CAPTURE_AUDIO_OUTPUT"
tools:ignore="ProtectedPermissions" />

<!--endregion-->


<application
android:name="com.chooloo.www.koler.KolerApp"
Expand All @@ -41,14 +37,11 @@
android:theme="@style/KolerTheme"
tools:ignore="AllowBackup,GoogleAppIndexingWarning">

<!--region activities-->

<activity
android:name="com.chooloo.www.koler.ui.main.MainActivity"
android:exported="true"
android:screenOrientation="fullUser">

<!--region intent-filters-->

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand All @@ -66,24 +59,19 @@

<data android:scheme="tel" />
</intent-filter>

<!--endregion-->
</activity>

<activity
android:name="com.chooloo.www.koler.ui.call.CallActivity"
android:screenOrientation="fullSensor" />
<activity android:name=".ui.permissions.PermissionsActivity" />

<!--endregion-->


<!--region services-->

<service android:name="com.chooloo.www.koler.service.RecordService" />

<service
android:name="com.chooloo.www.koler.service.CallService"
android:exported="false"
android:permission="android.permission.BIND_INCALL_SERVICE">
<meta-data
android:name="android.telecom.IN_CALL_SERVICE_UI"
Expand All @@ -93,36 +81,28 @@
</intent-filter>
</service>

<!--endregion-->


<!--region metadatas-->

<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />

<!--endregion-->


<!--region receivers-->

<receiver android:name=".receiver.CallBroadcastReceiver">
<receiver
android:name=".receiver.CallBroadcastReceiver"
android:exported="false">
<intent-filter>
<action android:name="action_answer" />
<action android:name="action_hangup" />
</intent-filter>
</receiver>

<receiver android:name=".receiver.CallRecordReceiver">
<receiver
android:name=".receiver.CallRecordReceiver"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
</intent-filter>
</receiver>

<!--endregion-->


</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.chooloo.www.koler.di.contextcomponent

import android.app.KeyguardManager
import android.app.role.RoleManager
import android.content.ClipboardManager
import android.media.AudioManager
import android.os.PowerManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.chooloo.www.koler.di.contextcomponent

import android.app.Application
import android.app.KeyguardManager
import android.app.role.RoleManager
import android.content.ClipboardManager
import android.content.Context
import android.content.Context.TELEPHONY_SUBSCRIPTION_SERVICE
Expand All @@ -15,12 +16,12 @@ import androidx.core.app.NotificationManagerCompat
import com.chooloo.www.koler.di.livedatafactory.LiveDataFactoryImpl
import com.chooloo.www.koler.interactor.animation.AnimationInteractorImpl
import com.chooloo.www.koler.interactor.audio.AudioInteractorImpl
import com.chooloo.www.koler.interactor.blocked.BlockedInteractorImpl
import com.chooloo.www.koler.interactor.callaudio.CallAudioInteractorImpl
import com.chooloo.www.koler.interactor.calls.CallsInteractorImpl
import com.chooloo.www.koler.interactor.color.ColorInteractorImpl
import com.chooloo.www.koler.interactor.contacts.ContactsInteractorImpl
import com.chooloo.www.koler.interactor.drawable.DrawableInteractorImpl
import com.chooloo.www.koler.interactor.blocked.BlockedInteractorImpl
import com.chooloo.www.koler.interactor.phoneaccounts.PhonesInteractorImpl
import com.chooloo.www.koler.interactor.preferences.PreferencesInteractorImpl
import com.chooloo.www.koler.interactor.recents.RecentsInteractorImpl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import android.telecom.TelecomManager
import android.widget.Toast
import com.chooloo.www.koler.interactor.string.StringInteractor
import com.chooloo.www.koler.ui.base.BaseActivity
import com.chooloo.www.koler.ui.base.BottomFragment
import com.chooloo.www.koler.ui.permissions.PermissionsActivity
import com.chooloo.www.koler.ui.prompt.PromptFragment
import com.chooloo.www.koler.util.baseobservable.BaseObservable


Expand All @@ -29,15 +27,16 @@ class PermissionsInteractorImpl(

override fun requestDefaultDialer() {
val intent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
val roleManager = activity.getSystemService(Context.ROLE_SERVICE) as RoleManager
roleManager.createRequestRoleIntent(RoleManager.ROLE_DIALER)
(activity.getSystemService(Context.ROLE_SERVICE) as RoleManager).createRequestRoleIntent(
RoleManager.ROLE_DIALER
)
} else {
Intent(TelecomManager.ACTION_CHANGE_DEFAULT_DIALER).putExtra(
TelecomManager.EXTRA_CHANGE_DEFAULT_DIALER_PACKAGE_NAME,
activity.packageName
)
}
activity.startActivity(intent)
activity.startActivityForResult(intent, 0)
}

override fun checkDefaultDialer(errorMessageRes: Int?) {
Expand Down

0 comments on commit 67f1599

Please sign in to comment.