Skip to content

Commit

Permalink
Enable nonTransitiveRClass
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesonwilliams committed Oct 30, 2024
1 parent 8a4e9c6 commit 2072a70
Show file tree
Hide file tree
Showing 55 changed files with 116 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import kotlinx.parcelize.Parcelize
import org.signal.core.ui.BottomSheets
import org.signal.core.ui.Buttons
import org.signal.core.ui.Previews
import org.signal.core.ui.R as CoreUiR
import org.signal.core.ui.SignalPreview
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.billing.launchManageBackupsSubscription
Expand Down Expand Up @@ -159,7 +160,7 @@ private fun BackupAlertSheetContent(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter))
) {
BottomSheets.Handle()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import androidx.fragment.app.setFragmentResult
import org.signal.core.ui.BottomSheets
import org.signal.core.ui.Buttons
import org.signal.core.ui.Previews
import org.signal.core.ui.R as CoreUiR
import org.signal.core.ui.SignalPreview
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.compose.ComposeBottomSheetDialogFragment
Expand Down Expand Up @@ -84,7 +85,7 @@ private fun CreateBackupBottomSheetContent(
Column(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier.fillMaxWidth()
.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter))
.padding(bottom = 24.dp)
) {
BottomSheets.Handle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ sealed interface BackupStatusData {

override val title: String
@Composable
get() = stringResource(R.string.default_error_msg)
get() = stringResource(androidx.biometric.R.string.default_error_msg)

override val iconColors: BackupsIconColors = BackupsIconColors.Warning
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import org.signal.core.ui.Previews
import org.signal.core.ui.R as CoreUiR
import org.signal.core.ui.Rows
import org.signal.core.ui.SignalPreview
import org.signal.core.util.ByteSize
Expand All @@ -51,7 +52,7 @@ fun BackupStatusRow(
if (backupStatusData !is BackupStatusData.CouldNotCompleteBackup) {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter))
modifier = Modifier.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter))
) {
LinearProgressIndicator(
color = progressColor(backupStatusData),
Expand All @@ -74,7 +75,7 @@ fun BackupStatusRow(
is BackupStatusData.RestoringMedia -> {
Text(
text = getRestoringMediaString(backupStatusData),
modifier = Modifier.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter))
modifier = Modifier.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter))
)
}

Expand All @@ -85,7 +86,7 @@ fun BackupStatusRow(
backupStatusData.requiredSpace,
"%d".format((backupStatusData.progress * 100).roundToInt())
),
modifier = Modifier.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter))
modifier = Modifier.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter))
)

Rows.TextRow(
Expand Down Expand Up @@ -114,7 +115,7 @@ fun BackupStatusRow(
append(stringResource(R.string.BackupStatusRow__your_last_backup))
},
inlineContent = inlineContentMap,
modifier = Modifier.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter))
modifier = Modifier.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter))
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import org.signal.core.ui.Buttons
import org.signal.core.ui.Previews
import org.signal.core.ui.R as CoreUiR
import org.signal.core.ui.Scaffolds
import org.thoughtcrime.securesms.R

Expand All @@ -52,7 +53,7 @@ fun MessageBackupsEducationScreen(
modifier = Modifier
.fillMaxSize()
.padding(it)
.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter))
) {
LazyColumn(
horizontalAlignment = Alignment.CenterHorizontally,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import org.signal.core.ui.Buttons
import org.signal.core.ui.Previews
import org.signal.core.ui.R as CoreUiR
import org.signal.core.ui.Scaffolds
import org.signal.core.ui.SignalPreview
import org.thoughtcrime.securesms.R
Expand All @@ -44,7 +45,7 @@ fun MessageBackupsKeyEducationScreen(
Column(
modifier = Modifier
.padding(it)
.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter))
.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import kotlinx.coroutines.launch
import org.signal.core.ui.BottomSheets
import org.signal.core.ui.Buttons
import org.signal.core.ui.Previews
import org.signal.core.ui.R as CoreUiR
import org.signal.core.ui.Scaffolds
import org.signal.core.ui.SignalPreview
import org.signal.core.ui.theme.SignalTheme
Expand Down Expand Up @@ -78,7 +79,7 @@ fun MessageBackupsKeyRecordScreen(
Column(
modifier = Modifier
.padding(paddingValues)
.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter))
.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally
) {
Expand Down Expand Up @@ -193,7 +194,7 @@ private fun BottomSheetContent(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter))
) {
BottomSheets.Handle()
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import kotlinx.collections.immutable.persistentListOf
import org.signal.core.ui.Buttons
import org.signal.core.ui.Dialogs
import org.signal.core.ui.Previews
import org.signal.core.ui.R as CoreUiR
import org.signal.core.ui.Scaffolds
import org.signal.core.ui.SignalPreview
import org.signal.core.ui.theme.SignalTheme
Expand Down Expand Up @@ -83,7 +84,7 @@ fun MessageBackupsTypeSelectionScreen(
Column(
modifier = Modifier
.padding(paddingValues)
.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter))
.fillMaxSize()
) {
LazyColumn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package org.thoughtcrime.securesms.badges.gifts.flow
import android.content.Context
import android.util.AttributeSet
import android.widget.FrameLayout
import org.thoughtcrime.securesms.R

/**
* Wraps the google pay button in a convenient frame layout.
Expand All @@ -13,7 +12,7 @@ class GooglePayButton @JvmOverloads constructor(
attrs: AttributeSet? = null
) : FrameLayout(context, attrs) {
init {
inflate(context, R.layout.donate_with_googlepay_button, this)
inflate(context, org.signal.donations.R.layout.donate_with_googlepay_button, this)
}

fun setOnGooglePayClickListener(action: () -> Unit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import androidx.compose.ui.unit.dp
import org.signal.core.ui.BottomSheets
import org.signal.core.ui.Buttons
import org.signal.core.ui.Previews
import org.signal.core.ui.R as CoreUiR
import org.signal.core.ui.SignalPreview
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.backup.v2.ui.subscription.MessageBackupsType
Expand Down Expand Up @@ -84,7 +85,7 @@ private fun UpgradeToEnableOptimizedStorageSheetContent(
style = MaterialTheme.typography.titleLarge,
textAlign = TextAlign.Center,
modifier = Modifier
.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter))
)

Text(
Expand All @@ -94,7 +95,7 @@ private fun UpgradeToEnableOptimizedStorageSheetContent(
textAlign = TextAlign.Center,
modifier = Modifier
.padding(top = 10.dp, bottom = 28.dp)
.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter))
)

MessageBackupsTypeBlock(
Expand All @@ -107,7 +108,7 @@ private fun UpgradeToEnableOptimizedStorageSheetContent(
it.copy(iconColorNormal = it.iconColorSelected)
},
modifier = Modifier
.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter))
.padding(bottom = 50.dp)
)

Expand All @@ -116,7 +117,7 @@ private fun UpgradeToEnableOptimizedStorageSheetContent(
onClick = onSubscribeClick,
modifier = Modifier
.defaultMinSize(minWidth = 256.dp)
.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter))
.padding(bottom = 8.dp)
) {
val resources = LocalContext.current.resources
Expand All @@ -134,7 +135,7 @@ private fun UpgradeToEnableOptimizedStorageSheetContent(
onClick = onCancelClick,
modifier = Modifier
.defaultMinSize(minWidth = 256.dp)
.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter))
.padding(bottom = 16.dp)
) {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import androidx.compose.ui.unit.dp
import org.signal.core.ui.BottomSheets
import org.signal.core.ui.Buttons
import org.signal.core.ui.Previews
import org.signal.core.ui.R as CoreUiR
import org.signal.core.ui.SignalPreview
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.backup.v2.ui.subscription.MessageBackupsType
Expand Down Expand Up @@ -73,7 +74,7 @@ private fun UpgradeToStartMediaBackupSheetContent(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter))
) {
BottomSheets.Handle()

Expand Down Expand Up @@ -114,7 +115,7 @@ private fun UpgradeToStartMediaBackupSheetContent(
onClick = onSubscribeClick,
modifier = Modifier
.defaultMinSize(minWidth = 256.dp)
.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter))
.padding(bottom = 8.dp)
) {
val resources = LocalContext.current.resources
Expand All @@ -132,7 +133,7 @@ private fun UpgradeToStartMediaBackupSheetContent(
onClick = onCancelClick,
modifier = Modifier
.defaultMinSize(minWidth = 256.dp)
.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter))
.padding(bottom = 16.dp)
) {
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class EditCallLinkNameDialogFragment : ComposeDialogFragment() {
Column(
modifier = Modifier
.padding(
horizontal = dimensionResource(id = org.signal.core.ui.R.dimen.core_ui__gutter)
horizontal = dimensionResource(id = org.signal.core.ui.R.dimen.gutter)
)
.padding(top = 20.dp, bottom = 16.dp)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.unit.dp
import org.signal.core.ui.Buttons
import org.signal.core.ui.Previews
import org.signal.core.ui.R as CoreUiR
import org.signal.core.ui.SignalPreview
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.conversation.colors.AvatarColorPair
Expand Down Expand Up @@ -103,7 +104,7 @@ fun SignalCallRow(
Row(
modifier = modifier
.fillMaxWidth()
.padding(horizontal = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(id = CoreUiR.dimen.gutter))
.border(
width = 1.25.dp,
color = MaterialTheme.colorScheme.outline,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import org.signal.core.ui.BottomSheets
import org.signal.core.ui.Buttons
import org.signal.core.ui.Dividers
import org.signal.core.ui.Previews
import org.signal.core.ui.R as CoreUiR
import org.signal.core.ui.Rows
import org.signal.core.ui.SignalPreview
import org.signal.core.util.concurrent.LifecycleDisposable
Expand Down Expand Up @@ -313,7 +314,7 @@ private fun CreateCallLinkBottomSheetContent(
Buttons.MediumTonal(
onClick = onDoneClicked,
modifier = Modifier
.padding(end = dimensionResource(id = R.dimen.core_ui__gutter))
.padding(end = dimensionResource(id = CoreUiR.dimen.gutter))
.align(Alignment.End)
) {
Text(text = stringResource(id = R.string.CreateCallLinkBottomSheetDialogFragment__done))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public ContactFilterView(Context context) {
}

public ContactFilterView(Context context, AttributeSet attrs) {
this(context, attrs, R.attr.toolbarStyle);
this(context, attrs, androidx.appcompat.R.attr.toolbarStyle);
}

public ContactFilterView(Context context, AttributeSet attrs, int defStyleAttr) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.google.android.material.shape.CornerFamily
import com.google.android.material.shape.MaterialShapeDrawable
import com.google.android.material.shape.ShapeAppearanceModel
import com.google.android.material.R as MaterialR
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.util.ThemeUtil
import org.thoughtcrime.securesms.util.ViewUtil
Expand Down Expand Up @@ -59,8 +60,8 @@ abstract class FixedRoundedCornerBottomSheetDialogFragment : BottomSheetDialogFr

dialogBackground = MaterialShapeDrawable(shapeAppearanceModel)

val bottomSheetStyle = ThemeUtil.getThemedResourceId(ContextThemeWrapper(requireContext(), themeResId), R.attr.bottomSheetStyle)
backgroundColor = ThemeUtil.getThemedColor(ContextThemeWrapper(requireContext(), bottomSheetStyle), R.attr.backgroundTint)
val bottomSheetStyle = ThemeUtil.getThemedResourceId(ContextThemeWrapper(requireContext(), themeResId), MaterialR.attr.bottomSheetStyle)
backgroundColor = ThemeUtil.getThemedColor(ContextThemeWrapper(requireContext(), bottomSheetStyle), MaterialR.attr.backgroundTint)
dialogBackground.fillColor = ColorStateList.valueOf(backgroundColor)

dialog.behavior.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private void initialize() {

this.searchItem = toolbar.getMenu().findItem(R.id.action_filter_search);
SearchView searchView = (SearchView) searchItem.getActionView();
EditText searchText = searchView.findViewById(R.id.search_src_text);
EditText searchText = searchView.findViewById(androidx.appcompat.R.id.search_src_text);

EditTextExtensionsKt.setIncognitoKeyboardEnabled(searchText, TextSecurePreferences.isIncognitoKeyboardEnabled(getContext()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public EmojiEditText(Context context) {
}

public EmojiEditText(Context context, AttributeSet attrs) {
this(context, attrs, R.attr.editTextStyle);
this(context, attrs, androidx.appcompat.R.attr.editTextStyle);
}

public EmojiEditText(Context context, AttributeSet attrs, int defStyleAttr) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class SegmentedProgressBar : View, ViewPager.OnPageChangeListener, View.OnTouchL
var segmentBackgroundColor: Int = Color.WHITE
private set
var segmentSelectedBackgroundColor: Int =
context.getThemeColor(R.attr.colorAccent)
context.getThemeColor(androidx.appcompat.R.attr.colorAccent)
private set
var segmentStrokeColor: Int = Color.BLACK
private set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import androidx.navigation.fragment.findNavController
import org.signal.core.ui.Buttons
import org.signal.core.ui.Dividers
import org.signal.core.ui.Previews
import org.signal.core.ui.R as CoreUiR
import org.signal.core.ui.Rows
import org.signal.core.ui.Scaffolds
import org.signal.core.ui.SignalPreview
Expand Down Expand Up @@ -118,7 +119,7 @@ private fun BackupsSettingsContent(
text = stringResource(R.string.RemoteBackupsSettingsFragment__back_up_your_message_history),
color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodyMedium,
modifier = Modifier.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter), vertical = 16.dp)
modifier = Modifier.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter), vertical = 16.dp)
)
}

Expand Down Expand Up @@ -302,7 +303,7 @@ private fun LoadingBackupsRow() {
modifier = Modifier
.fillMaxWidth()
.height(56.dp)
.padding(horizontal = dimensionResource(R.dimen.core_ui__gutter))
.padding(horizontal = dimensionResource(CoreUiR.dimen.gutter))
) {
CircularProgressIndicator()
}
Expand Down
Loading

0 comments on commit 2072a70

Please sign in to comment.