added option to use compatibility mode for auto refresh
This commit is contained in:
parent
7cdbc88ebf
commit
9dd118ae8a
|
@ -186,6 +186,7 @@ public interface IntentConstants {
|
|||
String EXTRA_RECREATE_ACTIVITY = "recreate_activity";
|
||||
String EXTRA_SHOULD_RECREATE = "should_recreate";
|
||||
String EXTRA_SHOULD_RESTART = "should_restart";
|
||||
String EXTRA_SHOULD_TERMINATE = "should_terminate";
|
||||
String EXTRA_FROM_USER = "from_user";
|
||||
String EXTRA_SHOW_MEDIA_PREVIEW = "show_media_preview";
|
||||
String EXTRA_SHOW_EXTRA_TYPE = "show_extra_type";
|
||||
|
|
|
@ -511,11 +511,12 @@
|
|||
|
||||
<service
|
||||
android:name=".service.LegacyTaskService"
|
||||
android:enabled="@bool/use_legacy_refresh_service"
|
||||
android:enabled="true"
|
||||
android:exported="false"
|
||||
android:label="@string/label_refresh_and_sync_service"/>
|
||||
<service
|
||||
android:name=".service.JobTaskService"
|
||||
android:enabled="@bool/use_job_refresh_service"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:label="@string/label_refresh_and_sync_service"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"/>
|
||||
|
|
|
@ -28,7 +28,6 @@ import android.support.annotation.NonNull;
|
|||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.internal.widget.PreferenceImageView;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.support.v7.preference.PreferenceCategory;
|
||||
import android.support.v7.preference.PreferenceManager;
|
||||
import android.support.v7.preference.PreferenceViewHolder;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
|
@ -46,22 +45,14 @@ import org.mariotaku.twidere.util.dagger.GeneralComponentHelper;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public abstract class AccountsListPreference extends PreferenceCategory implements Constants {
|
||||
public abstract class AccountsListPreference extends TintedPreferenceCategory implements Constants {
|
||||
|
||||
@Nullable
|
||||
private final String mSwitchKey;
|
||||
private final boolean mSwitchDefault;
|
||||
|
||||
public AccountsListPreference(final Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public AccountsListPreference(final Context context, final AttributeSet attrs) {
|
||||
this(context, attrs, R.attr.preferenceCategoryStyle);
|
||||
}
|
||||
|
||||
public AccountsListPreference(final Context context, final AttributeSet attrs, final int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
super(context, attrs);
|
||||
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AccountsListPreference);
|
||||
mSwitchKey = a.getString(R.styleable.AccountsListPreference_switchKey);
|
||||
mSwitchDefault = a.getBoolean(R.styleable.AccountsListPreference_switchDefault, false);
|
||||
|
|
|
@ -28,18 +28,10 @@ import org.mariotaku.twidere.model.AccountDetails;
|
|||
|
||||
public class AutoRefreshAccountsListPreference extends AccountsListPreference {
|
||||
|
||||
public AutoRefreshAccountsListPreference(final Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public AutoRefreshAccountsListPreference(final Context context, final AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public AutoRefreshAccountsListPreference(final Context context, final AttributeSet attrs, final int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setupPreference(final AccountItemPreference preference, final AccountDetails account) {
|
||||
preference.setFragment(AccountRefreshSettingsFragment.class.getName());
|
||||
|
|
|
@ -28,18 +28,10 @@ import org.mariotaku.twidere.model.AccountDetails;
|
|||
|
||||
public class NotificationAccountsListPreference extends AccountsListPreference {
|
||||
|
||||
public NotificationAccountsListPreference(final Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public NotificationAccountsListPreference(final Context context, final AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public NotificationAccountsListPreference(final Context context, final AttributeSet attrs, final int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setupPreference(final AccountItemPreference preference, final AccountDetails account) {
|
||||
preference.setFragment(AccountNotificationSettingsFragment.class.getName());
|
||||
|
|
|
@ -40,6 +40,8 @@ import android.view.ViewGroup
|
|||
import android.widget.*
|
||||
import android.widget.AdapterView.OnItemClickListener
|
||||
import kotlinx.android.synthetic.main.activity_settings.*
|
||||
import org.mariotaku.ktextension.Bundle
|
||||
import org.mariotaku.ktextension.set
|
||||
import org.mariotaku.twidere.R
|
||||
import org.mariotaku.twidere.constant.IntentConstants.*
|
||||
import org.mariotaku.twidere.constant.KeyboardShortcutConstants.ACTION_NAVIGATION_BACK
|
||||
|
@ -55,16 +57,23 @@ class SettingsActivity : BaseActivity(), OnItemClickListener, OnPreferenceStartF
|
|||
|
||||
var shouldRecreate: Boolean = false
|
||||
var shouldRestart: Boolean = false
|
||||
var shouldTerminate: Boolean = false
|
||||
private lateinit var entriesAdapter: EntriesAdapter
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_settings)
|
||||
entriesAdapter = EntriesAdapter(this)
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
shouldRecreate = savedInstanceState.getBoolean(EXTRA_SHOULD_RECREATE, shouldRecreate)
|
||||
shouldRestart = savedInstanceState.getBoolean(EXTRA_SHOULD_RESTART, shouldRestart)
|
||||
shouldTerminate = savedInstanceState.getBoolean(EXTRA_SHOULD_TERMINATE, shouldTerminate)
|
||||
} else if (intent.getBooleanExtra(EXTRA_SHOULD_TERMINATE, false)) {
|
||||
finishNoRestart()
|
||||
System.exit(0)
|
||||
return
|
||||
}
|
||||
|
||||
val backgroundAlpha = currentThemeBackgroundAlpha
|
||||
|
@ -74,7 +83,7 @@ class SettingsActivity : BaseActivity(), OnItemClickListener, OnPreferenceStartF
|
|||
slidingPane.setShadowResourceLeft(R.drawable.sliding_pane_shadow_left)
|
||||
slidingPane.setShadowResourceRight(R.drawable.sliding_pane_shadow_right)
|
||||
slidingPane.sliderFadeColor = 0
|
||||
entriesAdapter = EntriesAdapter(this)
|
||||
|
||||
initEntries()
|
||||
entriesList.adapter = entriesAdapter
|
||||
entriesList.choiceMode = AbsListView.CHOICE_MODE_SINGLE
|
||||
|
@ -110,6 +119,7 @@ class SettingsActivity : BaseActivity(), OnItemClickListener, OnPreferenceStartF
|
|||
if (resultCode == RESULT_SETTINGS_CHANGED && data != null) {
|
||||
shouldRecreate = data.getBooleanExtra(EXTRA_SHOULD_RECREATE, false)
|
||||
shouldRestart = data.getBooleanExtra(EXTRA_SHOULD_RESTART, false)
|
||||
shouldTerminate = data.getBooleanExtra(EXTRA_SHOULD_TERMINATE, false)
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
}
|
||||
|
@ -243,12 +253,13 @@ class SettingsActivity : BaseActivity(), OnItemClickListener, OnPreferenceStartF
|
|||
}
|
||||
|
||||
private fun notifyUnsavedChange(): Boolean {
|
||||
if (isTopSettings && (shouldRecreate || shouldRestart)) {
|
||||
if (isTopSettings && (shouldRecreate || shouldRestart || shouldTerminate)) {
|
||||
val df = RestartConfirmDialogFragment()
|
||||
val args = Bundle()
|
||||
args.putBoolean(EXTRA_SHOULD_RECREATE, shouldRecreate)
|
||||
args.putBoolean(EXTRA_SHOULD_RESTART, shouldRestart)
|
||||
df.arguments = args
|
||||
df.arguments = Bundle {
|
||||
this[EXTRA_SHOULD_RECREATE] = shouldRecreate
|
||||
this[EXTRA_SHOULD_RESTART] = shouldRestart
|
||||
this[EXTRA_SHOULD_TERMINATE] = shouldTerminate
|
||||
}
|
||||
df.show(supportFragmentManager, "restart_confirm")
|
||||
return true
|
||||
}
|
||||
|
@ -364,9 +375,14 @@ class SettingsActivity : BaseActivity(), OnItemClickListener, OnPreferenceStartF
|
|||
class RestartConfirmDialogFragment : BaseDialogFragment(), DialogInterface.OnClickListener {
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val builder = AlertDialog.Builder(activity)
|
||||
builder.setMessage(R.string.app_restart_confirm)
|
||||
if (arguments.getBoolean(EXTRA_SHOULD_TERMINATE)) {
|
||||
builder.setMessage(R.string.app_terminate_confirm)
|
||||
builder.setNegativeButton(R.string.action_dont_terminate, this)
|
||||
} else {
|
||||
builder.setMessage(R.string.app_restart_confirm)
|
||||
builder.setNegativeButton(R.string.action_dont_restart, this)
|
||||
}
|
||||
builder.setPositiveButton(android.R.string.ok, this)
|
||||
builder.setNegativeButton(R.string.dont_restart, this)
|
||||
val dialog = builder.create()
|
||||
dialog.setOnShowListener {
|
||||
it as AlertDialog
|
||||
|
@ -379,7 +395,14 @@ class SettingsActivity : BaseActivity(), OnItemClickListener, OnPreferenceStartF
|
|||
val activity = activity as SettingsActivity
|
||||
when (which) {
|
||||
DialogInterface.BUTTON_POSITIVE -> {
|
||||
activity.finish()
|
||||
if (arguments.getBoolean(EXTRA_SHOULD_TERMINATE)) {
|
||||
val intent = Intent(context, SettingsActivity::class.java)
|
||||
intent.putExtra(EXTRA_SHOULD_TERMINATE, true)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
activity.startActivity(intent)
|
||||
} else {
|
||||
activity.finish()
|
||||
}
|
||||
}
|
||||
DialogInterface.BUTTON_NEGATIVE -> {
|
||||
activity.finishNoRestart()
|
||||
|
@ -403,6 +426,11 @@ class SettingsActivity : BaseActivity(), OnItemClickListener, OnPreferenceStartF
|
|||
if (activity !is SettingsActivity) return
|
||||
activity.shouldRestart = true
|
||||
}
|
||||
|
||||
fun setShouldTerminate(activity: Activity) {
|
||||
if (activity !is SettingsActivity) return
|
||||
activity.shouldTerminate = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import org.mariotaku.twidere.BuildConfig
|
|||
import org.mariotaku.twidere.Constants.*
|
||||
import org.mariotaku.twidere.TwidereConstants.KEY_MEDIA_PRELOAD
|
||||
import org.mariotaku.twidere.annotation.AccountType
|
||||
import org.mariotaku.twidere.annotation.PreviewStyle
|
||||
import org.mariotaku.twidere.constant.SharedPreferenceConstants.VALUE_MEDIA_PREVIEW_STYLE_REAL_SIZE
|
||||
import org.mariotaku.twidere.extension.getNonEmptyString
|
||||
import org.mariotaku.twidere.model.CustomAPIConfig
|
||||
|
@ -17,7 +18,6 @@ import org.mariotaku.twidere.model.account.cred.Credentials
|
|||
import org.mariotaku.twidere.model.sync.SyncProviderInfo
|
||||
import org.mariotaku.twidere.preference.ThemeBackgroundPreference
|
||||
import org.mariotaku.twidere.util.sync.SyncProviderInfoFactory
|
||||
import org.mariotaku.twidere.annotation.PreviewStyle
|
||||
import org.mariotaku.twidere.view.ProfileImageView
|
||||
|
||||
/**
|
||||
|
@ -63,6 +63,7 @@ val lightFontKey = KBooleanKey("light_font", false)
|
|||
val extraFeaturesNoticeVersionKey = KIntKey("extra_features_notice_version", 0)
|
||||
val mediaPreloadKey = KBooleanKey(KEY_MEDIA_PRELOAD, false)
|
||||
val mediaPreloadOnWifiOnlyKey = KBooleanKey(KEY_PRELOAD_WIFI_ONLY, true)
|
||||
val autoRefreshCompatibilityModeKey = KBooleanKey("auto_refresh_compatibility_mode", Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
|
||||
|
||||
object themeBackgroundAlphaKey : KSimpleKey<Int>(KEY_THEME_BACKGROUND_ALPHA, 0xFF) {
|
||||
override fun read(preferences: SharedPreferences): Int {
|
||||
|
|
|
@ -25,6 +25,7 @@ import android.os.Bundle
|
|||
import android.support.v7.preference.PreferenceScreen
|
||||
import org.mariotaku.twidere.Constants.*
|
||||
import org.mariotaku.twidere.activity.SettingsActivity
|
||||
import org.mariotaku.twidere.constant.IntentConstants.EXTRA_SHOULD_TERMINATE
|
||||
import org.mariotaku.twidere.util.Utils
|
||||
|
||||
class SettingsDetailsFragment : BasePreferenceFragment(), OnSharedPreferenceChangeListener {
|
||||
|
@ -74,6 +75,8 @@ class SettingsDetailsFragment : BasePreferenceFragment(), OnSharedPreferenceChan
|
|||
SettingsActivity.setShouldRestart(activity)
|
||||
} else if (extras.containsKey(EXTRA_SHOULD_RECREATE)) {
|
||||
SettingsActivity.setShouldRecreate(activity)
|
||||
}else if (extras.containsKey(EXTRA_SHOULD_TERMINATE)) {
|
||||
SettingsActivity.setShouldTerminate(activity)
|
||||
}
|
||||
if (extras.containsKey(EXTRA_RECREATE_ACTIVITY)) {
|
||||
activity.recreate()
|
||||
|
|
|
@ -22,7 +22,6 @@ package org.mariotaku.twidere.loader
|
|||
import android.content.Context
|
||||
import android.database.sqlite.SQLiteDatabase
|
||||
import android.support.annotation.WorkerThread
|
||||
import android.text.TextUtils
|
||||
import org.mariotaku.commons.parcel.ParcelUtils
|
||||
import org.mariotaku.microblog.library.MicroBlog
|
||||
import org.mariotaku.microblog.library.MicroBlogException
|
||||
|
@ -117,11 +116,7 @@ class ConversationLoader(
|
|||
}
|
||||
query.sinceId(sinceId ?: status.id)
|
||||
try {
|
||||
for (item in twitter.search(query)) {
|
||||
if (TextUtils.equals(item.inReplyToStatusId, status.id)) {
|
||||
statuses.add(item)
|
||||
}
|
||||
}
|
||||
twitter.search(query).filterTo(statuses) { it.inReplyToStatusId == status.id }
|
||||
} catch (e: MicroBlogException) {
|
||||
// Ignore for now
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.mariotaku.twidere.preference
|
|||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.support.v7.preference.Preference
|
||||
import android.support.v7.preference.PreferenceCategory
|
||||
import android.support.v7.preference.PreferenceManager
|
||||
import android.util.AttributeSet
|
||||
import org.mariotaku.twidere.constant.IntentConstants.INTENT_ACTION_HIDDEN_SETTINGS_ENTRY
|
||||
|
@ -11,11 +10,10 @@ import org.mariotaku.twidere.constant.IntentConstants.INTENT_ACTION_HIDDEN_SETTI
|
|||
/**
|
||||
* Created by mariotaku on 2016/12/12.
|
||||
*/
|
||||
class HiddenSettingEntryPreference @JvmOverloads constructor(
|
||||
class HiddenSettingEntryPreference(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = android.support.v7.preference.R.attr.preferenceCategoryStyle
|
||||
) : PreferenceCategory(context, attrs, defStyleAttr) {
|
||||
attrs: AttributeSet? = null
|
||||
) : TintedPreferenceCategory(context, attrs) {
|
||||
|
||||
override fun onAttachedToHierarchy(preferenceManager: PreferenceManager?, id: Long) {
|
||||
super.onAttachedToHierarchy(preferenceManager, id)
|
||||
|
|
|
@ -12,7 +12,7 @@ import org.mariotaku.chameleon.ChameleonUtils
|
|||
* Created by mariotaku on 2017/2/5.
|
||||
*/
|
||||
|
||||
class TintedPreferenceCategory(context: Context, attrs: AttributeSet? = null) : PreferenceCategory(context, attrs) {
|
||||
open class TintedPreferenceCategory(context: Context, attrs: AttributeSet? = null) : PreferenceCategory(context, attrs) {
|
||||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||
super.onBindViewHolder(holder)
|
||||
val theme = Chameleon.getOverrideTheme(context, ChameleonUtils.getActivity(context))
|
||||
|
|
|
@ -24,7 +24,9 @@ import android.annotation.TargetApi
|
|||
import android.app.job.JobParameters
|
||||
import android.app.job.JobService
|
||||
import android.os.Build
|
||||
import org.mariotaku.kpreferences.KPreferences
|
||||
import org.mariotaku.twidere.annotation.AutoRefreshType
|
||||
import org.mariotaku.twidere.constant.autoRefreshCompatibilityModeKey
|
||||
import org.mariotaku.twidere.util.TaskServiceRunner
|
||||
import org.mariotaku.twidere.util.dagger.GeneralComponentHelper
|
||||
import org.mariotaku.twidere.util.support.JobServiceSupport
|
||||
|
@ -39,6 +41,8 @@ class JobTaskService : JobService() {
|
|||
|
||||
@Inject
|
||||
internal lateinit var taskServiceRunner: TaskServiceRunner
|
||||
@Inject
|
||||
internal lateinit var kPreferences: KPreferences
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
@ -46,6 +50,7 @@ class JobTaskService : JobService() {
|
|||
}
|
||||
|
||||
override fun onStartJob(params: JobParameters): Boolean {
|
||||
if (kPreferences[autoRefreshCompatibilityModeKey]) return false
|
||||
val action = getTaskAction(params.jobId) ?: return false
|
||||
return taskServiceRunner.runTask(action) {
|
||||
this.jobFinished(params, false)
|
||||
|
|
|
@ -21,8 +21,11 @@ package org.mariotaku.twidere.service
|
|||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.IBinder
|
||||
import org.mariotaku.kpreferences.KPreferences
|
||||
import org.mariotaku.twidere.annotation.AutoRefreshType
|
||||
import org.mariotaku.twidere.constant.autoRefreshCompatibilityModeKey
|
||||
import org.mariotaku.twidere.util.TaskServiceRunner
|
||||
import org.mariotaku.twidere.util.TaskServiceRunner.Companion.ACTION_REFRESH_DIRECT_MESSAGES
|
||||
import org.mariotaku.twidere.util.TaskServiceRunner.Companion.ACTION_REFRESH_HOME_TIMELINE
|
||||
|
@ -34,6 +37,8 @@ class LegacyTaskService : Service() {
|
|||
|
||||
@Inject
|
||||
internal lateinit var taskServiceRunner: TaskServiceRunner
|
||||
@Inject
|
||||
internal lateinit var kPreferences: KPreferences
|
||||
|
||||
override fun onBind(intent: Intent): IBinder? = null
|
||||
|
||||
|
@ -43,6 +48,8 @@ class LegacyTaskService : Service() {
|
|||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP &&
|
||||
!kPreferences[autoRefreshCompatibilityModeKey]) return START_NOT_STICKY
|
||||
val action = intent?.action ?: return START_NOT_STICKY
|
||||
taskServiceRunner.runTask(action) {
|
||||
stopSelfResult(startId)
|
||||
|
|
|
@ -12,7 +12,8 @@ import org.mariotaku.microblog.library.twitter.model.DirectMessage
|
|||
import org.mariotaku.microblog.library.twitter.model.ErrorInfo
|
||||
import org.mariotaku.microblog.library.twitter.model.Paging
|
||||
import org.mariotaku.microblog.library.twitter.model.ResponseList
|
||||
import org.mariotaku.twidere.TwidereConstants
|
||||
import org.mariotaku.twidere.TwidereConstants.LOGTAG
|
||||
import org.mariotaku.twidere.TwidereConstants.QUERY_PARAM_NOTIFY
|
||||
import org.mariotaku.twidere.constant.loadItemLimitKey
|
||||
import org.mariotaku.twidere.model.RefreshTaskParam
|
||||
import org.mariotaku.twidere.model.UserKey
|
||||
|
@ -88,7 +89,7 @@ abstract class GetDirectMessagesTask(
|
|||
} else if (e.isCausedByNetworkIssue) {
|
||||
errorInfoStore[ErrorInfoStore.KEY_DIRECT_MESSAGES, accountKey] = ErrorInfoStore.CODE_NETWORK_ERROR
|
||||
}
|
||||
DebugLog.w(TwidereConstants.LOGTAG, tr = e)
|
||||
DebugLog.w(LOGTAG, tr = e)
|
||||
result.add(TwitterWrapper.MessageListResponse(accountKey, e))
|
||||
}
|
||||
|
||||
|
@ -111,7 +112,7 @@ abstract class GetDirectMessagesTask(
|
|||
|
||||
|
||||
// Insert previously fetched items.
|
||||
val insertUri = UriUtils.appendQueryParameters(uri, TwidereConstants.QUERY_PARAM_NOTIFY, notify)
|
||||
val insertUri = UriUtils.appendQueryParameters(uri, QUERY_PARAM_NOTIFY, notify)
|
||||
ContentResolverUtils.bulkInsert(context.contentResolver, insertUri, valuesArray)
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ import org.mariotaku.twidere.BuildConfig
|
|||
import org.mariotaku.twidere.Constants
|
||||
import org.mariotaku.twidere.constant.SharedPreferenceConstants
|
||||
import org.mariotaku.twidere.constant.SharedPreferenceConstants.KEY_CACHE_SIZE_LIMIT
|
||||
import org.mariotaku.twidere.constant.autoRefreshCompatibilityModeKey
|
||||
import org.mariotaku.twidere.model.DefaultFeatures
|
||||
import org.mariotaku.twidere.util.*
|
||||
import org.mariotaku.twidere.util.imageloader.ReadOnlyDiskLRUNameCache
|
||||
|
@ -249,7 +250,7 @@ class ApplicationModule(private val application: Application) {
|
|||
@Provides
|
||||
@Singleton
|
||||
fun autoRefreshController(kPreferences: KPreferences): AutoRefreshController {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !kPreferences[autoRefreshCompatibilityModeKey]) {
|
||||
return JobSchedulerAutoRefreshController(application, kPreferences)
|
||||
}
|
||||
return LegacyAutoRefreshController(application, kPreferences)
|
||||
|
|
|
@ -19,12 +19,12 @@ abstract class AutoRefreshController(
|
|||
|
||||
abstract fun unschedule(@AutoRefreshType type: String)
|
||||
|
||||
fun reschedule(@AutoRefreshType type: String) {
|
||||
open fun reschedule(@AutoRefreshType type: String) {
|
||||
unschedule(type)
|
||||
schedule(type)
|
||||
}
|
||||
|
||||
fun rescheduleAll() {
|
||||
open fun rescheduleAll() {
|
||||
AutoRefreshType.ALL.forEach { reschedule(it) }
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
package org.mariotaku.twidere.util.refresh
|
||||
|
||||
import android.annotation.TargetApi
|
||||
import android.app.AlarmManager
|
||||
import android.app.PendingIntent
|
||||
import android.app.job.JobScheduler
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.SystemClock
|
||||
import android.support.v4.util.ArrayMap
|
||||
import org.mariotaku.kpreferences.KPreferences
|
||||
import org.mariotaku.twidere.annotation.AutoRefreshType
|
||||
import org.mariotaku.twidere.constant.refreshIntervalKey
|
||||
import org.mariotaku.twidere.service.JobTaskService.Companion.JOB_IDS_REFRESH
|
||||
import org.mariotaku.twidere.service.LegacyTaskService
|
||||
import org.mariotaku.twidere.util.TaskServiceRunner.Companion.ACTION_REFRESH_FILTERS_SUBSCRIPTIONS
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
@ -35,6 +39,13 @@ class LegacyAutoRefreshController(
|
|||
rescheduleFiltersSubscriptionsRefresh()
|
||||
}
|
||||
|
||||
override fun rescheduleAll() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
removeAllJobs(context)
|
||||
}
|
||||
super.rescheduleAll()
|
||||
}
|
||||
|
||||
override fun unschedule(type: String) {
|
||||
val pendingIntent = pendingIntents[type] ?: return
|
||||
alarmManager.cancel(pendingIntent)
|
||||
|
@ -58,4 +69,15 @@ class LegacyAutoRefreshController(
|
|||
PendingIntent.getService(context, 0, intent, 0))
|
||||
}
|
||||
|
||||
private companion object {
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
fun removeAllJobs(context: Context) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) return
|
||||
val jobService = context.getSystemService(Context.JOB_SCHEDULER_SERVICE) as JobScheduler
|
||||
JOB_IDS_REFRESH.forEach { id ->
|
||||
jobService.cancel(id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -272,7 +272,7 @@
|
|||
<string name="display_sensitive_contents_summary">Amuesa na llinia temporal conteníos sensibles ensin avisar</string>
|
||||
<string name="dns_server">Sirvidor DNS</string>
|
||||
<string name="dns_server_summary">Afita\'l sirvidor DNS pa solicitúes de rede.</string>
|
||||
<string name="dont_restart">Nun reaniciar</string>
|
||||
<string name="action_dont_restart">Nun reaniciar</string>
|
||||
<string name="draft_saved">Guardóse\'l borrador</string>
|
||||
<string name="drafts_hint_messages">Equí guardaránse los tos tuits ensin unviar</string>
|
||||
<string name="drawer_toggle">Alternancia de caxones</string>
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
<string name="display_sensitive_contents_summary">Mostra continguts sensibles a la cronologia sense previ avís</string>
|
||||
<string name="dns_server">Servidor DNS</string>
|
||||
<string name="dns_server_summary">Estableix el servidor DNS per a convertir les URL a adreces IP.</string>
|
||||
<string name="dont_restart">No reiniciïs</string>
|
||||
<string name="action_dont_restart">No reiniciïs</string>
|
||||
<string name="draft_saved">S\'ha desat l\'esborrany</string>
|
||||
<string name="drafts_hint_messages">Els esborranys de piulada es desaran aquí</string>
|
||||
<string name="drawer_toggle">Barra lateral</string>
|
||||
|
|
|
@ -276,7 +276,7 @@
|
|||
<string name="display_sensitive_contents_summary">Zeige heiklen Inhalt ohne Warnung in der Zeitleiste</string>
|
||||
<string name="dns_server">DNS-Server</string>
|
||||
<string name="dns_server_summary">DNS-Server für Netzwerkanfragen einstellen.</string>
|
||||
<string name="dont_restart">Nicht neustarten</string>
|
||||
<string name="action_dont_restart">Nicht neustarten</string>
|
||||
<string name="draft_saved">Entwurf gespeichert</string>
|
||||
<string name="drafts_hint_messages">Nicht gesendete Tweets werden hier gespeichert</string>
|
||||
<string name="drawer_toggle">Drawer-Schalter</string>
|
||||
|
|
|
@ -272,7 +272,7 @@
|
|||
<string name="display_sensitive_contents_summary">Mostrar contenidos sensibles en la cronología sin aviso</string>
|
||||
<string name="dns_server">Servidor DNS</string>
|
||||
<string name="dns_server_summary">Configure el servidor DNS para peticiones de red.</string>
|
||||
<string name="dont_restart">No reinicie</string>
|
||||
<string name="action_dont_restart">No reinicie</string>
|
||||
<string name="draft_saved">Borrador guardado</string>
|
||||
<string name="drafts_hint_messages">Tus tweets sin enviar se guardarán aquí</string>
|
||||
<string name="drawer_toggle">Barra lateral</string>
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
<string name="display_sensitive_contents_summary">نمایش بدون هشدار محتوای حسّاسیتبرانگیر در خط زمانی</string>
|
||||
<string name="dns_server">کارگزار DNS</string>
|
||||
<string name="dns_server_summary">تنظیم کارساز نام دامنه برای درخواستهای شبکه.</string>
|
||||
<string name="dont_restart">عدم شروع مجدّد</string>
|
||||
<string name="action_dont_restart">عدم شروع مجدّد</string>
|
||||
<string name="draft_saved">چرکنویس ذخیره شد</string>
|
||||
<string name="drafts_hint_messages">توییتهای فرستاده نشدهتان اینحا ذخیره میشوند</string>
|
||||
<string name="drawer_toggle">تغییر وضعیت کشو</string>
|
||||
|
|
|
@ -252,7 +252,7 @@
|
|||
<string name="display_sensitive_contents_summary">Näytä arkaluontoinen sisältö ilman aikajanan varoituksia</string>
|
||||
<string name="dns_server">DNS-palvelin</string>
|
||||
<string name="dns_server_summary">Aseta verkkopyynnöille DNS-palvelin.</string>
|
||||
<string name="dont_restart">Älä käynnistä uudelleen</string>
|
||||
<string name="action_dont_restart">Älä käynnistä uudelleen</string>
|
||||
<string name="draft_saved">Luonnos tallennettu</string>
|
||||
<string name="drafts_hint_messages">Twiittiluonnoksesi tallennetaan tänne</string>
|
||||
<string name="edit_api">Muokkaa API:a</string>
|
||||
|
|
|
@ -276,7 +276,7 @@
|
|||
<string name="display_sensitive_contents_summary">Afficher le contenu qui peut être sensible sans avertissement dans votre fil d\'actualité</string>
|
||||
<string name="dns_server">Serveur DNS</string>
|
||||
<string name="dns_server_summary">Définir le serveur DNS pour les résolutions.</string>
|
||||
<string name="dont_restart">Ne pas redémarrer</string>
|
||||
<string name="action_dont_restart">Ne pas redémarrer</string>
|
||||
<string name="draft_saved">Brouillon sauvegardé</string>
|
||||
<string name="drafts_hint_messages">Vos tweets non-envoyés sont sauvés ici</string>
|
||||
<string name="drawer_toggle">Afficher le bouton du menu latéral</string>
|
||||
|
|
|
@ -249,7 +249,7 @@
|
|||
<string name="display_sensitive_contents_summary">Amosa contidos sensibles na liña de tempo sen advertencia</string>
|
||||
<string name="dns_server">Servidor DNS</string>
|
||||
<string name="dns_server_summary">Introduce o Servidor DNS para peticións de rede.</string>
|
||||
<string name="dont_restart">Non reiniciar</string>
|
||||
<string name="action_dont_restart">Non reiniciar</string>
|
||||
<string name="draft_saved">Borrador gardado</string>
|
||||
<string name="drafts_hint_messages">Aquí gárdanse os teus chíos non enviados</string>
|
||||
<string name="drawer_toggle">Conmutar caixón</string>
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
<string name="display_sensitive_contents">Prikaži osvjetljive sadržaje</string>
|
||||
<string name="display_sensitive_contents_summary">Prikaži osjetljive sadržaje bez obavijesti u timelineu</string>
|
||||
<string name="dns_server">DNS Server</string>
|
||||
<string name="dont_restart">Nemoj ponovno pokrenuti</string>
|
||||
<string name="action_dont_restart">Nemoj ponovno pokrenuti</string>
|
||||
<string name="draft_saved">Skica spremljena</string>
|
||||
<string name="drafts_hint_messages">Vaši neposlani tweetevi bit će spremljeni ovdje</string>
|
||||
<string name="edit_api">Uredi API</string>
|
||||
|
|
|
@ -258,7 +258,7 @@
|
|||
<string name="display_sensitive_contents_summary">Érzékeny információk megjelenítése a kezdőlapon figyelmeztetés nélkül</string>
|
||||
<string name="dns_server">DNS kiszolgáló</string>
|
||||
<string name="dns_server_summary">DNS szerver kijelölése a hálózati lekérésekhez.</string>
|
||||
<string name="dont_restart">Ne induljon újra</string>
|
||||
<string name="action_dont_restart">Ne induljon újra</string>
|
||||
<string name="draft_saved">Piszkozat elmentve</string>
|
||||
<string name="drafts_hint_messages">Ide lesznek mentve az el nem küldött tweetjeid</string>
|
||||
<string name="edit_api">API szerkesztése</string>
|
||||
|
|
|
@ -268,7 +268,7 @@
|
|||
<string name="display_sensitive_contents_summary">Tampilkan konten yang sensitif di timeline tanpa pemberitahuan.</string>
|
||||
<string name="dns_server">Server DNS</string>
|
||||
<string name="dns_server_summary">Atur DNS Server untuk permintaan jaringan.</string>
|
||||
<string name="dont_restart">Jangan memulai ulang</string>
|
||||
<string name="action_dont_restart">Jangan memulai ulang</string>
|
||||
<string name="draft_saved">Draft tersimpan</string>
|
||||
<string name="drafts_hint_messages">Tweet Anda yang belum terkirim akan tersimpan disini</string>
|
||||
<string name="drawer_toggle">Tombol laci</string>
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
<string name="display_sensitive_contents_summary">Mostra contenuti sensibili senza preavviso in timeline</string>
|
||||
<string name="dns_server">DNS Server</string>
|
||||
<string name="dns_server_summary">Imposta il server DNS per le richieste di rete.</string>
|
||||
<string name="dont_restart">Non riavviare</string>
|
||||
<string name="action_dont_restart">Non riavviare</string>
|
||||
<string name="draft_saved">Progetto salvato</string>
|
||||
<string name="drafts_hint_messages">I tuoi tweet non inviati saranno salvati qui</string>
|
||||
<string name="edit_api">Edit API</string>
|
||||
|
|
|
@ -276,7 +276,7 @@
|
|||
<string name="display_sensitive_contents_summary">プロンプトを表示せずに不適切な可能性のある内容を表示します。</string>
|
||||
<string name="dns_server">DNS サーバー</string>
|
||||
<string name="dns_server_summary">ネットワーク要件に使用されるDNSサーバーを設定します。</string>
|
||||
<string name="dont_restart">再起動しない</string>
|
||||
<string name="action_dont_restart">再起動しない</string>
|
||||
<string name="draft_saved">下書きを保存</string>
|
||||
<string name="drafts_hint_messages">未送信のツイートが保存されます</string>
|
||||
<string name="drawer_toggle">ドロワーの切り替え</string>
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
<string name="display_sensitive_contents_summary">타임라인에서 경고 없이 민감한 콘텐츠 표시</string>
|
||||
<string name="dns_server">DNS 서버</string>
|
||||
<string name="dns_server_summary">네트워크 요청을 위해 DNS 서버를 설정.</string>
|
||||
<string name="dont_restart">재시작하지 않기</string>
|
||||
<string name="action_dont_restart">재시작하지 않기</string>
|
||||
<string name="draft_saved">임시 저장됨</string>
|
||||
<string name="drafts_hint_messages">전송되지 않은 트윗은 여기에 보관됩니다</string>
|
||||
<string name="drawer_toggle">대시보드 아이콘 보이기</string>
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
<string name="display_sensitive_contents_summary">Toon gevoelige inhoud zonder kennisgeving in tijdlijn</string>
|
||||
<string name="dns_server">DNS-server</string>
|
||||
<string name="dns_server_summary">Stel DNS-server in voor netwerkverkeer.</string>
|
||||
<string name="dont_restart">Niet herstarten</string>
|
||||
<string name="action_dont_restart">Niet herstarten</string>
|
||||
<string name="draft_saved">Concept opgeslagen</string>
|
||||
<string name="drafts_hint_messages">Je niet-verzonden tweets worden hier opgeslagen</string>
|
||||
<string name="drawer_toggle">Knop voor navigatiemenu</string>
|
||||
|
|
|
@ -226,7 +226,7 @@
|
|||
<string name="display_sensitive_contents">Vis sensitivt innhold</string>
|
||||
<string name="display_sensitive_contents_summary">Vis sensitivt innhold i tidslinjen uten forvarsel</string>
|
||||
<string name="dns_server">DNS-server</string>
|
||||
<string name="dont_restart">Ikke start på nytt</string>
|
||||
<string name="action_dont_restart">Ikke start på nytt</string>
|
||||
<string name="draft_saved">Utkast lagret</string>
|
||||
<string name="drafts_hint_messages">Dine usendte tweets lagres her</string>
|
||||
<string name="edit_api">Endre API</string>
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
<string name="display_sensitive_contents_summary">Wyświetlaj wrażliwą zawartość bez powiadomienia w strumieniu</string>
|
||||
<string name="dns_server">DNS Server</string>
|
||||
<string name="dns_server_summary">Ręcznie ustaw adres serwera DNS.</string>
|
||||
<string name="dont_restart">Nie uruchamiaj ponownie</string>
|
||||
<string name="action_dont_restart">Nie uruchamiaj ponownie</string>
|
||||
<string name="edit_api">Edytuj API</string>
|
||||
<string name="edit_draft">Edytuj szkic</string>
|
||||
<string name="edit_tab">Edytuj zakładkę</string>
|
||||
|
|
|
@ -254,7 +254,7 @@
|
|||
<string name="display_sensitive_contents_summary">Exibir conteúdo sensível sem avisar</string>
|
||||
<string name="dns_server">Servidor DNS</string>
|
||||
<string name="dns_server_summary">Definir o Servidor de DNS para solicitações de rede.</string>
|
||||
<string name="dont_restart">Não reiniciar</string>
|
||||
<string name="action_dont_restart">Não reiniciar</string>
|
||||
<string name="draft_saved">Rascunho salvo</string>
|
||||
<string name="drafts_hint_messages">Os teus tweets não enviados vão ser guardados aqui</string>
|
||||
<string name="drawer_toggle">Alternador de gaveta</string>
|
||||
|
|
|
@ -270,7 +270,7 @@
|
|||
<string name="display_sensitive_contents_summary">Показывать особый контент в ленте без предупреждения</string>
|
||||
<string name="dns_server">DNS-сервер</string>
|
||||
<string name="dns_server_summary">Укажите DNS-сервер для сетевых запросов.</string>
|
||||
<string name="dont_restart">Не перезапускать</string>
|
||||
<string name="action_dont_restart">Не перезапускать</string>
|
||||
<string name="draft_saved">Черновик сохранен</string>
|
||||
<string name="drafts_hint_messages">Здесь сохраняются ваши неотправленные твиты</string>
|
||||
<string name="drawer_toggle">Отобразить шторку</string>
|
||||
|
|
|
@ -252,7 +252,7 @@
|
|||
<string name="display_sensitive_contents_summary">แสดงเนื้อหาล่อแหลมโดยไม่ต้องแจ้งเตือนบนไทม์ไลน์</string>
|
||||
<string name="dns_server">เซิร์ฟเวอร์ DNS</string>
|
||||
<string name="dns_server_summary">ตั้งค่าเซิร์ฟเวอร์ DNS สำหรับการร้องขอเครือข่าย</string>
|
||||
<string name="dont_restart">อย่าเพิ่งสิ</string>
|
||||
<string name="action_dont_restart">อย่าเพิ่งสิ</string>
|
||||
<string name="draft_saved">บันทึกข้อความร่างแล้ว</string>
|
||||
<string name="drafts_hint_messages">ข้อความร่างของคุณถูกบันทึกไว้ที่นี่</string>
|
||||
<string name="drawer_toggle">สลับลิ้นชัก</string>
|
||||
|
|
|
@ -251,7 +251,7 @@
|
|||
<string name="display_sensitive_contents_summary">Hassas içeriği uyarmadan zaman akışında görüntüle</string>
|
||||
<string name="dns_server">DNS Sunucusu</string>
|
||||
<string name="dns_server_summary">Ağ istekleri için DNS sunucusu ayarlayın.</string>
|
||||
<string name="dont_restart">Yeniden başlatma</string>
|
||||
<string name="action_dont_restart">Yeniden başlatma</string>
|
||||
<string name="draft_saved">Taslak kaydedildi</string>
|
||||
<string name="drafts_hint_messages">Gönderilmemiş tweetleri buradan kurtarabilirsiniz</string>
|
||||
<string name="drawer_toggle">Çekmeceyi aç/kapat</string>
|
||||
|
|
|
@ -252,7 +252,7 @@
|
|||
<string name="display_sensitive_contents_summary">Відображати делікатний вміст без попередження у стрічці</string>
|
||||
<string name="dns_server">DNS сервер</string>
|
||||
<string name="dns_server_summary">Встановлення DNS серверу для мережевих запитів.</string>
|
||||
<string name="dont_restart">Не перезаванатажувати</string>
|
||||
<string name="action_dont_restart">Не перезаванатажувати</string>
|
||||
<string name="draft_saved">Чернетку збережено</string>
|
||||
<string name="drafts_hint_messages">Тут зберігаються невідправлені твіти</string>
|
||||
<string name="drawer_toggle">Перемикач бічної панелі</string>
|
||||
|
|
|
@ -276,7 +276,7 @@
|
|||
<string name="display_sensitive_contents_summary">显示色情等敏感内容而不发出提示</string>
|
||||
<string name="dns_server">DNS 服务器</string>
|
||||
<string name="dns_server_summary">设置网络请求所用的 DNS 服务器</string>
|
||||
<string name="dont_restart">不重启</string>
|
||||
<string name="action_dont_restart">不重启</string>
|
||||
<string name="draft_saved">草稿已保存</string>
|
||||
<string name="drafts_hint_messages">您未发送的推文会被保存在这里</string>
|
||||
<string name="drawer_toggle">抽屉按钮</string>
|
||||
|
|
|
@ -275,7 +275,7 @@
|
|||
<string name="display_sensitive_contents_summary">顯示色情等敏感內容而不發出提示</string>
|
||||
<string name="dns_server">DNS 伺服器</string>
|
||||
<string name="dns_server_summary">設置用於網絡查詢的DNS伺服器</string>
|
||||
<string name="dont_restart">不重啟</string>
|
||||
<string name="action_dont_restart">不重啟</string>
|
||||
<string name="draft_saved">草稿已儲存</string>
|
||||
<string name="drafts_hint_messages">您未發送的推文會被儲存在這裡</string>
|
||||
<string name="drawer_toggle">選單切換</string>
|
||||
|
|
|
@ -275,7 +275,7 @@
|
|||
<string name="display_sensitive_contents_summary">顯示色情等敏感內容而不發出提示</string>
|
||||
<string name="dns_server">DNS 伺服器</string>
|
||||
<string name="dns_server_summary">設置用於網絡查詢的DNS伺服器</string>
|
||||
<string name="dont_restart">不重啟</string>
|
||||
<string name="action_dont_restart">不重啟</string>
|
||||
<string name="draft_saved">草稿已儲存</string>
|
||||
<string name="drafts_hint_messages">您未發送的推文會被儲存在這裡</string>
|
||||
<string name="drawer_toggle">選單切換</string>
|
||||
|
|
|
@ -252,6 +252,7 @@
|
|||
<!-- App name, normally you don't need to translate this. -->
|
||||
<string name="app_name">Twidere</string>
|
||||
<string name="app_restart_confirm">Twidere will restart to apply settings.</string>
|
||||
<string name="app_terminate_confirm">Twidere will quit to apply settings.</string>
|
||||
|
||||
<string name="appearance">Appearance</string>
|
||||
|
||||
|
@ -391,7 +392,8 @@
|
|||
<string name="dns_server">DNS Server</string>
|
||||
<string name="dns_server_summary">Set DNS Server for network requests.</string>
|
||||
|
||||
<string name="dont_restart">Don\'t restart</string>
|
||||
<string name="action_dont_restart">Don\'t restart</string>
|
||||
<string name="action_dont_terminate">Don\'t quit</string>
|
||||
|
||||
<string name="draft_saved">Draft saved</string>
|
||||
|
||||
|
@ -868,11 +870,15 @@
|
|||
<string name="preference_randomize_account_name">Randomize account name</string>
|
||||
<string name="preference_randomize_account_name_summary">Disallow other apps to get your name by reading accounts, improves privacy.</string>
|
||||
<string name="preference_randomize_account_rename_accounts_confirm">Rename existing accounts?</string>
|
||||
<string name="preference_summary_auto_refresh_compatibility_mode">Enable if auto refresh not working properly, may increase power usage on Android 5.0+</string>
|
||||
<string name="preference_summary_auto_refresh_power_saving">Stop auto refresh when battery is low</string>
|
||||
<string name="preference_summary_chrome_custom_tab">Open links in in-app browser (Powered by Chrome)</string>
|
||||
<string name="preference_summary_database_item_limit">Upper limit of items stored in databases for each account, set to a smaller value to save space and increase loading speed.</string>
|
||||
<string name="preference_summary_media_preload_non_metered_network">Preload media only on free networks like Wi-Fi</string>
|
||||
<string name="preference_title_accounts">Accounts</string>
|
||||
<string name="preference_title_advanced">Advanced</string>
|
||||
<string name="preference_title_auto_refresh_compatibility_mode">Compatibility mode</string>
|
||||
<string name="preference_title_auto_refresh_power_saving">Power saving mode</string>
|
||||
<string name="preference_title_chrome_custom_tab">In-app browser</string>
|
||||
<string name="preference_title_database_item_limit">Database size limit</string>
|
||||
<string name="preference_title_filter_manage_subscriptions">Manage</string>
|
||||
|
@ -1137,8 +1143,6 @@
|
|||
<!-- [noun] Accessibility label for retweet icon -->
|
||||
<string name="status_type_retweet">Retweet</string>
|
||||
|
||||
<string name="stop_auto_refresh_when_battery_low">Stop auto refresh when battery is low</string>
|
||||
|
||||
<string name="streaming">Streaming</string>
|
||||
|
||||
<string name="style">Style</string>
|
||||
|
|
|
@ -24,7 +24,19 @@
|
|||
<SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="stop_auto_refresh_when_battery_low"
|
||||
android:title="@string/stop_auto_refresh_when_battery_low"/>
|
||||
android:summary="@string/preference_summary_auto_refresh_power_saving"
|
||||
android:title="@string/preference_title_auto_refresh_power_saving"/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="@bool/use_legacy_refresh_service"
|
||||
android:enabled="@bool/use_job_refresh_service"
|
||||
android:key="auto_refresh_compatibility_mode"
|
||||
android:summary="@string/preference_summary_auto_refresh_compatibility_mode"
|
||||
android:title="@string/preference_title_auto_refresh_compatibility_mode">
|
||||
<extra
|
||||
android:name="should_terminate"
|
||||
android:value="true"/>
|
||||
</SwitchPreferenceCompat>
|
||||
|
||||
<org.mariotaku.twidere.preference.HomeRefreshContentPreference
|
||||
android:key="home_refresh"
|
||||
|
|
Loading…
Reference in New Issue