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

[Cleanup]: Resolve Android Studio Warnings (#13282) #17648

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Siddheshjondhale
Copy link

@Siddheshjondhale Siddheshjondhale commented Dec 22, 2024

Purpose / Description

Reducing Android Studio warnings by cleaning up unused code and fixing initialization.

Fixes

Approach

  • Made the unmountReceiver property private in AppCompatPreferenceActivity.kt.
  • Removed the unused import (import androidx.activity.addCallback) in CardTemplateBrowserAppearanceEditor.kt.
  • Removed the unused property editedModelFileName in CardTemplateNotetype.kt.
  • Fixed the unresolved reference to BuildConfig in CardTemplateNotetype.kt.
  • Made the legacyAnkiDroidDirectory property private in CollectionHelper.kt.
  • Removed the unused property fieldsAsBundleForPreview in NoteEditor.kt.
  • Fixed the initialization of activity in RtlCompliantActionProvider.kt by assigning it immediately during declaration, rather than inside the init block. This ensures proper initialization and avoids potential issues.

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have performed a self-review of your own code

Removed unused imports and properties
Made some properties private for encapsulation
Fixed unresolved references (e.g., BuildConfig)
Simplified 'activity' initialization
Copy link

welcome bot commented Dec 22, 2024

First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant