Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump AGP to 8.5.1 #21082

Merged
merged 19 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package org.wordpress.android.ui.accounts.signup

import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.content.DialogInterface
Expand Down Expand Up @@ -764,6 +765,7 @@ class SignupEpilogueFragment : LoginBaseFormFragment<SignupEpilogueListener?>(),
}
}

@SuppressLint("SetTextI18n")
private fun undoChanges() {
mDisplayName = if (!TextUtils.isEmpty(mAccountStore.account.displayName)
) mAccountStore.account.displayName else requireArguments().getString(ARG_DISPLAY_NAME)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.wordpress.android.ui.main

import android.annotation.SuppressLint
import android.content.Context
import android.graphics.ColorMatrix
import android.graphics.ColorMatrixColorFilter
Expand Down Expand Up @@ -60,6 +61,7 @@ import com.google.android.material.R as MaterialR
* insert our own custom views so we have more control over their appearance
*/
@AndroidEntryPoint
@SuppressLint("RestrictedApi") // https://github.com/wordpress-mobile/WordPress-Android/issues/21079
class WPMainNavigationView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.wordpress.android.ui.pages

import android.annotation.SuppressLint
import android.content.Context
import android.graphics.drawable.Drawable
import android.text.Spannable
Expand Down Expand Up @@ -287,6 +288,7 @@ sealed class PageItemViewHolder(internal val parent: ViewGroup, @LayoutRes layou
it
)
} ?: stringDate
@SuppressLint("SetTextI18n")
pageSubtitleSuffix.text = ""
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.wordpress.android.ui.people

import android.animation.Animator
import android.annotation.SuppressLint
import android.content.Context
import android.content.res.ColorStateList
import android.graphics.Color
Expand Down Expand Up @@ -404,6 +405,7 @@ class WPEditTextWithChipsOutlined @JvmOverloads constructor(
resetText()
}

@SuppressLint("SetTextI18n")
private fun resetText() {
editor.apply {
text?.clear() ?: setText("")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public static Set<PostModel> getPostsThatIncludeAnyOfTheseMedia(PostStore postSt
return postsThatContainListedMedia;
}

/*
/**
Note the way we detect we're in presence of Gutenberg blocks logic is taken from
https://github.com/WordPress/gutenberg/blob/5a6693589285363341bebad15bd56d9371cf8ecc/lib/register.php#L331-L345

Expand All @@ -403,11 +403,8 @@ public static Set<PostModel> getPostsThatIncludeAnyOfTheseMedia(PostStore postSt
* but not validating its structure. For strict accuracy, you should use the
* block parser on post content.
*
* @since 1.6.0
* @see gutenberg_parse_blocks()
*
* @param string $content Content to test.
* @return bool Whether the content contains blocks.
* @param postContent Content to test.
* @return whether the content contains blocks.

function gutenberg_content_has_blocks( $content ) {
return false !== strpos( $content, '<!-- wp:' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,8 @@ class ReaderExpandableTagsView @JvmOverloads constructor(
private fun updateOverflowIndicatorChip() {
val showOverflowIndicatorChip = hiddenTagChipsCount > 0 || !isSingleLine
uiHelpers.updateVisibility(overflowIndicatorChip, showOverflowIndicatorChip)
overflowIndicatorChip.contentDescription = String.format(
resources.getString(R.string.show_n_hidden_items_desc),
hiddenTagChipsCount
)
overflowIndicatorChip.contentDescription =
resources.getString(R.string.show_n_hidden_items_desc, hiddenTagChipsCount.toString())

overflowIndicatorChip.text = if (isSingleLine) {
chipStyle.overflowChipText(resources, hiddenTagChipsCount)
Expand Down Expand Up @@ -209,7 +207,7 @@ class ReaderExpandableTagsView @JvmOverloads constructor(
override fun overflowChipText(resources: Resources, hiddenChipsCount: Int): String {
return String.format(
resources.getString(R.string.reader_expandable_tags_view_overflow_indicator_expand_title),
hiddenChipsCount
hiddenChipsCount.toString()
ParaskP7 marked this conversation as resolved.
Show resolved Hide resolved
)
}

Expand All @@ -231,7 +229,7 @@ class ReaderExpandableTagsView @JvmOverloads constructor(
override fun overflowChipText(resources: Resources, hiddenChipsCount: Int): String {
return String.format(
resources.getString(R.string.reader_expandable_tags_view_overflow_indicator_expand_title_new),
hiddenChipsCount
hiddenChipsCount.toString()
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.wordpress.android.ui.stats.refresh.lists

import android.annotation.SuppressLint
import android.os.Bundle
import android.os.Parcelable
import android.view.Menu
Expand Down Expand Up @@ -318,6 +319,7 @@ class StatsListFragment : ViewPagerFragment(R.layout.stats_list_fragment) {
if (it.subtitle != null) {
emptyView.statsEmptyView.subtitle.setText(it.subtitle)
} else {
@SuppressLint("SetTextI18n")
emptyView.statsEmptyView.subtitle.text = ""
}
if (it.image != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class SuggestionActivity : LocaleAwareActivity() {
}
})

@SuppressLint("SetTextI18n")
if (text.isEmpty()) {
setText("$prefix")
setSelection(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package org.wordpress.android.viewmodel.helpers

import android.annotation.SuppressLint
import android.content.BroadcastReceiver
import android.content.Context
import android.net.ConnectivityManager
Expand All @@ -25,6 +26,7 @@ class ConnectionStatusLiveDataTest : BaseUnitTest() {
@Before
fun setUp() {
val captor = argumentCaptor<BroadcastReceiver>()
@SuppressLint("UnspecifiedRegisterReceiverFlag")
val context = mock<Context> {
on { registerReceiver(captor.capture(), any()) } doReturn mock()
}
Expand Down
Loading
Loading