Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Conversation

SUPERCILEX
Copy link
Contributor

@samtstern The Android team announced their decision to kill all framework fragments so this PR deprecates all APIs that use those. It includes eventually getting rid of support for normal activities in some cases. Do you think that's okay?

Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
@@ -9,6 +9,7 @@
/**
* Permissions helper for {@link Activity}.
*/
@Deprecated
class ActivityPermissionHelper extends BaseFrameworkPermissionsHelper<Activity> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This class uses the framework fragments so I deprecated it... not sure if we actually want to do that though.

@samtstern
Copy link
Contributor

@SUPERCILEX thanks for bringing this up. It's an interesting move for sure, maybe we should wait and see what some other prominent Android libraries do to reflect the change?

@SUPERCILEX
Copy link
Contributor Author

@samtstern So I've been poking around a bunch of libraries, and it seems like we're one of the few who support fragments and the only ones who support framework fragments besides https://github.com/permissions-dispatcher/PermissionsDispatcher. I've created permissions-dispatcher/PermissionsDispatcher#445 to see what they think.

@samtstern
Copy link
Contributor

@SUPERCILEX wow thanks for doing the research!

@SUPERCILEX
Copy link
Contributor Author

@samtstern Ok, so Glide and the other permission library have both deprecated framework fragments so I think that's the way to go. 👍

@samtstern
Copy link
Contributor

@SUPERCILEX thanks for the research! I still want to wait until the actual Fragment deprecation is visible in the SDK (it isn't yet, right) to actually release this.

@SUPERCILEX
Copy link
Contributor Author

Alrighty, SGTM

Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
# Conflicts:
#	build.gradle
#	easypermissions/build.gradle
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
# Conflicts:
#	build.gradle
#	gradle/wrapper/gradle-wrapper.jar
#	gradle/wrapper/gradle-wrapper.properties
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
@SUPERCILEX SUPERCILEX changed the title Deprecate all APIs that use framework fragments Remove all APIs that use framework fragments Aug 10, 2018
@SUPERCILEX SUPERCILEX changed the title Remove all APIs that use framework fragments [WIP] Remove all APIs that use framework fragments Aug 10, 2018
@SUPERCILEX
Copy link
Contributor Author

@samtstern Ok, API 28 is out! 😁 I nuked all the framework APIs so we can jump straight to v2.0, but I'm still on the fence about the Activity stuff. Should we support plain activities or require a FragmentActivity?

Copy link
Contributor

@samtstern samtstern left a comment

Choose a reason for hiding this comment

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

Thanks for staying on top of this! I think we should support basic Activity if we still can.

Surprised SDK 28 is out but support lib is still not stable yet, I'd like to wait for stable support lib if we can...

@@ -14,6 +14,7 @@
* {@link DialogFragment} to display rationale for permission requests when the request comes from
* a Fragment or Activity that can host a Fragment.
*/
@Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason for marking this internal class @Deprecated? Just for our own knowledge?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, that was just for me to mark stuff that used the basic Activity. Gonna need to refactor a bit.

@SUPERCILEX
Copy link
Contributor Author

@samtstern SGTM, that's what I was thinking too. As for support lib stability, it's an RC and they said APIs aren't going to change so I don't think we have too much to worry about there. (Though I don't mind waiting a bit longer. 😄)

Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
@SUPERCILEX SUPERCILEX changed the title [WIP] Remove all APIs that use framework fragments Remove all APIs that use framework fragments Aug 10, 2018
@SUPERCILEX
Copy link
Contributor Author

Alrighty, this PR is ready to rock whenever you are! 😁

@samtstern
Copy link
Contributor

Nice! I'll give it the respect it deserves on Monday. Also I am not worried about support lib stability, more worried about forcing our consumers to pull an rc dependency into their app. People tend not to like that.

So I think we might want to wait to release until then. That said, can still review and merge in the meantime.

@SUPERCILEX
Copy link
Contributor Author

Oh yeah, makes sense. 👍 The support lib team usually ships a final version pretty fast after an RC, so I doubt we'll be waiting too long. 😄

@samtstern samtstern added this to the 2.0.0 milestone Aug 14, 2018
Copy link
Contributor

@samtstern samtstern left a comment

Choose a reason for hiding this comment

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

This LGTM, I guess it should be 2.0.0?

@SUPERCILEX
Copy link
Contributor Author

Yup. We can also get rid of the few remaining deprecated methods.

@samtstern samtstern changed the base branch from master to version-2.0.0-dev August 14, 2018 18:16
@samtstern samtstern merged commit 295b553 into googlesamples:version-2.0.0-dev Aug 14, 2018
@SUPERCILEX SUPERCILEX deleted the kill-framework-fragments branch August 14, 2018 18:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants