From 7d78c8819c56ba984b5246a4cfb795990d14cd1e Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 8 Mar 2022 23:15:37 +0100 Subject: [PATCH 1/3] Ignore some other lint warnings --- .../android/sdk/internal/legacy/riot/LoginStorage.java | 2 ++ vector/lint.xml | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/legacy/riot/LoginStorage.java b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/legacy/riot/LoginStorage.java index 2820b66886..62f90f563e 100755 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/legacy/riot/LoginStorage.java +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/legacy/riot/LoginStorage.java @@ -16,6 +16,7 @@ package org.matrix.android.sdk.internal.legacy.riot; +import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; @@ -196,6 +197,7 @@ public class LoginStorage { /** * Clear the stored values */ + @SuppressLint("ApplySharedPref") public void clear() { SharedPreferences prefs = mContext.getSharedPreferences(PREFS_LOGIN, Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); diff --git a/vector/lint.xml b/vector/lint.xml index 22da6adfa9..6bdd2ae585 100644 --- a/vector/lint.xml +++ b/vector/lint.xml @@ -15,6 +15,11 @@ + + + + + From 3f17cf595f9ca4da85b3dd79b0f5ad5d4ccc3ba7 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 9 Mar 2022 14:55:40 +0100 Subject: [PATCH 2/3] Remove unused resources --- .../org/billcarsonfr/jsonviewer/ValueItem.kt | 6 +- .../src/main/res/menu/jv_menu_item.xml | 8 - .../src/main/res/values/strings.xml | 1 + .../layout/activity_debug_button_styles.xml | 26 -- .../debug/res/layout/debug_social_login.xml | 2 +- ...social_google_background_selector_dark.xml | 7 - .../main/res/values-land/styles_dial_pad.xml | 32 --- .../ui-styles/src/main/res/values/colors.xml | 17 -- .../ui-styles/src/main/res/values/dimens.xml | 9 - .../ui-styles/src/main/res/values/palette.xml | 6 +- .../src/main/res/values/palette_mobile.xml | 1 - .../main/res/values/styles_attachments.xml | 18 -- .../src/main/res/values/styles_buttons.xml | 23 -- .../src/main/res/values/styles_dial_pad.xml | 5 +- .../main/res/values/styles_social_login.xml | 5 - .../src/main/res/values/theme_black.xml | 2 - .../src/main/res/values/theme_dark.xml | 2 - .../src/main/res/values/theme_light.xml | 2 - matrix-sdk-android/build.gradle | 5 +- vector/lint.xml | 19 +- .../main/res/anim/anim_slide_in_bottom.xml | 9 - .../src/main/res/anim/anim_slide_nothing.xml | 9 - .../main/res/anim/anim_slide_out_bottom.xml | 14 -- vector/src/main/res/anim/enter_from_left.xml | 10 - vector/src/main/res/anim/enter_from_right.xml | 10 - vector/src/main/res/anim/exit_to_left.xml | 10 - vector/src/main/res/anim/exit_to_right.xml | 10 - .../src/main/res/anim/unread_marker_anim.xml | 14 -- .../ic_material_call_end_grey.png | Bin 4424 -> 0 bytes .../ic_material_done_white.png | Bin 255 -> 0 bytes ...incoming_call_notification_transparent.png | Bin 684 -> 0 bytes .../drawable/bg_attachment_type_selector.xml | 23 -- .../main/res/drawable/bg_button_secondary.xml | 24 -- .../src/main/res/drawable/bg_group_item.xml | 16 -- .../res/drawable/bg_tombstone_predecessor.xml | 21 -- .../drawable/call_header_transparent_bg.xml | 8 - .../ic_attachment_audio_white_24dp.xml | 4 - vector/src/main/res/drawable/ic_bell.xml | 14 -- vector/src/main/res/drawable/ic_book.xml | 21 -- vector/src/main/res/drawable/ic_call.xml | 14 -- .../res/drawable/ic_call_conference_small.xml | 14 -- vector/src/main/res/drawable/ic_call_end.xml | 9 - .../drawable/ic_call_flip_camera_active.xml | 11 - .../drawable/ic_call_flip_camera_default.xml | 7 - .../main/res/drawable/ic_call_mute_active.xml | 11 - .../res/drawable/ic_call_mute_default.xml | 7 - vector/src/main/res/drawable/ic_call_pip.xml | 9 - .../main/res/drawable/ic_fab_add_by_mxid.xml | 30 --- .../res/drawable/ic_fab_add_by_qr_code.xml | 30 --- vector/src/main/res/drawable/ic_flair.xml | 22 -- .../res/drawable/ic_home_bottom_catchup.xml | 9 - vector/src/main/res/drawable/ic_lock.xml | 22 -- .../src/main/res/drawable/ic_material_add.xml | 9 - .../res/drawable/ic_more_horizontal_2.xml | 30 --- vector/src/main/res/drawable/ic_poll.xml | 30 --- .../main/res/drawable/ic_radio_button_off.xml | 12 - vector/src/main/res/drawable/red_dot.xml | 11 - .../drawable/searches_cursor_background.xml | 5 - ...vector_medias_picker_button_background.xml | 10 - .../res/layout/activity_incoming_share.xml | 46 ---- .../bottom_sheet_call_dialer_choice.xml | 27 --- ...bottom_sheet_call_sound_device_chooser.xml | 60 ----- ...gment_bootstrap_enter_account_password.xml | 55 ----- .../main/res/layout/fragment_ftue_splash.xml | 226 ------------------ .../layout/item_create_direct_room_user.xml | 73 ------ .../item_timeline_event_code_block_stub.xml | 29 --- .../item_timeline_event_poll_container.xml | 6 - vector/src/main/res/layout/option_buttons.xml | 7 - .../vector_home_badge_unread_layout.xml | 25 -- .../src/main/res/layout/view_read_marker.xml | 63 ----- .../layout/view_typing_message_avatars.xml | 7 - vector/src/main/res/menu/menu_submit.xml | 12 - .../src/main/res/menu/vector_media_viewer.xml | 10 - vector/src/main/res/raw/busy.ogg | Bin 26228 -> 0 bytes vector/src/main/res/raw/callend.ogg | Bin 13932 -> 0 bytes vector/src/main/res/raw/ringback.ogg | Bin 10399 -> 0 bytes vector/src/main/res/values/donottranslate.xml | 8 - .../src/main/res/values/strings_login_v2.xml | 1 - .../src/main/res/xml/riotx_provider_paths.xml | 6 - .../res/xml/vector_settings_keyword_view.xml | 6 - 80 files changed, 16 insertions(+), 1366 deletions(-) delete mode 100644 library/jsonviewer/src/main/res/menu/jv_menu_item.xml delete mode 100644 library/ui-styles/src/main/res/color/button_social_google_background_selector_dark.xml delete mode 100644 library/ui-styles/src/main/res/values-land/styles_dial_pad.xml delete mode 100644 library/ui-styles/src/main/res/values/styles_attachments.xml delete mode 100644 vector/src/main/res/anim/anim_slide_in_bottom.xml delete mode 100644 vector/src/main/res/anim/anim_slide_nothing.xml delete mode 100644 vector/src/main/res/anim/anim_slide_out_bottom.xml delete mode 100644 vector/src/main/res/anim/enter_from_left.xml delete mode 100644 vector/src/main/res/anim/enter_from_right.xml delete mode 100644 vector/src/main/res/anim/exit_to_left.xml delete mode 100644 vector/src/main/res/anim/exit_to_right.xml delete mode 100644 vector/src/main/res/anim/unread_marker_anim.xml delete mode 100644 vector/src/main/res/drawable-xxhdpi/ic_material_call_end_grey.png delete mode 100755 vector/src/main/res/drawable-xxhdpi/ic_material_done_white.png delete mode 100755 vector/src/main/res/drawable-xxhdpi/incoming_call_notification_transparent.png delete mode 100644 vector/src/main/res/drawable/bg_attachment_type_selector.xml delete mode 100644 vector/src/main/res/drawable/bg_button_secondary.xml delete mode 100644 vector/src/main/res/drawable/bg_group_item.xml delete mode 100644 vector/src/main/res/drawable/bg_tombstone_predecessor.xml delete mode 100644 vector/src/main/res/drawable/call_header_transparent_bg.xml delete mode 100644 vector/src/main/res/drawable/ic_attachment_audio_white_24dp.xml delete mode 100644 vector/src/main/res/drawable/ic_bell.xml delete mode 100644 vector/src/main/res/drawable/ic_book.xml delete mode 100644 vector/src/main/res/drawable/ic_call.xml delete mode 100644 vector/src/main/res/drawable/ic_call_conference_small.xml delete mode 100644 vector/src/main/res/drawable/ic_call_end.xml delete mode 100644 vector/src/main/res/drawable/ic_call_flip_camera_active.xml delete mode 100644 vector/src/main/res/drawable/ic_call_flip_camera_default.xml delete mode 100644 vector/src/main/res/drawable/ic_call_mute_active.xml delete mode 100644 vector/src/main/res/drawable/ic_call_mute_default.xml delete mode 100644 vector/src/main/res/drawable/ic_call_pip.xml delete mode 100644 vector/src/main/res/drawable/ic_fab_add_by_mxid.xml delete mode 100644 vector/src/main/res/drawable/ic_fab_add_by_qr_code.xml delete mode 100644 vector/src/main/res/drawable/ic_flair.xml delete mode 100644 vector/src/main/res/drawable/ic_home_bottom_catchup.xml delete mode 100644 vector/src/main/res/drawable/ic_lock.xml delete mode 100644 vector/src/main/res/drawable/ic_material_add.xml delete mode 100644 vector/src/main/res/drawable/ic_more_horizontal_2.xml delete mode 100644 vector/src/main/res/drawable/ic_poll.xml delete mode 100644 vector/src/main/res/drawable/ic_radio_button_off.xml delete mode 100644 vector/src/main/res/drawable/red_dot.xml delete mode 100644 vector/src/main/res/drawable/searches_cursor_background.xml delete mode 100644 vector/src/main/res/drawable/vector_medias_picker_button_background.xml delete mode 100644 vector/src/main/res/layout/activity_incoming_share.xml delete mode 100644 vector/src/main/res/layout/bottom_sheet_call_dialer_choice.xml delete mode 100644 vector/src/main/res/layout/bottom_sheet_call_sound_device_chooser.xml delete mode 100644 vector/src/main/res/layout/fragment_bootstrap_enter_account_password.xml delete mode 100644 vector/src/main/res/layout/fragment_ftue_splash.xml delete mode 100644 vector/src/main/res/layout/item_create_direct_room_user.xml delete mode 100644 vector/src/main/res/layout/item_timeline_event_code_block_stub.xml delete mode 100644 vector/src/main/res/layout/item_timeline_event_poll_container.xml delete mode 100644 vector/src/main/res/layout/option_buttons.xml delete mode 100644 vector/src/main/res/layout/vector_home_badge_unread_layout.xml delete mode 100644 vector/src/main/res/layout/view_read_marker.xml delete mode 100644 vector/src/main/res/layout/view_typing_message_avatars.xml delete mode 100644 vector/src/main/res/menu/menu_submit.xml delete mode 100644 vector/src/main/res/menu/vector_media_viewer.xml delete mode 100755 vector/src/main/res/raw/busy.ogg delete mode 100755 vector/src/main/res/raw/callend.ogg delete mode 100755 vector/src/main/res/raw/ringback.ogg delete mode 100644 vector/src/main/res/xml/riotx_provider_paths.xml delete mode 100644 vector/src/main/res/xml/vector_settings_keyword_view.xml diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt index 227ac2a71d..00d66645e6 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt @@ -20,7 +20,6 @@ import android.content.ClipData import android.content.ClipboardManager import android.content.Context import android.view.ContextMenu -import android.view.Menu import android.view.View import android.widget.LinearLayout import android.widget.TextView @@ -77,10 +76,7 @@ internal abstract class ValueItem : EpoxyModelWithHolder() { menuInfo: ContextMenu.ContextMenuInfo? ) { if (copyValue != null) { - val menuItem = menu?.add( - Menu.NONE, R.id.copy_value, - Menu.NONE, R.string.copy_value - ) + val menuItem = menu?.add(R.string.copy_value) val clipService = v?.context?.getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager menuItem?.setOnMenuItemClickListener { diff --git a/library/jsonviewer/src/main/res/menu/jv_menu_item.xml b/library/jsonviewer/src/main/res/menu/jv_menu_item.xml deleted file mode 100644 index 4da69b5117..0000000000 --- a/library/jsonviewer/src/main/res/menu/jv_menu_item.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/library/jsonviewer/src/main/res/values/strings.xml b/library/jsonviewer/src/main/res/values/strings.xml index cc4b8726b4..fbd67256f5 100644 --- a/library/jsonviewer/src/main/res/values/strings.xml +++ b/library/jsonviewer/src/main/res/values/strings.xml @@ -1,3 +1,4 @@ + Copy Value diff --git a/library/ui-styles/src/debug/res/layout/activity_debug_button_styles.xml b/library/ui-styles/src/debug/res/layout/activity_debug_button_styles.xml index 0f129fb406..cc15bb1b3b 100644 --- a/library/ui-styles/src/debug/res/layout/activity_debug_button_styles.xml +++ b/library/ui-styles/src/debug/res/layout/activity_debug_button_styles.xml @@ -71,19 +71,6 @@ android:enabled="false" android:text="Destructive disabled" /> -