Skip to content

Update icon for Exercise sample Compose #334

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

Merged
merged 1 commit into from
Jun 26, 2025
Merged

Update icon for Exercise sample Compose #334

merged 1 commit into from
Jun 26, 2025

Conversation

kul3r4
Copy link
Contributor

@kul3r4 kul3r4 commented Jun 25, 2025

Update icon for Exercise sample Compose to be round and retook screenshot

@kul3r4 kul3r4 requested a review from ithinkihaveacat June 25, 2025 20:15
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @kul3r4, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on modernizing the application's visual identity by updating the launcher icon for the Exercise sample Compose app to an adaptive and round format. This involves introducing new vector drawable assets for the icon's background and foreground. Additionally, a small, unrelated code cleanup was included in the service layer.

Highlights

  • App Icon Update: The application icon for the Exercise sample Compose app has been updated to an adaptive icon, including a new round version, as specified in the PR description.
  • New Drawable Assets: New vector drawable XML files (ic_launcher_background.xml and ic_launcher_foreground.xml) were added to define the visual components of the new adaptive icon.
  • Code Cleanup: A minor code cleanup was performed in ExerciseService.kt, replacing the ServiceInfo.FOREGROUND_SERVICE_TYPE_NONE constant with its literal integer value 0.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully updates the application icon to a round version by adding the necessary drawable and mipmap resources. The changes align with the description. My review includes one comment on a change in ExerciseService.kt that replaces a descriptive constant with a magic number. I recommend reverting this change to maintain code clarity.

@@ -55,7 +55,7 @@ class ExerciseService : LifecycleService() {
private val localBinder = LocalBinder()

private val serviceRunningInForeground: Boolean
get() = this.foregroundServiceType != ServiceInfo.FOREGROUND_SERVICE_TYPE_NONE
get() = this.foregroundServiceType != 0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using the magic number 0 here reduces code readability and maintainability. It's preferable to use the ServiceInfo.FOREGROUND_SERVICE_TYPE_NONE constant, as its name clearly communicates the purpose of the comparison.

Suggested change
get() = this.foregroundServiceType != 0
get() = this.foregroundServiceType != ServiceInfo.FOREGROUND_SERVICE_TYPE_NONE

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ServiceInfo.FOREGROUND_SERVICE_TYPE_NONE is deprecated, elsewhere in the code 0 is used:

// Starting with Wear 5 (API 34), startForeground should be called with
                // foregroundServiceTypes
                ServiceInfo.FOREGROUND_SERVICE_TYPE_LOCATION or
                    if
                        (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
                        ServiceInfo.FOREGROUND_SERVICE_TYPE_HEALTH
                    } else {
                        0
                    }

@kul3r4 kul3r4 merged commit 6bb2df1 into android:main Jun 26, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants