EdricChan03 / EdricChan03/studybuddy-android

[Quality] Fix outstanding lint warnings/errors

Open
#379 0 comments 0 reactions 0 assignees View on GitHub
code health
Dominant language
Kotlin
Stars
23
Forks
9
Avg merge
9h 1m
Merged PRs (30d)
1

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### What happened?

Building the app [currently shows quite a few lint warnings/errors produced by the Kotlin compiler](https://scans.gradle.com/s/ngjyydkjeje4a/console-log?page=1#L335-L393), as well as other logs

### Expected behaviour

Lint warnings/errors should be fixed as required

### Reproduction steps

1. Build the app
2. Notice that lint warnings/errors are outputted to the console

### Application variant

Release, Debug, Nightly

### Application version

_No response_

### Application version code

_No response_

### Relevant log output

```shell
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/auth/LoginActivity.kt:131:15 'onActivityResult(Int, Int, Intent?): Unit' is deprecated. Overrides deprecated member in 'androidx.activity.ComponentActivity'. Deprecated in Java
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/auth/LoginActivity.kt:165:9 'startActivityForResult(Intent, Int): Unit' is deprecated. Deprecated in Java
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/auth/LoginActivity.kt:169:57 'isNetworkAvailable(Context): Boolean' is deprecated. Use ConnectivityManager.getActiveNetworkInfo
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/auth/LoginActivity.kt:170:25 'isNetworkAvailable(Context): Boolean' is deprecated. Use ConnectivityManager.getActiveNetworkInfo
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/auth/RegisterActivity.kt:143:25 'isNetworkAvailable(Context): Boolean' is deprecated. Use ConnectivityManager.getActiveNetworkInfo
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/chat/NewChatActivity.kt:89:89 Parameter 'dialog' is never used, could be renamed to _
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/chat/NewChatActivity.kt:94:33 'startActivityForResult(Intent, Int): Unit' is deprecated. Deprecated in Java
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/chat/NewChatActivity.kt:211:15 'onActivityResult(Int, Int, Intent?): Unit' is deprecated. Overrides deprecated member in 'androidx.activity.ComponentActivity'. Deprecated in Java
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/chat/adapter/ChatsAdapter.kt:107:17 'getter for adapterPosition: Int' is deprecated. Deprecated in Java
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/chat/adapter/ChatsAdapter.kt:108:26 'getter for adapterPosition: Int' is deprecated. Deprecated in Java
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/chat/fragment/ChatFragment.kt:114:69 Variable 'isCallbackHandled' initializer is redundant
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/chat/messages/ViewChatActivity.kt:30:51 'get(String!): Any?' is deprecated. Deprecated in Java
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/debug/DebugModalBottomSheetActivity.kt:168:57 'queryIntentActivities(Intent, Int): (Mutable)List' is deprecated. Deprecated in Java
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/main/fragment/NavBottomSheetDialogFragment.kt:58:24 'getParcelable(String?): T?' is deprecated. Deprecated in Java
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/settings/SettingsActivity.kt:95:17 'setTargetFragment(Fragment?, Int): Unit' is deprecated. Deprecated in Java
w: file:///home/runner/work/studybuddy-android/studybuddy-android/app/src/main/java/com/edricchan/studybuddy/ui/modules/settings/fragment/DebugSettingsFragment.kt:117:45 'getSerializable(String?): Serializable?' is deprecated. Deprecated in Java
```

### Possible solution

Fix lint warnings/errors as advised by the IDE/compiler message

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.