修复部分警告信息
This commit is contained in:
parent
0b0f21da2f
commit
f0c5050896
@ -73,7 +73,6 @@ public final class MainActivity extends Activity {
|
||||
private EditText feishuSecretEdit;
|
||||
private EditText pollingIntervalEdit;
|
||||
private AlertDialog debugInfoDialog;
|
||||
private View debugInfoView;
|
||||
private long lastInboxSmsId = -1L;
|
||||
private String googlePlayTextValue = "";
|
||||
private String keepAliveTextValue = "";
|
||||
@ -189,7 +188,7 @@ public final class MainActivity extends Activity {
|
||||
|
||||
private void showDebugInfoDialog() {
|
||||
if (debugInfoDialog == null) {
|
||||
debugInfoView = LayoutInflater.from(this).inflate(R.layout.dialog_debug_info, null);
|
||||
View debugInfoView = LayoutInflater.from(this).inflate(R.layout.dialog_debug_info, null);
|
||||
googlePlayText = debugInfoView.findViewById(R.id.google_play_text);
|
||||
keepAliveText = debugInfoView.findViewById(R.id.keep_alive_text);
|
||||
databaseHeartbeatText = debugInfoView.findViewById(R.id.database_heartbeat_text);
|
||||
@ -503,13 +502,11 @@ public final class MainActivity extends Activity {
|
||||
}
|
||||
|
||||
private String buildLatestSmsTestMarkdown(SmsInboxReader.InboxResult inboxResult) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("**SmsReceive 最近短信测试推送**").append('\n');
|
||||
builder.append("时间:").append(formatTime(inboxResult.dateMillis)).append('\n');
|
||||
builder.append("发送方:").append(maskSender(inboxResult.sender)).append('\n');
|
||||
builder.append("短信ID:").append(inboxResult.id).append('\n');
|
||||
builder.append("正文:").append(emptyAsDash(inboxResult.body));
|
||||
return builder.toString();
|
||||
return "**SmsReceive 最近短信测试推送**" + '\n' +
|
||||
"时间:" + formatTime(inboxResult.dateMillis) + '\n' +
|
||||
"发送方:" + maskSender(inboxResult.sender) + '\n' +
|
||||
"短信ID:" + inboxResult.id + '\n' +
|
||||
"正文:" + emptyAsDash(inboxResult.body);
|
||||
}
|
||||
|
||||
private boolean hasReceiveSmsPermission() {
|
||||
@ -693,9 +690,6 @@ public final class MainActivity extends Activity {
|
||||
}
|
||||
|
||||
private boolean isIgnoringBatteryOptimizations() {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||
return true;
|
||||
}
|
||||
PowerManager powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
|
||||
return powerManager != null && powerManager.isIgnoringBatteryOptimizations(getPackageName());
|
||||
}
|
||||
|
||||
@ -18,12 +18,12 @@ allprojects {
|
||||
}
|
||||
|
||||
ext {
|
||||
minSdkVersion = 21
|
||||
minSdkVersion = 23
|
||||
compileSdkVersion = 30
|
||||
targetSdkVersion = 30
|
||||
buildToolsVersion = '30.0.3'
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
tasks.register('clean', Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user