New issue
Advanced search Search tips

Issue 614172 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Android Fragment onAttach(Activity activity) is deprecated in API 23

Reported by braveyao@webrtc.org, May 23 2016

Issue description

Steps to reproduce the problem:
Android Fragment onAttach(Activity activity) is deprecated in API 23. It's now onAttach(Context context). 
Delete this method when minSdkVersion of chrome is 23 in src/media/capture/content/java/src/org/chromium/media/ScreenCapture.java

What is the expected behavior?

What went wrong?
Deprecated API.

Did this work before? N/A 

Chrome version: 50.0.2661.102  Channel: n/a
OS Version: 
Flash Version:
 
Labels: -Pri-2 -Arch-x86_64 Arch-All Pri-3
Owner: braveyao@chromium.org
Status: Assigned (was: Unconfirmed)
Copying a discussion from a related bug ( issue 537049 ): ScreenCapture can be reimplemented to be an activity, not a Fragment, because tokens from MediaProjectionManager are granted to the application, not to the specific activity that calls startActivityForResult(createScreenCaptureIntent(), ...). This way, ScreenCapture wouldn't need to mess with getLastTrackedFocusedActivity and fragment transactions to add itself into the current activity. It would also resolve the issue that ScreenCapture fragment never removes itself from the activity.
Cc: bsazonov@chromium.org
Thanks for the tips!
We're going to implement a new W3C desktop capture API on all platforms soon. Will try to re-implement screen capture on Android accordingly and take care of this isssue. 

Sign in to add a comment