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

Add Glide.setModulesEnabled API for 3.x to allow apps to disable Manifest parsing #1754

Merged
merged 2 commits into from
Feb 25, 2017

Conversation

joshzana
Copy link

Description

Adding a static flag to Glide to disable parsing the manifest to find configured modules.
Added unit tests.
Same as #1753 but backported to 3.0 branch
Fixes #684

Motivation and Context

he Dropbox app has been crashing on launch approximately 9000 times a day due to RuntimeExceptions thrown by PackageManager. We'd like to remove the dependency on PackageManager from our startup path, and we don't use any GlideModules. While #1742 in 4.0 will address this long term, we'd like a short term way to run Glide without runtime manifest parsing.

In order to enable unit testing, I decided to make this a set method that takes a boolean.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 83.339% when pulling 1524360 on joshzana:setModulesEnabled_v3 into 6d44b18 on bumptech:3.0.

@@ -137,6 +139,21 @@ public static File getPhotoCacheDir(Context context, String cacheName) {
}

/**
* Enable or disable the parsing of AndroidManifest.xml
* looking for {@link GlideModule} implementations.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line break is a little early here.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 83.339% when pulling 819d07c on joshzana:setModulesEnabled_v3 into 6d44b18 on bumptech:3.0.

@sjudd sjudd merged commit e0e0074 into bumptech:3.0 Feb 25, 2017
@sjudd
Copy link
Collaborator

sjudd commented Feb 25, 2017

Thanks!

@joshzana
Copy link
Author

Is there a snapshot build in maven anywhere that has this fix? as far as I can tell, https://oss.sonatype.org/content/repositories/snapshots/com/github/bumptech/glide/glide/3.8.0-SNAPSHOT/ is pretty out of date.

If not, I can always build myself.

@sjudd
Copy link
Collaborator

sjudd commented Feb 27, 2017

Not totally sure how this works, but it appears that there are snapshots built from 2/25 in that same folder: https://oss.sonatype.org/content/repositories/snapshots/com/github/bumptech/glide/glide/3.8.0-SNAPSHOT/glide-3.8.0-20170225.215140-15.jar

It looks like it also keeps around a few older versions?

@joshzana joshzana deleted the setModulesEnabled_v3 branch March 1, 2017 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants