Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Commit

Permalink
Merge branch 'feature/api_14' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
TakWolf committed Jun 5, 2017
2 parents 8f201c2 + a3a658e commit cb8fed2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Build Status](https://travis-ci.org/TakWolf/CNode-Material-Design.svg?branch=master)](https://travis-ci.org/TakWolf/CNode-Material-Design)
[![Release](https://img.shields.io/github/release/TakWolf/CNode-Material-Design.svg?style=flat)](https://github.com/TakWolf/CNode-Material-Design/releases/latest)
[![Platform](https://img.shields.io/badge/platform-Android-green.svg?style=flat)](https://www.android.com)
[![API](https://img.shields.io/badge/API-9%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=9)
[![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=14)
[![License](https://img.shields.io/github/license/TakWolf/CNode-Material-Design.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)

![Logo](app/src/main/res/mipmap-xxxhdpi/ic_launcher.png)
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {

defaultConfig {
applicationId 'org.cnodejs.android.md'
minSdkVersion 9
minSdkVersion 14
targetSdkVersion 25
versionCode Integer.parseInt(new Date().format('yyyyMMdd'))
versionName '1.3.1-beta.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,8 @@ public static void setEnableTopicRenderCompat(@NonNull Context context, boolean
SharedWrapper.with(context, TAG).setBoolean(KEY_ENABLE_TOPIC_RENDER_COMPAT, enable);
}

/**
* 检测是否真正启用兼容模式
*/
public static boolean isReallyEnableTopicRenderCompat(@NonNull Context context) {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && isEnableTopicRenderCompat(context);
}

public static boolean isShowTopicRenderCompatTip(@NonNull Context context) {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && SharedWrapper.with(context, TAG).getBoolean(KEY_SHOW_TOPIC_RENDER_COMPAT_TIP, true);
return SharedWrapper.with(context, TAG).getBoolean(KEY_SHOW_TOPIC_RENDER_COMPAT_TIP, true);
}

public static void markShowTopicRenderCompatTip(@NonNull Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private TopicWithAutoCompat() {}
public static final String EXTRA_TOPIC = "topic";

private static Class<?> getTargetClass(@NonNull Context context) {
return SettingShared.isReallyEnableTopicRenderCompat(context) ? TopicCompatActivity.class : TopicActivity.class;
return SettingShared.isEnableTopicRenderCompat(context) ? TopicCompatActivity.class : TopicActivity.class;
}

public static void start(@NonNull Activity activity, @NonNull Topic topic) {
Expand Down Expand Up @@ -114,7 +114,7 @@ public static final class NotificationWithAutoCompat {
private NotificationWithAutoCompat() {}

private static Class<?> getTargetClass(@NonNull Context context) {
return SettingShared.isReallyEnableTopicRenderCompat(context) ? NotificationCompatActivity.class : NotificationActivity.class;
return SettingShared.isEnableTopicRenderCompat(context) ? NotificationCompatActivity.class : NotificationActivity.class;
}

public static void start(@NonNull Activity activity) {
Expand Down

0 comments on commit cb8fed2

Please sign in to comment.