Don't mark Services and Activities as @Singleton

Android gets to choose when to create services. If Dagger
has them marked as @Singleton, then it hangs onto the
references forever, and this causes problems.

Bug: 143895143
Test: manual
Change-Id: Iee61fc8d6f70e01af167cc215ae7dcde235687af
This commit is contained in:
Dave Mankoff
2019-11-07 14:40:30 -05:00
parent f8a2891105
commit cb56dc3968
2 changed files with 0 additions and 4 deletions

View File

@@ -36,9 +36,7 @@ import com.android.internal.policy.IKeyguardStateCallback;
import com.android.systemui.SystemUIApplication;
import javax.inject.Inject;
import javax.inject.Singleton;
@Singleton
public class KeyguardService extends Service {
static final String TAG = "KeyguardService";
static final String PERMISSION = android.Manifest.permission.CONTROL_KEYGUARD;

View File

@@ -28,9 +28,7 @@ import android.util.Log;
import android.view.WindowManager;
import javax.inject.Inject;
import javax.inject.Singleton;
@Singleton
public class TakeScreenshotService extends Service {
private static final String TAG = "TakeScreenshotService";