Remove Dependency.get(MAIN_HANDLER) from SystemUIService
Bug: 144503618 Test: atest SystemUITests Change-Id: Ia75498b500333ac4924f1b1e3f7831f7ff7754e3
This commit is contained in:
@@ -20,20 +20,32 @@ import android.annotation.NonNull;
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Process;
|
||||
import android.os.SystemProperties;
|
||||
import android.util.Slog;
|
||||
|
||||
import com.android.internal.os.BinderInternal;
|
||||
import com.android.systemui.dagger.qualifiers.MainHandler;
|
||||
import com.android.systemui.shared.plugins.PluginManager;
|
||||
import com.android.systemui.shared.plugins.PluginManagerImpl;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class SystemUIService extends Service {
|
||||
|
||||
private final Handler mMainHandler;
|
||||
|
||||
@Inject
|
||||
public SystemUIService(@MainHandler Handler mainHandler) {
|
||||
super();
|
||||
mMainHandler = mainHandler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
@@ -56,7 +68,7 @@ public class SystemUIService extends Service {
|
||||
"uid " + uid + " sent too many Binder proxies to uid "
|
||||
+ Process.myUid());
|
||||
}
|
||||
}, Dependency.get(Dependency.MAIN_HANDLER));
|
||||
}, mMainHandler);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.android.systemui.dagger;
|
||||
import android.app.Service;
|
||||
|
||||
import com.android.systemui.ImageWallpaper;
|
||||
import com.android.systemui.SystemUIService;
|
||||
import com.android.systemui.doze.DozeService;
|
||||
import com.android.systemui.keyguard.KeyguardService;
|
||||
import com.android.systemui.screenshot.TakeScreenshotService;
|
||||
@@ -51,6 +52,12 @@ public abstract class DefaultServiceBinder {
|
||||
@ClassKey(KeyguardService.class)
|
||||
public abstract Service bindKeyguardService(KeyguardService service);
|
||||
|
||||
/** */
|
||||
@Binds
|
||||
@IntoMap
|
||||
@ClassKey(SystemUIService.class)
|
||||
public abstract Service bindSystemUIService(SystemUIService service);
|
||||
|
||||
/** */
|
||||
@Binds
|
||||
@IntoMap
|
||||
|
||||
Reference in New Issue
Block a user