pull/37/head
kunfei 5 years ago
parent c6d09c7aa1
commit b3d30a4d06
  1. 2
      app/src/main/AndroidManifest.xml
  2. 4
      app/src/main/java/io/legado/app/receiver/SharedReceiverActivity.kt
  3. 4
      app/src/main/java/io/legado/app/ui/config/ConfigFragment.kt

@ -85,7 +85,7 @@
<activity android:name=".ui.rss.source.debug.RssSourceDebugActivity" /> <activity android:name=".ui.rss.source.debug.RssSourceDebugActivity" />
<activity android:name=".ui.rss.article.RssArticlesActivity" /> <activity android:name=".ui.rss.article.RssArticlesActivity" />
<activity <activity
android:name=".receiver.ReceivingSharedActivity" android:name=".receiver.SharedReceiverActivity"
android:label="@string/receiving_shared_label"> android:label="@string/receiving_shared_label">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.PROCESS_TEXT" /> <action android:name="android.intent.action.PROCESS_TEXT" />

@ -9,7 +9,7 @@ import io.legado.app.ui.book.search.SearchActivity
import io.legado.app.ui.main.MainActivity import io.legado.app.ui.main.MainActivity
import org.jetbrains.anko.startActivity import org.jetbrains.anko.startActivity
class ReceivingSharedActivity : AppCompatActivity() { class SharedReceiverActivity : AppCompatActivity() {
private val receivingType = "text/plain" private val receivingType = "text/plain"
@ -51,7 +51,7 @@ class ReceivingSharedActivity : AppCompatActivity() {
} }
return if (result.length > 1) { return if (result.length > 1) {
val intent = Intent() val intent = Intent()
intent.setClass(this@ReceivingSharedActivity, MainActivity::class.java) intent.setClass(this@SharedReceiverActivity, MainActivity::class.java)
this.startActivity(intent) this.startActivity(intent)
false false
} else { } else {

@ -12,7 +12,7 @@ import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.help.BookHelp import io.legado.app.help.BookHelp
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.ui.book.search.SearchActivity import io.legado.app.receiver.SharedReceiverActivity
import io.legado.app.utils.LogUtils import io.legado.app.utils.LogUtils
import io.legado.app.utils.getPrefString import io.legado.app.utils.getPrefString
@ -23,7 +23,7 @@ class ConfigFragment : PreferenceFragmentCompat(), Preference.OnPreferenceChange
private val packageManager = App.INSTANCE.packageManager private val packageManager = App.INSTANCE.packageManager
private val componentName = ComponentName( private val componentName = ComponentName(
App.INSTANCE, App.INSTANCE,
SearchActivity::class.java.name SharedReceiverActivity::class.java.name
) )
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {

Loading…
Cancel
Save