Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed72a44b authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

Merge branch '2145-debug-handle-eeloAdressbook' into 'main'

Fix: Invalid credentials notification opens debug intent instead of account's settings

See merge request !132
parents bd183601 3add1799
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ android {
    defaultConfig {
        applicationId "foundation.e.accountmanager"

        versionCode 403090003
        versionCode 403090004
        versionName '4.3.9'

        buildConfigField "long", "buildTime", System.currentTimeMillis() + "L"
+12 −6
Original line number Diff line number Diff line
@@ -894,15 +894,21 @@ abstract class SyncManager<ResourceType: LocalResource<*>, out CollectionType: L
        val contentIntent: Intent
        var viewItemAction: NotificationCompat.Action? = null

	    if (account.type in AccountUtils.getMainAccountTypes(context)

        if (
            (account.type in AccountUtils.getMainAccountTypes(context)
                    || account.type ==  context.getString(R.string.account_type_eelo_address_book))
            && (e is UnauthorizedException || e is NotFoundException)) {

            contentIntent = Intent(context, SettingsActivity::class.java)
            contentIntent.putExtra(SettingsActivity.EXTRA_ACCOUNT,
                    if (authority == ContactsContract.AUTHORITY)

            val contentAccount = if (authority == ContactsContract.AUTHORITY) {
                mainAccount
                    else
                        account)
            } else {
                account
            }
            contentIntent.putExtra(SettingsActivity.EXTRA_ACCOUNT, contentAccount)

        } else {
            contentIntent = buildDebugInfoIntent(e, local, remote)
            if (local != null)