Add intentions for registering Android components in manifest
Activity, Service, BroadcastReceiver #KT-17389 Fixed
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// INTENTION_CLASS: org.jetbrains.kotlin.android.intention.AddServiceToManifest
|
||||
// NOT_AVAILABLE
|
||||
package com.myapp
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
|
||||
|
||||
abstract class <caret>MyService : Service() {
|
||||
override fun onBind(intent: Intent?): IBinder {
|
||||
TODO("not implemented")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// INTENTION_CLASS: org.jetbrains.kotlin.android.intention.AddServiceToManifest
|
||||
// NOT_AVAILABLE
|
||||
package com.myapp
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
|
||||
|
||||
class <caret>MyService : Service() {
|
||||
override fun onBind(intent: Intent?): IBinder {
|
||||
TODO("not implemented")
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.myapp"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
|
||||
<application>
|
||||
<service android:name=".MyService"/>
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,16 @@
|
||||
// INTENTION_CLASS: org.jetbrains.kotlin.android.intention.AddServiceToManifest
|
||||
// NOT_AVAILABLE
|
||||
package com.myapp
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
|
||||
|
||||
class Test {
|
||||
inner class <caret>MyService : Service() {
|
||||
override fun onBind(intent: Intent?): IBinder {
|
||||
TODO("not implemented")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// INTENTION_CLASS: org.jetbrains.kotlin.android.intention.AddServiceToManifest
|
||||
// NOT_AVAILABLE
|
||||
package com.myapp
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
|
||||
|
||||
class MyService : Service() {
|
||||
override fun onBind(intent: Intent?): IBinder {
|
||||
<caret>
|
||||
TODO("not implemented")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// INTENTION_CLASS: org.jetbrains.kotlin.android.intention.AddServiceToManifest
|
||||
// NOT_AVAILABLE
|
||||
package com.myapp
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
|
||||
|
||||
fun test() {
|
||||
class <caret>MyService : Service() {
|
||||
override fun onBind(intent: Intent?): IBinder {
|
||||
TODO("not implemented")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// INTENTION_CLASS: org.jetbrains.kotlin.android.intention.AddServiceToManifest
|
||||
// CHECK_MANIFEST
|
||||
package com.myapp
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
|
||||
|
||||
class Test {
|
||||
class <caret>MyService : Service() {
|
||||
override fun onBind(intent: Intent?): IBinder {
|
||||
TODO("not implemented")
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.myapp"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
|
||||
<application>
|
||||
<service android:name=".Test$MyService"/>
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,6 @@
|
||||
// INTENTION_CLASS: org.jetbrains.kotlin.android.intention.AddServiceToManifest
|
||||
// NOT_AVAILABLE
|
||||
package com.myapp
|
||||
|
||||
|
||||
class <caret>MyService
|
||||
@@ -0,0 +1,14 @@
|
||||
// INTENTION_CLASS: org.jetbrains.kotlin.android.intention.AddServiceToManifest
|
||||
// NOT_AVAILABLE
|
||||
package com.myapp
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
|
||||
|
||||
private class <caret>MyService : Service() {
|
||||
override fun onBind(intent: Intent?): IBinder {
|
||||
TODO("not implemented")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// INTENTION_CLASS: org.jetbrains.kotlin.android.intention.AddServiceToManifest
|
||||
// NOT_AVAILABLE
|
||||
package com.myapp
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
|
||||
|
||||
class Test {
|
||||
protected class <caret>MyService : Service() {
|
||||
override fun onBind(intent: Intent?): IBinder {
|
||||
TODO("not implemented")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// INTENTION_CLASS: org.jetbrains.kotlin.android.intention.AddServiceToManifest
|
||||
// CHECK_MANIFEST
|
||||
package com.myapp
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
|
||||
|
||||
class <caret>MyService : Service() {
|
||||
override fun onBind(intent: Intent?): IBinder {
|
||||
TODO("not implemented")
|
||||
}
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.myapp"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
|
||||
<application>
|
||||
<service android:name=".MyService"/>
|
||||
</application>
|
||||
</manifest>
|
||||
Reference in New Issue
Block a user