Loading packages/SystemUI/src/com/android/systemui/dagger/ReferenceSystemUIModule.java +3 −2 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ import com.android.systemui.rotationlock.RotationLockNewModule; import com.android.systemui.scene.SceneContainerFrameworkModule; import com.android.systemui.screenshot.ReferenceScreenshotModule; import com.android.systemui.settings.MultiUserUtilsModule; import com.android.systemui.settings.UserTracker; import com.android.systemui.shade.NotificationShadeWindowControllerImpl; import com.android.systemui.shade.ShadeModule; import com.android.systemui.startable.Dependencies; Loading Loading @@ -178,9 +179,9 @@ public abstract class ReferenceSystemUIModule { @Provides @SysUISingleton static IndividualSensorPrivacyController provideIndividualSensorPrivacyController( SensorPrivacyManager sensorPrivacyManager) { SensorPrivacyManager sensorPrivacyManager, UserTracker userTracker) { IndividualSensorPrivacyController spC = new IndividualSensorPrivacyControllerImpl( sensorPrivacyManager); sensorPrivacyManager, userTracker); spC.init(); return spC; } Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/IndividualSensorPrivacyControllerImpl.java +9 −3 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.util.SparseBooleanArray; import androidx.annotation.NonNull; import com.android.internal.camera.flags.Flags; import com.android.systemui.settings.UserTracker; import com.android.systemui.util.ListenerSet; import java.util.Set; Loading @@ -41,14 +42,17 @@ public class IndividualSensorPrivacyControllerImpl implements IndividualSensorPr private static final int[] SENSORS = new int[] {CAMERA, MICROPHONE}; private final @NonNull SensorPrivacyManager mSensorPrivacyManager; private final @NonNull UserTracker mUserTracker; private final SparseBooleanArray mSoftwareToggleState = new SparseBooleanArray(); private final SparseBooleanArray mHardwareToggleState = new SparseBooleanArray(); private Boolean mRequiresAuthentication; private final ListenerSet<Callback> mCallbacks = new ListenerSet<>(); public IndividualSensorPrivacyControllerImpl( @NonNull SensorPrivacyManager sensorPrivacyManager) { @NonNull SensorPrivacyManager sensorPrivacyManager, @NonNull UserTracker userTracker) { mSensorPrivacyManager = sensorPrivacyManager; mUserTracker = userTracker; } @Override Loading Loading @@ -94,12 +98,14 @@ public class IndividualSensorPrivacyControllerImpl implements IndividualSensorPr @Override public void setSensorBlocked(@Source int source, @Sensor int sensor, boolean blocked) { mSensorPrivacyManager.setSensorPrivacyForProfileGroup(source, sensor, blocked); mSensorPrivacyManager.setSensorPrivacyForProfileGroup(source, sensor, blocked, mUserTracker.getUserId()); } @Override public void suppressSensorPrivacyReminders(int sensor, boolean suppress) { mSensorPrivacyManager.suppressSensorPrivacyReminders(sensor, suppress); mSensorPrivacyManager.suppressSensorPrivacyReminders(sensor, suppress, mUserTracker.getUserId()); } @Override Loading Loading
packages/SystemUI/src/com/android/systemui/dagger/ReferenceSystemUIModule.java +3 −2 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ import com.android.systemui.rotationlock.RotationLockNewModule; import com.android.systemui.scene.SceneContainerFrameworkModule; import com.android.systemui.screenshot.ReferenceScreenshotModule; import com.android.systemui.settings.MultiUserUtilsModule; import com.android.systemui.settings.UserTracker; import com.android.systemui.shade.NotificationShadeWindowControllerImpl; import com.android.systemui.shade.ShadeModule; import com.android.systemui.startable.Dependencies; Loading Loading @@ -178,9 +179,9 @@ public abstract class ReferenceSystemUIModule { @Provides @SysUISingleton static IndividualSensorPrivacyController provideIndividualSensorPrivacyController( SensorPrivacyManager sensorPrivacyManager) { SensorPrivacyManager sensorPrivacyManager, UserTracker userTracker) { IndividualSensorPrivacyController spC = new IndividualSensorPrivacyControllerImpl( sensorPrivacyManager); sensorPrivacyManager, userTracker); spC.init(); return spC; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/IndividualSensorPrivacyControllerImpl.java +9 −3 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.util.SparseBooleanArray; import androidx.annotation.NonNull; import com.android.internal.camera.flags.Flags; import com.android.systemui.settings.UserTracker; import com.android.systemui.util.ListenerSet; import java.util.Set; Loading @@ -41,14 +42,17 @@ public class IndividualSensorPrivacyControllerImpl implements IndividualSensorPr private static final int[] SENSORS = new int[] {CAMERA, MICROPHONE}; private final @NonNull SensorPrivacyManager mSensorPrivacyManager; private final @NonNull UserTracker mUserTracker; private final SparseBooleanArray mSoftwareToggleState = new SparseBooleanArray(); private final SparseBooleanArray mHardwareToggleState = new SparseBooleanArray(); private Boolean mRequiresAuthentication; private final ListenerSet<Callback> mCallbacks = new ListenerSet<>(); public IndividualSensorPrivacyControllerImpl( @NonNull SensorPrivacyManager sensorPrivacyManager) { @NonNull SensorPrivacyManager sensorPrivacyManager, @NonNull UserTracker userTracker) { mSensorPrivacyManager = sensorPrivacyManager; mUserTracker = userTracker; } @Override Loading Loading @@ -94,12 +98,14 @@ public class IndividualSensorPrivacyControllerImpl implements IndividualSensorPr @Override public void setSensorBlocked(@Source int source, @Sensor int sensor, boolean blocked) { mSensorPrivacyManager.setSensorPrivacyForProfileGroup(source, sensor, blocked); mSensorPrivacyManager.setSensorPrivacyForProfileGroup(source, sensor, blocked, mUserTracker.getUserId()); } @Override public void suppressSensorPrivacyReminders(int sensor, boolean suppress) { mSensorPrivacyManager.suppressSensorPrivacyReminders(sensor, suppress); mSensorPrivacyManager.suppressSensorPrivacyReminders(sensor, suppress, mUserTracker.getUserId()); } @Override Loading