Merge "Define getLooper() method"
This commit is contained in:
committed by
Android (Google) Code Review
commit
c58e7899be
@@ -4554,6 +4554,7 @@ package android.app {
|
||||
public abstract class EphemeralResolverService extends android.app.Service {
|
||||
ctor public EphemeralResolverService();
|
||||
method public final void attachBaseContext(android.content.Context);
|
||||
method public android.os.Looper getLooper();
|
||||
method public final android.os.IBinder onBind(android.content.Intent);
|
||||
method public abstract deprecated java.util.List<android.content.pm.EphemeralResolveInfo> onEphemeralResolveInfoList(int[], int);
|
||||
method public android.content.pm.EphemeralResolveInfo onGetEphemeralIntentFilter(java.lang.String);
|
||||
|
||||
@@ -74,10 +74,17 @@ public abstract class EphemeralResolverService extends Service {
|
||||
throw new IllegalStateException("Must define");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a {@link Looper} to perform service operations on.
|
||||
*/
|
||||
public Looper getLooper() {
|
||||
return getBaseContext().getMainLooper();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void attachBaseContext(Context base) {
|
||||
super.attachBaseContext(base);
|
||||
mHandler = new ServiceHandler(base.getMainLooper());
|
||||
mHandler = new ServiceHandler(getLooper());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user