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

Support Android Nougat #5 #6

Merged
merged 4 commits into from
Jun 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .idea/codeStyleSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0-alpha3'
classpath 'com.android.tools.build:gradle:2.1.2'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ public final class FontManager {
private static final FontManagerImpl IMPL;

static {
// TODO: SDK_INT == VERSION_CODES.N
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M && Build.VERSION.PREVIEW_SDK_INT > 0) {
if (Build.VERSION.SDK_INT >= 24) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should use Build.VERSION_CODES.N, by updating compileSdkVersion to 24+

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, IIRC, there were differences even within the Nougat preview releases. It's been a while, but I thought I had to make changes as newer releases were coming out.

Granted, those were previews, and ideally should not be shipped on production devices, so arguably not worth digging too far into.

Copy link
Contributor

@troyjperales troyjperales Jan 20, 2017

Choose a reason for hiding this comment

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

I agree with using version codes provided by framework and not worrying about preview releases. I already pulled in the source and did a fix for this to support a project I was on last year. I'm supposed to jump back on that project some time next week and can update this. But hopefully @iainalba can get around to it before that.

Thanks for getting back to us @jhansche !

Choose a reason for hiding this comment

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

Looking forward a solution here :)

if (BuildConfig.DEBUG) Log.v(TAG, "Creating FontManager-24");
// This is Android N Preview
IMPL = new FontManagerImpl24();
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (BuildConfig.DEBUG) Log.v(TAG, "Creating FontManager-21");
Expand Down