Skip to content

Commit c1a4432

Browse files
committed
support android 7.0
1 parent 286e9da commit c1a4432

5 files changed

Lines changed: 14 additions & 12 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
/build
88
/captures
99
.externalNativeBuild
10+
/app/release/

app/build.gradle

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 24
5-
buildToolsVersion "24.0.2"
4+
compileSdkVersion 27
65
defaultConfig {
76
applicationId "com.lanyus.blocksecureflag"
87
minSdkVersion 15
9-
targetSdkVersion 24
10-
versionCode 4
11-
versionName "1.3"
8+
targetSdkVersion 27
9+
versionCode 5
10+
versionName "1.4"
1211
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1312
}
1413
buildTypes {
@@ -24,8 +23,8 @@ dependencies {
2423
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
2524
exclude group: 'com.android.support', module: 'support-annotations'
2625
})
27-
compile 'com.android.support:appcompat-v7:24.2.1'
28-
compile 'com.android.support:design:24.2.1'
26+
compile 'com.android.support:appcompat-v7:27.0.2'
27+
compile 'com.android.support:design:27.0.2'
2928
testCompile 'junit:junit:4.12'
3029
compile 'com.alibaba:fastjson:1.1.54.android'
3130
provided 'de.robv.android.xposed:api:82'

app/src/main/java/com/lanyus/blocksecureflag/MainActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.lanyus.blocksecureflag;
22

3+
import android.content.Context;
34
import android.content.SharedPreferences;
45
import android.os.Bundle;
56
import android.support.design.widget.FloatingActionButton;
@@ -32,7 +33,7 @@ protected void onCreate(Bundle savedInstanceState) {
3233
setContentView(R.layout.activity_main);
3334
Toolbar tb = (Toolbar) findViewById(R.id.toolbar);
3435
setSupportActionBar(tb);
35-
SharedPreferences sharedPreferences = getSharedPreferences("checkedApp", MODE_WORLD_READABLE + MODE_WORLD_WRITEABLE);
36+
SharedPreferences sharedPreferences = getSharedPreferences("checkedApp", Context.MODE_PRIVATE);
3637
checkedApps = JSON.parseArray(sharedPreferences.getString("checkedApps", JSON.toJSONString(checkedApps)), CheckedApp.class);
3738
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
3839
recyclerView.setLayoutManager(new LinearLayoutManager(this));
@@ -53,7 +54,7 @@ public void onClick(View v) {
5354
}
5455

5556
private boolean save() {
56-
SharedPreferences sharedPreferences = getSharedPreferences("checkedApp", MODE_WORLD_READABLE + MODE_WORLD_WRITEABLE);
57+
SharedPreferences sharedPreferences = getSharedPreferences("checkedApp", Context.MODE_PRIVATE);
5758
SharedPreferences.Editor editor = sharedPreferences.edit();
5859
editor.putString("checkedApps", JSON.toJSONString(checkedApps));
5960
return editor.commit();

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.0'
8+
classpath 'com.android.tools.build:gradle:3.0.1'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
@@ -16,6 +16,7 @@ allprojects {
1616
repositories {
1717
maven{ url 'http://mvnrepo.tae.taobao.com/content/groups/public/'}
1818
jcenter()
19+
google()
1920
}
2021
}
2122

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Dec 28 10:00:20 PST 2015
1+
#Fri Jan 19 10:58:43 CST 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

0 commit comments

Comments
 (0)