Skip to content

Commit

Permalink
Update InitProvider.java
Browse files Browse the repository at this point in the history
  • Loading branch information
JessYanCoding authored Aug 9, 2019
1 parent c539251 commit 5d3d71f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autosize/src/main/java/me/jessyan/autosize/InitProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@
public class InitProvider extends ContentProvider {
@Override
public boolean onCreate() {
Context application = getContext().getApplicationContext();
if (application == null) {
application = AutoSizeUtils.getApplicationByReflect();
}
AutoSizeConfig.getInstance()
.setLog(true)
.init((Application) getContext().getApplicationContext())
.init((Application) application)
.setUseDeviceSize(false);
return true;
}
Expand Down

0 comments on commit 5d3d71f

Please sign in to comment.