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

Fix #4803 Failed to add Admin (or non-admin) Profile Picture. #5118

Merged
merged 8 commits into from
Aug 10, 2023
Merged

Fix #4803 Failed to add Admin (or non-admin) Profile Picture. #5118

merged 8 commits into from
Aug 10, 2023

Conversation

ShubhadeepKarmakar
Copy link
Collaborator

@ShubhadeepKarmakar ShubhadeepKarmakar commented Aug 6, 2023

Explanation

  • Fix Failed to add Admin (or non-admin) Profile Picture. #4803
    val galleryIntent = Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI)
    The above code (previous) is the explicit way to get images from gallery but is not working here. But the updated code below is less explicit but works fine,
    val galleryIntent = Intent(Intent.ACTION_GET_CONTENT).apply { type = "image/*" }

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

Screen Recording

oppia.mp4

@ShubhadeepKarmakar ShubhadeepKarmakar requested a review from a team as a code owner August 6, 2023 00:18
@adhiamboperes
Copy link
Collaborator

Thanks @ShubhadeepKarmakar!

Hi @kkmurerwa, could you give this a pass and assign it to me once any initial concerns have been addressed?

Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

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

Thanks @ShubhadeepKarmakar!

In addition to the tests, please update the following so that we can merge your PR:

  1. Your PR title should either describe the problem being solved, or make it the same as the issue title.
  2. Instead of saying "Added two lines to the codebase and resolved.", please explain the change you have made in terms of why the old code didn't work, and why your change fixes the bug. This is helpful for future developers reading the code.

@adhiamboperes
Copy link
Collaborator

adhiamboperes commented Aug 7, 2023

Additionally, here is a link to the wiki to help you identify the cause of your failing CI checks, and another link to fixing static analysis check failures.

@oppiabot
Copy link

oppiabot bot commented Aug 7, 2023

Hi @ShubhadeepKarmakar, it looks like some changes were requested on this pull request by @adhiamboperes. PTAL. Thanks!

@kkmurerwa
Copy link
Collaborator

Hi @adhiamboperes. I see that you have already done a review of this PR. I don't think I have any further comments. @ShubhadeepKarmakar if you get stuck, feel free to reach out to me.

@kkmurerwa kkmurerwa removed their assignment Aug 7, 2023
@ShubhadeepKarmakar
Copy link
Collaborator Author

@kkmurerwa I am facing this problem at the time of updating the test cases
error

@kkmurerwa
Copy link
Collaborator

@kkmurerwa I am facing this problem at the time of updating the test cases error

Hi @ShubhadeepKarmakar. The problem could be the Android Studio version that you are using. Please check that you are using Android Studio Bumblebee.

@ShubhadeepKarmakar
Copy link
Collaborator Author

@kkmurerwa I am facing this problem at the time of updating the test cases error

Hi @ShubhadeepKarmakar. The problem could be the Android Studio version that you are using. Please check that you are using Android Studio Bumblebee.

I'm currently using Android Studio Electric Eel,
Oky, lets see what happen after dropping the version.

@ShubhadeepKarmakar
Copy link
Collaborator Author

I'm facing an installation error while running the test testProfileProgressFragment_imageSelectAvatar_configChange_checkGalleryIntent

error2

@ShubhadeepKarmakar ShubhadeepKarmakar changed the title Fix #4803 Profile picture adding problem solved Fix #4803 Failed to add Admin (or non-admin) Profile Picture. Aug 7, 2023
@adhiamboperes
Copy link
Collaborator

I'm facing an installation error while running the test testProfileProgressFragment_imageSelectAvatar_configChange_checkGalleryIntent

error2

My experience with Xiaomi devices is that you need to accept the install permission request. It's best to use the "remember my choice" option.

An alternative is to setup an Android emulator. Preferably pixel 3a sdk 29.

Could you also take another look at the wiki set up instructions for additional information?

Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

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

Thanks!

I just had one more comment, but otherwise your changes look good so far.

Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

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

Thanks @ShubhadeepKarmakar!

Congratulations on getting your first PR approveed! Your changes LGTM.

@adhiamboperes adhiamboperes enabled auto-merge (squash) August 10, 2023 02:25
@oppiabot oppiabot bot added the PR: LGTM label Aug 10, 2023
@oppiabot
Copy link

oppiabot bot commented Aug 10, 2023

Hi @ShubhadeepKarmakar, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to ask someone to merge your PR once the CI checks pass and you're happy with it. Thanks!

@adhiamboperes adhiamboperes merged commit d58c816 into oppia:develop Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to add Admin (or non-admin) Profile Picture.
3 participants