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:
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user