-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Use native Bundle.toString() implementation #12173
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
base: refactor
Are you sure you want to change the base?
Use native Bundle.toString() implementation #12173
Conversation
iirc I created that function because the normal .toString() printed just Bundle{hash} or didn't include all items. Or maybe it did so only on older Android versions. But I remember definitely considering the native .toString() and not being able to get enough information. So I'd leave it as before, but please try out the two methods on both an old (e.g. API22) and a new android version and post the 4 outputs here, then we can decide. If we decide to keep the previous bevavior, a comment should be added (I should have done so when I implemented it initally, sorry about it). |
The implementation has been around since the very first Android version: https://developer.android.com/reference/android/os/Bundle#toString() |
41eaa00
to
de6dc54
Compare
I made some changes to unparcel the extras so that their contents are actually displayed. The format is as follows:
|
I don't see any advantage of the new implementation with respect to the old one. The new one even uses more lines of code where you just want to print logs. It's just a debugging method anyway, so I'd keep the previous. |
Alternatively, the extension could be updated to take an |
291414c
to
50c44fc
Compare
50c44fc
to
9c3fa3e
Compare
|
What is it?
Description of the changes in your PR
Bundle.toString()
implementation.APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence