Replace deprecated getParcelable* methods with compat versions (#3633)

This commit is contained in:
Konrad Pozniak 2023-06-11 12:58:55 +02:00 committed by GitHub
parent 8e87b5d465
commit 85b7caa887
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 148 additions and 219 deletions

View File

@ -1,39 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 7.4.2" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.2)" variant="all" version="7.4.2"> <issues format="6" by="lint 7.4.2" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.2)" variant="all" version="7.4.2">
<issue
id="MissingPermission"
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
errorLine1=" notificationManager.notify(notificationId, builder.build());"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="263"
column="9"/>
</issue>
<issue
id="MissingPermission"
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
errorLine1=" notificationManager.notify((int) account.getId(), builder.setGroupSummary(true).build());"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="265"
column="13"/>
</issue>
<issue
id="MissingPermission"
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
errorLine1=" notificationManager.notify((int) account.getId(), summaryBuilder.build());"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="267"
column="13"/>
</issue>
<issue <issue
id="MissingPermission" id="MissingPermission"
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`" message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
@ -403,17 +370,6 @@
column="5"/> column="5"/>
</issue> </issue>
<issue
id="MissingQuantity"
message="For locale &quot;fr&quot; (French) the following quantities should also be defined: `many` (e.g. &quot;1000000 de jours&quot;), `one` (e.g. &quot;1 jour&quot;)"
errorLine1=" &lt;plurals name=&quot;hint_describe_for_visually_impaired&quot;>"
errorLine2=" ^">
<location
file="src/main/res/values-fr/strings.xml"
line="288"
column="5"/>
</issue>
<issue <issue
id="MissingQuantity" id="MissingQuantity"
message="For locale &quot;ga&quot; (Irish) the following quantities should also be defined: `few` (e.g. &quot;3 cinn, 3 huaire, 3 chat, 3 éan, 3 bhróg&quot;), `many` (e.g. &quot;7 gcinn, 7 n-uaire, 7 gcat, 7 n-éan, 7 mbróg&quot;), `one` (e.g. &quot;1 cheann, 1 uair, 1 chat, 1 éan, 1 bhróg&quot;), `two` (e.g. &quot;2 cheann, 2 uair, 2 chat, 2 éan, 2 bhróig&quot;)" message="For locale &quot;ga&quot; (Irish) the following quantities should also be defined: `few` (e.g. &quot;3 cinn, 3 huaire, 3 chat, 3 éan, 3 bhróg&quot;), `many` (e.g. &quot;7 gcinn, 7 n-uaire, 7 gcat, 7 n-éan, 7 mbróg&quot;), `one` (e.g. &quot;1 cheann, 1 uair, 1 chat, 1 éan, 1 bhróg&quot;), `two` (e.g. &quot;2 cheann, 2 uair, 2 chat, 2 éan, 2 bhróig&quot;)"
@ -828,7 +784,7 @@
errorLine2=" ^"> errorLine2=" ^">
<location <location
file="src/main/res/values-tr/strings.xml" file="src/main/res/values-tr/strings.xml"
line="581" line="579"
column="293"/> column="293"/>
</issue> </issue>
@ -1697,7 +1653,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java" file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="745" line="826"
column="57"/> column="57"/>
</issue> </issue>
@ -2258,7 +2214,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="src/main/res/values/donottranslate.xml" file="src/main/res/values/donottranslate.xml"
line="260" line="262"
column="19"/> column="19"/>
</issue> </issue>
@ -2269,7 +2225,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="src/main/res/values/donottranslate.xml" file="src/main/res/values/donottranslate.xml"
line="265" line="267"
column="19"/> column="19"/>
</issue> </issue>
@ -2973,7 +2929,7 @@
errorLine2=" ~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/accountlist/AccountListFragment.kt" file="src/main/java/com/keylesspalace/tusky/components/accountlist/AccountListFragment.kt"
line="125" line="133"
column="17"/> column="17"/>
</issue> </issue>
@ -3160,7 +3116,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt"
line="544" line="552"
column="21"/> column="21"/>
</issue> </issue>
@ -3171,7 +3127,7 @@
errorLine2=" ~~~~~~~~~"> errorLine2=" ~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt"
line="553" line="561"
column="17"/> column="17"/>
</issue> </issue>
@ -3182,7 +3138,7 @@
errorLine2=" ~~~~~~~~~"> errorLine2=" ~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/compose/ComposeActivity.kt"
line="553" line="561"
column="17"/> column="17"/>
</issue> </issue>
@ -3270,7 +3226,7 @@
errorLine2=" ~~~~~~~~~"> errorLine2=" ~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt"
line="106" line="107"
column="17"/> column="17"/>
</issue> </issue>
@ -3281,7 +3237,7 @@
errorLine2=" ~~~~~~~~~"> errorLine2=" ~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt"
line="106" line="107"
column="17"/> column="17"/>
</issue> </issue>
@ -3292,7 +3248,7 @@
errorLine2=" ~~~~~~~~~"> errorLine2=" ~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt"
line="116" line="117"
column="17"/> column="17"/>
</issue> </issue>
@ -3303,7 +3259,7 @@
errorLine2=" ~~~~~~~~~"> errorLine2=" ~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/filters/EditFilterActivity.kt"
line="116" line="117"
column="17"/> column="17"/>
</issue> </issue>
@ -3666,7 +3622,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt"
line="143" line="146"
column="17"/> column="17"/>
</issue> </issue>
@ -3677,7 +3633,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt"
line="143" line="146"
column="17"/> column="17"/>
</issue> </issue>
@ -3688,7 +3644,7 @@
errorLine2=" ~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt"
line="152" line="155"
column="17"/> column="17"/>
</issue> </issue>
@ -3699,7 +3655,7 @@
errorLine2=" ~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt"
line="152" line="155"
column="17"/> column="17"/>
</issue> </issue>
@ -3710,7 +3666,7 @@
errorLine2=" ~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt"
line="173" line="176"
column="25"/> column="25"/>
</issue> </issue>
@ -3719,17 +3675,6 @@
message="Access to `private` method `sendResult` of class `LoginWebViewActivity` requires synthetic accessor" message="Access to `private` method `sendResult` of class `LoginWebViewActivity` requires synthetic accessor"
errorLine1=" sendResult(LoginResult.Err(error))" errorLine1=" sendResult(LoginResult.Err(error))"
errorLine2=" ~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt"
line="173"
column="25"/>
</issue>
<issue
id="SyntheticAccessor"
message="Access to `private` method `sendResult` of class `LoginWebViewActivity` requires synthetic accessor"
errorLine1=" sendResult(LoginResult.Ok(code))"
errorLine2=" ~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt"
line="176" line="176"
@ -3743,7 +3688,18 @@
errorLine2=" ~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt" file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt"
line="176" line="179"
column="25"/>
</issue>
<issue
id="SyntheticAccessor"
message="Access to `private` method `sendResult` of class `LoginWebViewActivity` requires synthetic accessor"
errorLine1=" sendResult(LoginResult.Ok(code))"
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/login/LoginWebViewActivity.kt"
line="179"
column="25"/> column="25"/>
</issue> </issue>
@ -4469,7 +4425,7 @@
errorLine2=" ~~~~~~~~~"> errorLine2=" ~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsFragment.kt" file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsFragment.kt"
line="185" line="186"
column="26"/> column="26"/>
</issue> </issue>
@ -4480,7 +4436,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsFragment.kt" file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsFragment.kt"
line="213" line="227"
column="21"/> column="21"/>
</issue> </issue>
@ -4491,7 +4447,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsFragment.kt" file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationsFragment.kt"
line="215" line="229"
column="29"/> column="29"/>
</issue> </issue>
@ -4579,7 +4535,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/timeline/TimelineFragment.kt" file="src/main/java/com/keylesspalace/tusky/components/timeline/TimelineFragment.kt"
line="267" line="266"
column="21"/> column="21"/>
</issue> </issue>
@ -4590,7 +4546,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/timeline/TimelineFragment.kt" file="src/main/java/com/keylesspalace/tusky/components/timeline/TimelineFragment.kt"
line="270" line="269"
column="33"/> column="33"/>
</issue> </issue>
@ -4601,7 +4557,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/timeline/TimelineFragment.kt" file="src/main/java/com/keylesspalace/tusky/components/timeline/TimelineFragment.kt"
line="272" line="271"
column="33"/> column="33"/>
</issue> </issue>
@ -4612,7 +4568,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/timeline/TimelineFragment.kt" file="src/main/java/com/keylesspalace/tusky/components/timeline/TimelineFragment.kt"
line="278" line="277"
column="21"/> column="21"/>
</issue> </issue>
@ -4638,50 +4594,6 @@
column="29"/> column="29"/>
</issue> </issue>
<issue
id="SyntheticAccessor"
message="Access to `private` method `formatNumber` of class `Companion` requires synthetic accessor"
errorLine1=" binding.totalUsage.text = formatNumber(tagViewData.usage.sum())"
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/trending/TrendingTagViewHolder.kt"
line="40"
column="35"/>
</issue>
<issue
id="SyntheticAccessor"
message="Access to `private` method `formatNumber` of class `Companion` requires synthetic accessor"
errorLine1=" binding.totalUsage.text = formatNumber(tagViewData.usage.sum())"
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/trending/TrendingTagViewHolder.kt"
line="40"
column="35"/>
</issue>
<issue
id="SyntheticAccessor"
message="Access to `private` method `formatNumber` of class `Companion` requires synthetic accessor"
errorLine1=" binding.totalAccounts.text = formatNumber(totalAccounts)"
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/trending/TrendingTagViewHolder.kt"
line="43"
column="38"/>
</issue>
<issue
id="SyntheticAccessor"
message="Access to `private` method `formatNumber` of class `Companion` requires synthetic accessor"
errorLine1=" binding.totalAccounts.text = formatNumber(totalAccounts)"
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/trending/TrendingTagViewHolder.kt"
line="43"
column="38"/>
</issue>
<issue <issue
id="SyntheticAccessor" id="SyntheticAccessor"
message="Access to `private` method `getBinding` of class `ViewImageFragment` requires synthetic accessor" message="Access to `private` method `getBinding` of class `ViewImageFragment` requires synthetic accessor"
@ -4689,7 +4601,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt" file="src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt"
line="187" line="188"
column="25"/> column="25"/>
</issue> </issue>
@ -4700,7 +4612,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt" file="src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt"
line="272" line="273"
column="54"/> column="54"/>
</issue> </issue>
@ -4711,7 +4623,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt" file="src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt"
line="286" line="287"
column="17"/> column="17"/>
</issue> </issue>
@ -4722,7 +4634,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt" file="src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt"
line="294" line="295"
column="17"/> column="17"/>
</issue> </issue>
@ -4733,7 +4645,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt" file="src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt"
line="120" line="121"
column="17"/> column="17"/>
</issue> </issue>
@ -4744,7 +4656,7 @@
errorLine2=" ~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt" file="src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt"
line="120" line="121"
column="41"/> column="41"/>
</issue> </issue>
@ -4755,7 +4667,7 @@
errorLine2=" ~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt" file="src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt"
line="120" line="121"
column="41"/> column="41"/>
</issue> </issue>
@ -4766,7 +4678,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt" file="src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt"
line="148" line="149"
column="41"/> column="41"/>
</issue> </issue>
@ -4777,7 +4689,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt" file="src/main/java/com/keylesspalace/tusky/ViewMediaActivity.kt"
line="191" line="192"
column="21"/> column="21"/>
</issue> </issue>
@ -5188,6 +5100,13 @@
column="55"/> column="55"/>
</issue> </issue>
<issue
id="ConvertToWebp"
message="One or more images in this project can be converted to the WebP format which typically results in smaller file sizes, even for lossless conversion">
<location
file="src/blue/res/mipmap-xxxhdpi/ic_launcher.png"/>
</issue>
<issue <issue
id="SelectableText" id="SelectableText"
message="Consider making the text value selectable by specifying `android:textIsSelectable=&quot;true&quot;`" message="Consider making the text value selectable by specifying `android:textIsSelectable=&quot;true&quot;`"
@ -6834,7 +6753,7 @@
errorLine2=" ~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/db/AppDatabase.java" file="src/main/java/com/keylesspalace/tusky/db/AppDatabase.java"
line="37" line="53"
column="21"/> column="21"/>
</issue> </issue>
@ -6845,7 +6764,7 @@
errorLine2=" ~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/db/AppDatabase.java" file="src/main/java/com/keylesspalace/tusky/db/AppDatabase.java"
line="38" line="54"
column="21"/> column="21"/>
</issue> </issue>
@ -6856,7 +6775,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/db/AppDatabase.java" file="src/main/java/com/keylesspalace/tusky/db/AppDatabase.java"
line="39" line="55"
column="21"/> column="21"/>
</issue> </issue>
@ -6867,7 +6786,7 @@
errorLine2=" ~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/db/AppDatabase.java" file="src/main/java/com/keylesspalace/tusky/db/AppDatabase.java"
line="40" line="56"
column="21"/> column="21"/>
</issue> </issue>
@ -6878,7 +6797,7 @@
errorLine2=" ~~~~~~~~"> errorLine2=" ~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/db/AppDatabase.java" file="src/main/java/com/keylesspalace/tusky/db/AppDatabase.java"
line="41" line="57"
column="21"/> column="21"/>
</issue> </issue>
@ -6889,7 +6808,7 @@
errorLine2=" ~~~~"> errorLine2=" ~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/db/AppDatabase.java" file="src/main/java/com/keylesspalace/tusky/db/AppDatabase.java"
line="373" line="389"
column="31"/> column="31"/>
</issue> </issue>
@ -6977,7 +6896,7 @@
errorLine2=" ~~~~~~~~"> errorLine2=" ~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/BaseActivity.java" file="src/main/java/com/keylesspalace/tusky/BaseActivity.java"
line="233" line="240"
column="36"/> column="36"/>
</issue> </issue>
@ -6988,41 +6907,85 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/BaseActivity.java" file="src/main/java/com/keylesspalace/tusky/BaseActivity.java"
line="233" line="240"
column="58"/> column="58"/>
</issue> </issue>
<issue <issue
id="UnknownNullness" id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations" message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static void make(final Context context, Notification body, AccountEntity account, boolean isFirstOfBatch) {" errorLine1=" public static android.app.Notification make(final Context context, NotificationManager notificationManager, Notification body, AccountEntity account, boolean isFirstOfBatch) {"
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java" file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="139" line="151"
column="35"/> column="55"/>
</issue> </issue>
<issue <issue
id="UnknownNullness" id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations" message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static void make(final Context context, Notification body, AccountEntity account, boolean isFirstOfBatch) {" errorLine1=" public static android.app.Notification make(final Context context, NotificationManager notificationManager, Notification body, AccountEntity account, boolean isFirstOfBatch) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="151"
column="72"/>
</issue>
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static android.app.Notification make(final Context context, NotificationManager notificationManager, Notification body, AccountEntity account, boolean isFirstOfBatch) {"
errorLine2=" ~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java" file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="139" line="151"
column="52"/> column="113"/>
</issue> </issue>
<issue <issue
id="UnknownNullness" id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations" message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static void make(final Context context, Notification body, AccountEntity account, boolean isFirstOfBatch) {" errorLine1=" public static android.app.Notification make(final Context context, NotificationManager notificationManager, Notification body, AccountEntity account, boolean isFirstOfBatch) {"
errorLine2=" ~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java" file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="139" line="151"
column="71"/> column="132"/>
</issue>
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static void updateSummaryNotifications(Context context, NotificationManager notificationManager, AccountEntity account) {"
errorLine2=" ~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="273"
column="51"/>
</issue>
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static void updateSummaryNotifications(Context context, NotificationManager notificationManager, AccountEntity account) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="273"
column="68"/>
</issue>
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static void updateSummaryNotifications(Context context, NotificationManager notificationManager, AccountEntity account) {"
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="273"
column="109"/>
</issue> </issue>
<issue <issue
@ -7032,7 +6995,7 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java" file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="494" line="576"
column="48"/> column="48"/>
</issue> </issue>
@ -7043,74 +7006,30 @@
errorLine2=" ~~~~~~~"> errorLine2=" ~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java" file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="512" line="604"
column="49"/> column="49"/>
</issue> </issue>
<issue <issue
id="UnknownNullness" id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations" message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static boolean filterNotification(AccountEntity account, Notification notification," errorLine1=" public static boolean filterNotification(NotificationManager notificationManager, AccountEntity account, @NonNull Notification notification) {"
errorLine2=" ~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java" file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="533" line="620"
column="46"/> column="46"/>
</issue> </issue>
<issue <issue
id="UnknownNullness" id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations" message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static boolean filterNotification(AccountEntity account, Notification notification," errorLine1=" public static boolean filterNotification(NotificationManager notificationManager, AccountEntity account, @NonNull Notification notification) {"
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="533"
column="69"/>
</issue>
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" Context context) {"
errorLine2=" ~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="534"
column="47"/>
</issue>
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static boolean filterNotification(AccountEntity account, Notification.Type type,"
errorLine2=" ~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~">
<location <location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java" file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="538" line="620"
column="46"/> column="87"/>
</issue>
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" public static boolean filterNotification(AccountEntity account, Notification.Type type,"
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="538"
column="69"/>
</issue>
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations"
errorLine1=" Context context) {"
errorLine2=" ~~~~~~~">
<location
file="src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java"
line="539"
column="47"/>
</issue> </issue>
<issue <issue

View File

@ -39,6 +39,7 @@ import android.webkit.MimeTypeMap
import android.widget.Toast import android.widget.Toast
import androidx.core.app.ShareCompat import androidx.core.app.ShareCompat
import androidx.core.content.FileProvider import androidx.core.content.FileProvider
import androidx.core.content.IntentCompat
import androidx.fragment.app.FragmentActivity import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.Lifecycle import androidx.lifecycle.Lifecycle
import androidx.viewpager2.adapter.FragmentStateAdapter import androidx.viewpager2.adapter.FragmentStateAdapter
@ -96,7 +97,7 @@ class ViewMediaActivity : BaseActivity(), ViewImageFragment.PhotoActionsListener
supportPostponeEnterTransition() supportPostponeEnterTransition()
// Gather the parameters. // Gather the parameters.
attachments = intent.getParcelableArrayListExtra(EXTRA_ATTACHMENTS) attachments = IntentCompat.getParcelableArrayListExtra(intent, EXTRA_ATTACHMENTS, AttachmentViewData::class.java)
val initialPosition = intent.getIntExtra(EXTRA_ATTACHMENT_INDEX, 0) val initialPosition = intent.getIntExtra(EXTRA_ATTACHMENT_INDEX, 0)
// Adapter is actually of existential type PageAdapter & SharedElementsTransitionListener // Adapter is actually of existential type PageAdapter & SharedElementsTransitionListener

View File

@ -53,7 +53,9 @@ import androidx.appcompat.app.AlertDialog
import androidx.core.app.ActivityCompat import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.core.content.FileProvider import androidx.core.content.FileProvider
import androidx.core.content.IntentCompat
import androidx.core.content.res.use import androidx.core.content.res.use
import androidx.core.os.BundleCompat
import androidx.core.view.ContentInfoCompat import androidx.core.view.ContentInfoCompat
import androidx.core.view.OnReceiveContentListener import androidx.core.view.OnReceiveContentListener
import androidx.core.view.isGone import androidx.core.view.isGone
@ -251,7 +253,7 @@ class ComposeActivity :
/* If the composer is started up as a reply to another post, override the "starting" state /* If the composer is started up as a reply to another post, override the "starting" state
* based on what the intent from the reply request passes. */ * based on what the intent from the reply request passes. */
val composeOptions: ComposeOptions? = intent.getParcelableExtra(COMPOSE_OPTIONS_EXTRA) val composeOptions: ComposeOptions? = IntentCompat.getParcelableExtra(intent, COMPOSE_OPTIONS_EXTRA, ComposeOptions::class.java)
viewModel.setup(composeOptions) viewModel.setup(composeOptions)
setupButtons() setupButtons()
@ -285,7 +287,7 @@ class ComposeActivity :
/* Finally, overwrite state with data from saved instance state. */ /* Finally, overwrite state with data from saved instance state. */
savedInstanceState?.let { savedInstanceState?.let {
photoUploadUri = it.getParcelable(PHOTO_UPLOAD_URI_KEY) photoUploadUri = BundleCompat.getParcelable(it, PHOTO_UPLOAD_URI_KEY, Uri::class.java)
(it.getSerializable(VISIBILITY_KEY) as Status.Visibility).apply { (it.getSerializable(VISIBILITY_KEY) as Status.Visibility).apply {
setStatusVisibility(this) setStatusVisibility(this)
@ -314,12 +316,12 @@ class ComposeActivity :
if (type.startsWith("image/") || type.startsWith("video/") || type.startsWith("audio/")) { if (type.startsWith("image/") || type.startsWith("video/") || type.startsWith("audio/")) {
when (intent.action) { when (intent.action) {
Intent.ACTION_SEND -> { Intent.ACTION_SEND -> {
intent.getParcelableExtra<Uri>(Intent.EXTRA_STREAM)?.let { uri -> IntentCompat.getParcelableExtra(intent, Intent.EXTRA_STREAM, Uri::class.java)?.let { uri ->
pickMedia(uri) pickMedia(uri)
} }
} }
Intent.ACTION_SEND_MULTIPLE -> { Intent.ACTION_SEND_MULTIPLE -> {
intent.getParcelableArrayListExtra<Uri>(Intent.EXTRA_STREAM)?.forEach { uri -> IntentCompat.getParcelableArrayListExtra(intent, Intent.EXTRA_STREAM, Uri::class.java)?.forEach { uri ->
pickMedia(uri) pickMedia(uri)
} }
} }

View File

@ -27,6 +27,7 @@ import android.view.ViewGroup
import android.view.WindowManager import android.view.WindowManager
import android.widget.EditText import android.widget.EditText
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import androidx.core.os.BundleCompat
import androidx.core.os.bundleOf import androidx.core.os.bundleOf
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
@ -73,7 +74,7 @@ class CaptionDialog : DialogFragment() {
val window = dialog.window val window = dialog.window
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE) window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
val previewUri = arguments?.getParcelable<Uri>(PREVIEW_URI_ARG) ?: error("Preview Uri is null") val previewUri = BundleCompat.getParcelable(requireArguments(), PREVIEW_URI_ARG, Uri::class.java) ?: error("Preview Uri is null")
// Load the image and manually set it into the ImageView because it doesn't have a fixed size. // Load the image and manually set it into the ImageView because it doesn't have a fixed size.
Glide.with(this) Glide.with(this)
.load(previewUri) .load(previewUri)

View File

@ -15,13 +15,13 @@
package com.keylesspalace.tusky.components.compose.dialog package com.keylesspalace.tusky.components.compose.dialog
import android.app.Activity
import android.content.DialogInterface import android.content.DialogInterface
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.net.Uri import android.net.Uri
import android.view.WindowManager import android.view.WindowManager
import android.widget.FrameLayout import android.widget.FrameLayout
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
@ -38,7 +38,7 @@ fun <T> T.makeFocusDialog(
existingFocus: Focus?, existingFocus: Focus?,
previewUri: Uri, previewUri: Uri,
onUpdateFocus: suspend (Focus) -> Unit onUpdateFocus: suspend (Focus) -> Unit
) where T : Activity, T : LifecycleOwner { ) where T : AppCompatActivity, T : LifecycleOwner {
val focus = existingFocus ?: Focus(0.0f, 0.0f) // Default to center val focus = existingFocus ?: Focus(0.0f, 0.0f) // Default to center
val dialogBinding = DialogFocusBinding.inflate(layoutInflater) val dialogBinding = DialogFocusBinding.inflate(layoutInflater)

View File

@ -7,6 +7,7 @@ import android.widget.AdapterView
import android.widget.ArrayAdapter import android.widget.ArrayAdapter
import androidx.activity.viewModels import androidx.activity.viewModels
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import androidx.core.content.IntentCompat
import androidx.core.view.size import androidx.core.view.size
import androidx.core.widget.doAfterTextChanged import androidx.core.widget.doAfterTextChanged
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
@ -47,7 +48,7 @@ class EditFilterActivity : BaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
originalFilter = intent?.getParcelableExtra(FILTER_TO_EDIT) originalFilter = IntentCompat.getParcelableExtra(intent, FILTER_TO_EDIT, Filter::class.java)
filter = originalFilter ?: Filter("", "", listOf(), null, Filter.Action.WARN.action, listOf()) filter = originalFilter ?: Filter("", "", listOf(), null, Filter.Action.WARN.action, listOf())
binding.apply { binding.apply {
contextSwitches = mapOf( contextSwitches = mapOf(

View File

@ -33,6 +33,7 @@ import android.webkit.WebViewClient
import androidx.activity.result.contract.ActivityResultContract import androidx.activity.result.contract.ActivityResultContract
import androidx.activity.viewModels import androidx.activity.viewModels
import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AlertDialog
import androidx.core.content.IntentCompat
import androidx.core.net.toUri import androidx.core.net.toUri
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import com.keylesspalace.tusky.BaseActivity import com.keylesspalace.tusky.BaseActivity
@ -61,7 +62,9 @@ class OauthLogin : ActivityResultContract<LoginData, LoginResult>() {
return if (resultCode == Activity.RESULT_CANCELED) { return if (resultCode == Activity.RESULT_CANCELED) {
LoginResult.Cancel LoginResult.Cancel
} else { } else {
intent!!.getParcelableExtra(RESULT_EXTRA)!! intent?.let {
IntentCompat.getParcelableExtra(it, RESULT_EXTRA, LoginResult::class.java)
} ?: LoginResult.Err("failed parsing LoginWebViewActivity result")
} }
} }
@ -70,7 +73,7 @@ class OauthLogin : ActivityResultContract<LoginData, LoginResult>() {
private const val DATA_EXTRA = "data" private const val DATA_EXTRA = "data"
fun parseData(intent: Intent): LoginData { fun parseData(intent: Intent): LoginData {
return intent.getParcelableExtra(DATA_EXTRA)!! return IntentCompat.getParcelableExtra(intent, DATA_EXTRA, LoginData::class.java)!!
} }
fun makeResultIntent(result: LoginResult): Intent { fun makeResultIntent(result: LoginResult): Intent {

View File

@ -26,6 +26,7 @@ import android.view.MotionEvent
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
import androidx.core.os.BundleCompat
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.bumptech.glide.load.DataSource import com.bumptech.glide.load.DataSource
import com.bumptech.glide.load.engine.GlideException import com.bumptech.glide.load.engine.GlideException
@ -92,7 +93,7 @@ class ViewImageFragment : ViewMediaFragment() {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
val arguments = this.requireArguments() val arguments = this.requireArguments()
val attachment = arguments.getParcelable<Attachment>(ARG_ATTACHMENT) val attachment = BundleCompat.getParcelable(arguments, ARG_ATTACHMENT, Attachment::class.java)
this.shouldStartTransition = arguments.getBoolean(ARG_START_POSTPONED_TRANSITION) this.shouldStartTransition = arguments.getBoolean(ARG_START_POSTPONED_TRANSITION)
val url: String? val url: String?
var description: String? = null var description: String? = null

View File

@ -16,6 +16,7 @@ import android.util.Log
import androidx.annotation.StringRes import androidx.annotation.StringRes
import androidx.core.app.NotificationCompat import androidx.core.app.NotificationCompat
import androidx.core.app.ServiceCompat import androidx.core.app.ServiceCompat
import androidx.core.content.IntentCompat
import at.connyduck.calladapter.networkresult.fold import at.connyduck.calladapter.networkresult.fold
import com.keylesspalace.tusky.MainActivity import com.keylesspalace.tusky.MainActivity
import com.keylesspalace.tusky.R import com.keylesspalace.tusky.R
@ -83,7 +84,7 @@ class SendStatusService : Service(), Injectable {
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int { override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
if (intent.hasExtra(KEY_STATUS)) { if (intent.hasExtra(KEY_STATUS)) {
val statusToSend: StatusToSend = intent.getParcelableExtra(KEY_STATUS) val statusToSend: StatusToSend = IntentCompat.getParcelableExtra(intent, KEY_STATUS, StatusToSend::class.java)
?: throw IllegalStateException("SendStatusService started without $KEY_STATUS extra") ?: throw IllegalStateException("SendStatusService started without $KEY_STATUS extra")
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {