@@ -9,7 +9,7 @@ android {
|
||||
applicationId "com.stardust.scriptdroid"
|
||||
minSdkVersion 17
|
||||
targetSdkVersion 23
|
||||
versionCode 146
|
||||
versionCode 147
|
||||
versionName "2.0.14 Beta"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
multiDexEnabled true
|
||||
|
||||
@@ -14,7 +14,6 @@ import java.util.concurrent.TimeUnit;
|
||||
* Created by Stardust on 2017/1/31.
|
||||
*/
|
||||
public class Pref {
|
||||
private static final boolean enableRemoveAdOption = true;
|
||||
|
||||
private static final SharedPreferences DISPOSABLE_BOOLEAN = App.getApp().getSharedPreferences("DISPOSABLE_BOOLEAN", Context.MODE_PRIVATE);
|
||||
private static final String KEY_SERVER_ADDRESS = "Still love you...17.5.14";
|
||||
@@ -144,16 +143,6 @@ public class Pref {
|
||||
}
|
||||
def().edit().putLong(KEY_LAST_SHOW_AD_MILLIS, System.currentTimeMillis()).apply();
|
||||
return true;
|
||||
case "Off":
|
||||
if (enableRemoveAdOption) {
|
||||
return false;
|
||||
}
|
||||
lastShowMillis = def().getLong(KEY_LAST_SHOW_AD_MILLIS, 0);
|
||||
if (System.currentTimeMillis() - lastShowMillis < TimeUnit.DAYS.toMillis(2)) {
|
||||
return false;
|
||||
}
|
||||
def().edit().putLong(KEY_LAST_SHOW_AD_MILLIS, System.currentTimeMillis()).apply();
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
protected static final int PERMISSION_REQUEST_CODE = 11186;
|
||||
private static boolean isRequestingPermissions = false;
|
||||
private BackPressedHandler.Observer mBackPressObserver = new BackPressedHandler.Observer();
|
||||
|
||||
@Override
|
||||
@@ -66,12 +65,8 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
|
||||
protected void checkPermission(String... permissions) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (isRequestingPermissions) {
|
||||
return;
|
||||
}
|
||||
String[] requestPermissions = getRequestPermissions(permissions);
|
||||
if (requestPermissions.length > 0) {
|
||||
isRequestingPermissions = true;
|
||||
requestPermissions(requestPermissions, PERMISSION_REQUEST_CODE);
|
||||
}
|
||||
} else {
|
||||
@@ -127,6 +122,5 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
isRequestingPermissions = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ public class MainActivity extends BaseActivity implements OnActivityResultDelega
|
||||
}
|
||||
|
||||
private void checkPermissions() {
|
||||
checkPermission(Manifest.permission.READ_EXTERNAL_STORAGE);
|
||||
checkPermission(Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_EXTERNAL_STORAGE);
|
||||
showAccessibilitySettingPromptIfDisabled();
|
||||
}
|
||||
|
||||
|
||||
@@ -59,9 +59,7 @@ public class SplashActivity extends BaseActivity {
|
||||
boolean forceShowAd = getIntent().getBooleanExtra(FORCE_SHOW_AD, false);
|
||||
if (!forceShowAd && !Pref.shouldShowAd()) {
|
||||
enterNextActivity();
|
||||
return;
|
||||
}
|
||||
checkPermission(Manifest.permission.READ_PHONE_STATE, Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
||||
}
|
||||
|
||||
@AfterViews
|
||||
|
||||
@@ -225,13 +225,11 @@
|
||||
<string-array name="ad_showing_mode_keys">
|
||||
<item>默认</item>
|
||||
<item>每天显示一次</item>
|
||||
<item>关闭广告</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="ad_showing_mode_values">
|
||||
<item>Default</item>
|
||||
<item>OncePerDay</item>
|
||||
<item>Off</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"versionCode": 145,
|
||||
"versionName": "2.0.13 Beta3",
|
||||
"releaseNotes": "* 新增 脚本循环运行选项,可设置循环间隔、次数、延迟等(长按脚本)\n* 新增 兼容安卓4.2 (可能会崩溃\n* 新增 跳转悬浮窗权限适配\n* 新增 SublimeText插件支持保存脚本到手机\n* 增加 点赞群成员、名片顺序点赞、批量删除QQ好友脚本\n* 修复 一些bug",
|
||||
"versionCode": 147,
|
||||
"versionName": "2.0.14 Beta",
|
||||
"releaseNotes": "* 新增 自动添加群成员脚本\n* 优化 QQ名片点赞脚本(自动取消金豆)\n* 优化 空间点赞脚本\n* 新增 桌面小部件的支持\n* 修复 低分辨率下悬浮窗显示不全的问题\n* 修复 其他一些问题",
|
||||
"downloads" : [
|
||||
{
|
||||
"name": "酷安",
|
||||
|
||||
Reference in New Issue
Block a user