修改 定时任务为24小时制显示
修复 app.getUriForFile报错的问题 修复 Media.isMusicPlaying()不存在的问题
This commit is contained in:
@@ -74,7 +74,7 @@ public abstract class Task {
|
|||||||
if (mTimedTask != null) {
|
if (mTimedTask != null) {
|
||||||
long nextTime = mTimedTask.getNextTime();
|
long nextTime = mTimedTask.getNextTime();
|
||||||
return GlobalAppContext.getString(R.string.text_next_run_time) + ": " +
|
return GlobalAppContext.getString(R.string.text_next_run_time) + ": " +
|
||||||
DateTimeFormat.shortDateTime().print(nextTime);
|
DateTimeFormat.forPattern("yyyy/MM/dd HH:mm").print(nextTime);
|
||||||
} else {
|
} else {
|
||||||
assert mIntentTask != null;
|
assert mIntentTask != null;
|
||||||
Integer desc = ACTION_DESC_MAP.get(mIntentTask.getAction());
|
Integer desc = ACTION_DESC_MAP.get(mIntentTask.getAction());
|
||||||
|
|||||||
@@ -11,8 +11,11 @@ import android.os.Build;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
|
import androidx.core.content.FileProvider;
|
||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
@@ -192,6 +195,8 @@ public class TimedTaskSettingActivity extends BaseActivity {
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
mToolbar.setSubtitle(mScriptFile.getName());
|
mToolbar.setSubtitle(mScriptFile.getName());
|
||||||
}
|
}
|
||||||
|
mDailyTaskTimePicker.setIs24HourView(true);
|
||||||
|
mWeeklyTaskTimePicker.setIs24HourView(true);
|
||||||
findDayOfWeekCheckBoxes(mWeeklyTaskContainer);
|
findDayOfWeekCheckBoxes(mWeeklyTaskContainer);
|
||||||
setUpTaskSettings();
|
setUpTaskSettings();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ module.exports = function (runtime, global) {
|
|||||||
if (app.fileProviderAuthority == null) {
|
if (app.fileProviderAuthority == null) {
|
||||||
return android.net.Uri.fromFile(file);
|
return android.net.Uri.fromFile(file);
|
||||||
}
|
}
|
||||||
return android.support.v4.content.FileProvider.getUriForFile(context,
|
return androidx.core.content.FileProvider.getUriForFile(context,
|
||||||
app.fileProviderAuthority, file);
|
app.fileProviderAuthority, file);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ module.exports = function (runtime, global) {
|
|||||||
return "'" + str.replace("'", "\\'") + "'";
|
return "'" + str.replace("'", "\\'") + "'";
|
||||||
}
|
}
|
||||||
function isInt(value) {
|
function isInt(value) {
|
||||||
return Bumber.isInteger(value) && value <= java.lang.Integer.MAX_VALUE && value >= java.lang.Integer.MIN_VALUE;
|
return Number.isInteger(value) && value <= java.lang.Integer.MAX_VALUE && value >= java.lang.Integer.MIN_VALUE;
|
||||||
}
|
}
|
||||||
function typeChar(value){
|
function typeChar(value){
|
||||||
if(typeof(value) == 'boolean'){
|
if(typeof(value) == 'boolean'){
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class Media implements MediaScannerConnection.MediaScannerConnectionClien
|
|||||||
mMediaPlayer.seekTo(m);
|
mMediaPlayer.seekTo(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMuiscPlaying() {
|
public boolean isMusicPlaying() {
|
||||||
return mMediaPlayer != null && mMediaPlayer.isPlaying();
|
return mMediaPlayer != null && mMediaPlayer.isPlaying();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user