Commit a28533d5 authored by Mygod's avatar Mygod

Deprecate old backup mechanism for Android 5-

parent 911c6eb6
......@@ -20,7 +20,6 @@
package com.github.shadowsocks
import android.app.backup.BackupManager
import android.content.ActivityNotFoundException
import android.os.Bundle
import android.os.RemoteException
......@@ -244,6 +243,5 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Callback, OnPref
super.onDestroy()
DataStore.publicStore.unregisterChangeListener(this)
connection.disconnect(this)
BackupManager(this).dataChanged()
}
}
......@@ -20,7 +20,6 @@
package com.github.shadowsocks.tv
import android.app.backup.BackupManager
import android.content.ActivityNotFoundException
import android.content.Intent
import android.os.Bundle
......@@ -256,6 +255,5 @@ class MainPreferenceFragment : LeanbackPreferenceFragmentCompat(), ShadowsocksCo
DataStore.publicStore.unregisterChangeListener(this)
val context = requireContext()
connection.disconnect(context)
BackupManager(context).dataChanged()
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment