Merge "Add logging to DarkIconDispatcher"
This commit is contained in:
committed by
Android (Google) Code Review
commit
d799f00260
@@ -26,6 +26,9 @@ import android.widget.ImageView;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.statusbar.policy.DarkIconDispatcher;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
public class DarkIconDispatcherImpl implements DarkIconDispatcher {
|
||||
|
||||
private final LightBarTransitionsController mTransitionsController;
|
||||
@@ -74,7 +77,7 @@ public class DarkIconDispatcherImpl implements DarkIconDispatcher {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the dark area so {@link #setIconsDark} only affects the icons in the specified area.
|
||||
* Sets the dark area so {@link #applyDark} only affects the icons in the specified area.
|
||||
*
|
||||
* @param darkArea the area in which icons should change it's tint, in logical screen
|
||||
* coordinates
|
||||
@@ -103,4 +106,12 @@ public class DarkIconDispatcherImpl implements DarkIconDispatcher {
|
||||
mReceivers.valueAt(i).onDarkChanged(mTintArea, mDarkIntensity, mIconTint);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||
pw.println("DarkIconDispatcher: ");
|
||||
pw.println(" mIconTint: 0x" + Integer.toHexString(mIconTint));
|
||||
pw.println(" mDarkIntensity: " + mDarkIntensity + "f");
|
||||
pw.println(" mTintArea: " + mTintArea);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,6 +259,10 @@ public class LightBarController implements BatteryController.BatteryStateChangeC
|
||||
|
||||
pw.println();
|
||||
|
||||
if (mStatusBarIconController != null) {
|
||||
mStatusBarIconController.dump(fd, pw, args);
|
||||
}
|
||||
|
||||
LightBarTransitionsController transitionsController =
|
||||
mStatusBarIconController.getTransitionsController();
|
||||
if (transitionsController != null) {
|
||||
|
||||
@@ -19,9 +19,17 @@ import android.graphics.Rect;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.android.systemui.Dumpable;
|
||||
import com.android.systemui.statusbar.phone.LightBarTransitionsController;
|
||||
|
||||
public interface DarkIconDispatcher {
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
* Dispatches events to {@link DarkReceiver}s about changes in darkness, tint area and dark
|
||||
* intensity
|
||||
*/
|
||||
public interface DarkIconDispatcher extends Dumpable {
|
||||
|
||||
void setIconsDarkArea(Rect r);
|
||||
LightBarTransitionsController getTransitionsController();
|
||||
@@ -37,6 +45,11 @@ public interface DarkIconDispatcher {
|
||||
// addDarkReceiver.
|
||||
void applyDark(DarkReceiver object);
|
||||
|
||||
/**
|
||||
* Dumpable interface
|
||||
*/
|
||||
default void dump(FileDescriptor fd, PrintWriter pw, String[] args) {}
|
||||
|
||||
int DEFAULT_ICON_TINT = Color.WHITE;
|
||||
Rect sTmpRect = new Rect();
|
||||
int[] sTmpInt2 = new int[2];
|
||||
|
||||
Reference in New Issue
Block a user