Loading core/java/android/hardware/display/BrightnessChangeEvent.java +6 −6 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import android.os.Parcelable; */ public final class BrightnessChangeEvent implements Parcelable { /** Brightness in nits */ public int brightness; public float brightness; /** Timestamp of the change {@see System.currentTimeMillis()} */ public long timeStamp; Loading Loading @@ -58,7 +58,7 @@ public final class BrightnessChangeEvent implements Parcelable { public int colorTemperature; /** Brightness level before slider adjustment */ public int lastBrightness; public float lastBrightness; public BrightnessChangeEvent() { } Loading @@ -78,7 +78,7 @@ public final class BrightnessChangeEvent implements Parcelable { } private BrightnessChangeEvent(Parcel source) { brightness = source.readInt(); brightness = source.readFloat(); timeStamp = source.readLong(); packageName = source.readString(); userId = source.readInt(); Loading @@ -87,7 +87,7 @@ public final class BrightnessChangeEvent implements Parcelable { batteryLevel = source.readFloat(); nightMode = source.readBoolean(); colorTemperature = source.readInt(); lastBrightness = source.readInt(); lastBrightness = source.readFloat(); } public static final Creator<BrightnessChangeEvent> CREATOR = Loading @@ -107,7 +107,7 @@ public final class BrightnessChangeEvent implements Parcelable { @Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(brightness); dest.writeFloat(brightness); dest.writeLong(timeStamp); dest.writeString(packageName); dest.writeInt(userId); Loading @@ -116,6 +116,6 @@ public final class BrightnessChangeEvent implements Parcelable { dest.writeFloat(batteryLevel); dest.writeBoolean(nightMode); dest.writeInt(colorTemperature); dest.writeInt(lastBrightness); dest.writeFloat(lastBrightness); } } core/java/android/hardware/display/DisplayManager.java +0 −7 Original line number Diff line number Diff line Loading @@ -627,13 +627,6 @@ public final class DisplayManager { return mGlobal.getBrightnessEvents(mContext.getOpPackageName()); } /** * @hide STOPSHIP - remove when adaptive brightness accepts curves. */ public void setBrightness(int brightness) { mGlobal.setBrightness(brightness); } /** * Sets the global display brightness configuration. * Loading core/java/android/hardware/display/DisplayManagerGlobal.java +0 −12 Original line number Diff line number Diff line Loading @@ -475,18 +475,6 @@ public final class DisplayManagerGlobal { } } /** * Set brightness but don't add a BrightnessChangeEvent * STOPSHIP remove when adaptive brightness accepts curves. */ public void setBrightness(int brightness) { try { mDm.setBrightness(brightness); } catch (RemoteException ex) { throw ex.rethrowFromSystemServer(); } } /** * Sets the global brightness configuration for a given user. * Loading core/java/android/hardware/display/DisplayManagerInternal.java +8 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,11 @@ public abstract class DisplayManagerInternal { // set by the user as opposed to being programmatically controlled by apps. public boolean brightnessSetByUser; // Set to true if screenBrightness or screenAutoBrightnessAdjustment are being set // temporarily. This is typically set while the user has their finger on the brightness // control, before they've selected the final brightness value. public boolean brightnessIsTemporary; // If true, enables automatic brightness control. public boolean useAutoBrightness; Loading Loading @@ -280,6 +285,7 @@ public abstract class DisplayManagerInternal { screenAutoBrightnessAdjustment = other.screenAutoBrightnessAdjustment; screenLowPowerBrightnessFactor = other.screenLowPowerBrightnessFactor; brightnessSetByUser = other.brightnessSetByUser; brightnessIsTemporary = other.brightnessIsTemporary; useAutoBrightness = other.useAutoBrightness; blockScreenOn = other.blockScreenOn; lowPowerMode = other.lowPowerMode; Loading @@ -303,6 +309,7 @@ public abstract class DisplayManagerInternal { && screenLowPowerBrightnessFactor == other.screenLowPowerBrightnessFactor && brightnessSetByUser == other.brightnessSetByUser && brightnessIsTemporary == other.brightnessIsTemporary && useAutoBrightness == other.useAutoBrightness && blockScreenOn == other.blockScreenOn && lowPowerMode == other.lowPowerMode Loading @@ -324,6 +331,7 @@ public abstract class DisplayManagerInternal { + ", screenAutoBrightnessAdjustment=" + screenAutoBrightnessAdjustment + ", screenLowPowerBrightnessFactor=" + screenLowPowerBrightnessFactor + ", brightnessSetByUser=" + brightnessSetByUser + ", brightnessIsTemporary=" + brightnessIsTemporary + ", useAutoBrightness=" + useAutoBrightness + ", blockScreenOn=" + blockScreenOn + ", lowPowerMode=" + lowPowerMode Loading core/java/android/hardware/display/IDisplayManager.aidl +0 −4 Original line number Diff line number Diff line Loading @@ -87,10 +87,6 @@ interface IDisplayManager { // Requires BRIGHTNESS_SLIDER_USAGE permission. ParceledListSlice getBrightnessEvents(String callingPackage); // STOPSHIP remove when adaptive brightness code is updated to accept curves. // Requires BRIGHTNESS_SLIDER_USAGE permission. void setBrightness(int brightness); // Sets the global brightness configuration for a given user. Requires // CONFIGURE_DISPLAY_BRIGHTNESS, and INTERACT_ACROSS_USER if the user being configured is not // the same as the calling user. Loading Loading
core/java/android/hardware/display/BrightnessChangeEvent.java +6 −6 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import android.os.Parcelable; */ public final class BrightnessChangeEvent implements Parcelable { /** Brightness in nits */ public int brightness; public float brightness; /** Timestamp of the change {@see System.currentTimeMillis()} */ public long timeStamp; Loading Loading @@ -58,7 +58,7 @@ public final class BrightnessChangeEvent implements Parcelable { public int colorTemperature; /** Brightness level before slider adjustment */ public int lastBrightness; public float lastBrightness; public BrightnessChangeEvent() { } Loading @@ -78,7 +78,7 @@ public final class BrightnessChangeEvent implements Parcelable { } private BrightnessChangeEvent(Parcel source) { brightness = source.readInt(); brightness = source.readFloat(); timeStamp = source.readLong(); packageName = source.readString(); userId = source.readInt(); Loading @@ -87,7 +87,7 @@ public final class BrightnessChangeEvent implements Parcelable { batteryLevel = source.readFloat(); nightMode = source.readBoolean(); colorTemperature = source.readInt(); lastBrightness = source.readInt(); lastBrightness = source.readFloat(); } public static final Creator<BrightnessChangeEvent> CREATOR = Loading @@ -107,7 +107,7 @@ public final class BrightnessChangeEvent implements Parcelable { @Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(brightness); dest.writeFloat(brightness); dest.writeLong(timeStamp); dest.writeString(packageName); dest.writeInt(userId); Loading @@ -116,6 +116,6 @@ public final class BrightnessChangeEvent implements Parcelable { dest.writeFloat(batteryLevel); dest.writeBoolean(nightMode); dest.writeInt(colorTemperature); dest.writeInt(lastBrightness); dest.writeFloat(lastBrightness); } }
core/java/android/hardware/display/DisplayManager.java +0 −7 Original line number Diff line number Diff line Loading @@ -627,13 +627,6 @@ public final class DisplayManager { return mGlobal.getBrightnessEvents(mContext.getOpPackageName()); } /** * @hide STOPSHIP - remove when adaptive brightness accepts curves. */ public void setBrightness(int brightness) { mGlobal.setBrightness(brightness); } /** * Sets the global display brightness configuration. * Loading
core/java/android/hardware/display/DisplayManagerGlobal.java +0 −12 Original line number Diff line number Diff line Loading @@ -475,18 +475,6 @@ public final class DisplayManagerGlobal { } } /** * Set brightness but don't add a BrightnessChangeEvent * STOPSHIP remove when adaptive brightness accepts curves. */ public void setBrightness(int brightness) { try { mDm.setBrightness(brightness); } catch (RemoteException ex) { throw ex.rethrowFromSystemServer(); } } /** * Sets the global brightness configuration for a given user. * Loading
core/java/android/hardware/display/DisplayManagerInternal.java +8 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,11 @@ public abstract class DisplayManagerInternal { // set by the user as opposed to being programmatically controlled by apps. public boolean brightnessSetByUser; // Set to true if screenBrightness or screenAutoBrightnessAdjustment are being set // temporarily. This is typically set while the user has their finger on the brightness // control, before they've selected the final brightness value. public boolean brightnessIsTemporary; // If true, enables automatic brightness control. public boolean useAutoBrightness; Loading Loading @@ -280,6 +285,7 @@ public abstract class DisplayManagerInternal { screenAutoBrightnessAdjustment = other.screenAutoBrightnessAdjustment; screenLowPowerBrightnessFactor = other.screenLowPowerBrightnessFactor; brightnessSetByUser = other.brightnessSetByUser; brightnessIsTemporary = other.brightnessIsTemporary; useAutoBrightness = other.useAutoBrightness; blockScreenOn = other.blockScreenOn; lowPowerMode = other.lowPowerMode; Loading @@ -303,6 +309,7 @@ public abstract class DisplayManagerInternal { && screenLowPowerBrightnessFactor == other.screenLowPowerBrightnessFactor && brightnessSetByUser == other.brightnessSetByUser && brightnessIsTemporary == other.brightnessIsTemporary && useAutoBrightness == other.useAutoBrightness && blockScreenOn == other.blockScreenOn && lowPowerMode == other.lowPowerMode Loading @@ -324,6 +331,7 @@ public abstract class DisplayManagerInternal { + ", screenAutoBrightnessAdjustment=" + screenAutoBrightnessAdjustment + ", screenLowPowerBrightnessFactor=" + screenLowPowerBrightnessFactor + ", brightnessSetByUser=" + brightnessSetByUser + ", brightnessIsTemporary=" + brightnessIsTemporary + ", useAutoBrightness=" + useAutoBrightness + ", blockScreenOn=" + blockScreenOn + ", lowPowerMode=" + lowPowerMode Loading
core/java/android/hardware/display/IDisplayManager.aidl +0 −4 Original line number Diff line number Diff line Loading @@ -87,10 +87,6 @@ interface IDisplayManager { // Requires BRIGHTNESS_SLIDER_USAGE permission. ParceledListSlice getBrightnessEvents(String callingPackage); // STOPSHIP remove when adaptive brightness code is updated to accept curves. // Requires BRIGHTNESS_SLIDER_USAGE permission. void setBrightness(int brightness); // Sets the global brightness configuration for a given user. Requires // CONFIGURE_DISPLAY_BRIGHTNESS, and INTERACT_ACROSS_USER if the user being configured is not // the same as the calling user. Loading