use of com.android.server.lights.Light in project android_frameworks_base by DirtyUnicorns.
the class WindowManagerService method performEnableScreen.
public void performEnableScreen() {
synchronized (mWindowMap) {
if (DEBUG_BOOT)
Slog.i(TAG_WM, "performEnableScreen: mDisplayEnabled=" + mDisplayEnabled + " mForceDisplayEnabled=" + mForceDisplayEnabled + " mShowingBootMessages=" + mShowingBootMessages + " mSystemBooted=" + mSystemBooted + " mOnlyCore=" + mOnlyCore, new RuntimeException("here").fillInStackTrace());
if (mDisplayEnabled) {
return;
}
if (!mSystemBooted && !mShowingBootMessages) {
return;
}
// Don't enable the screen until all existing windows have been drawn.
if (!mForceDisplayEnabled && checkWaitingForWindowsLocked()) {
return;
}
if (!mBootAnimationStopped) {
// Do this one time.
Trace.asyncTraceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "Stop bootanim", 0);
try {
IBinder surfaceFlinger = ServiceManager.getService("SurfaceFlinger");
if (surfaceFlinger != null) {
//Slog.i(TAG_WM, "******* TELLING SURFACE FLINGER WE ARE BOOTED!");
Parcel data = Parcel.obtain();
data.writeInterfaceToken("android.ui.ISurfaceComposer");
// BOOT_FINISHED
surfaceFlinger.transact(// BOOT_FINISHED
IBinder.FIRST_CALL_TRANSACTION, data, null, 0);
data.recycle();
}
} catch (RemoteException ex) {
Slog.e(TAG_WM, "Boot completed: SurfaceFlinger is dead!");
}
mBootAnimationStopped = true;
}
if (!mForceDisplayEnabled && !checkBootAnimationCompleteLocked()) {
if (DEBUG_BOOT)
Slog.i(TAG_WM, "performEnableScreen: Waiting for anim complete");
return;
}
EventLog.writeEvent(EventLogTags.WM_BOOT_ANIMATION_DONE, SystemClock.uptimeMillis());
Trace.asyncTraceEnd(Trace.TRACE_TAG_WINDOW_MANAGER, "Stop bootanim", 0);
mDisplayEnabled = true;
if (DEBUG_SCREEN_ON || DEBUG_BOOT)
Slog.i(TAG_WM, "******************** ENABLING SCREEN!");
// Enable input dispatch.
mInputMonitor.setEventDispatchingLw(mEventDispatchingEnabled);
}
try {
mActivityManager.bootAnimationComplete();
} catch (RemoteException e) {
}
mPolicy.enableScreenAfterBoot();
// clear any intrusive lighting which may still be on from the
// crypto landing ui
LightsManager lm = LocalServices.getService(LightsManager.class);
Light batteryLight = lm.getLight(LightsManager.LIGHT_ID_BATTERY);
Light notifLight = lm.getLight(LightsManager.LIGHT_ID_NOTIFICATIONS);
if (batteryLight != null) {
batteryLight.turnOff();
}
if (notifLight != null) {
notifLight.turnOff();
}
// Make sure the last requested orientation has been applied.
updateRotationUnchecked(false, false);
}
use of com.android.server.lights.Light in project android_frameworks_base by DirtyUnicorns.
the class PowerManagerService method setAttentionLightInternal.
private void setAttentionLightInternal(boolean on, int color) {
Light light;
synchronized (mLock) {
if (!mSystemReady) {
return;
}
light = mAttentionLight;
}
// Control light outside of lock.
light.setFlashing(color, Light.LIGHT_FLASH_HARDWARE, (on ? 3 : 0), 0);
}
use of com.android.server.lights.Light in project android_frameworks_base by ResurrectionRemix.
the class PowerManagerService method setAttentionLightInternal.
private void setAttentionLightInternal(boolean on, int color) {
Light light;
synchronized (mLock) {
if (!mSystemReady) {
return;
}
light = mAttentionLight;
}
// Control light outside of lock.
light.setFlashing(color, Light.LIGHT_FLASH_HARDWARE, (on ? 3 : 0), 0);
}
use of com.android.server.lights.Light in project android_frameworks_base by ResurrectionRemix.
the class WindowManagerService method performEnableScreen.
public void performEnableScreen() {
synchronized (mWindowMap) {
if (DEBUG_BOOT)
Slog.i(TAG_WM, "performEnableScreen: mDisplayEnabled=" + mDisplayEnabled + " mForceDisplayEnabled=" + mForceDisplayEnabled + " mShowingBootMessages=" + mShowingBootMessages + " mSystemBooted=" + mSystemBooted + " mOnlyCore=" + mOnlyCore, new RuntimeException("here").fillInStackTrace());
if (mDisplayEnabled) {
return;
}
if (!mSystemBooted && !mShowingBootMessages) {
return;
}
// Don't enable the screen until all existing windows have been drawn.
if (!mForceDisplayEnabled && checkWaitingForWindowsLocked()) {
return;
}
if (!mBootAnimationStopped) {
// Do this one time.
Trace.asyncTraceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "Stop bootanim", 0);
try {
IBinder surfaceFlinger = ServiceManager.getService("SurfaceFlinger");
if (surfaceFlinger != null) {
//Slog.i(TAG_WM, "******* TELLING SURFACE FLINGER WE ARE BOOTED!");
Parcel data = Parcel.obtain();
data.writeInterfaceToken("android.ui.ISurfaceComposer");
// BOOT_FINISHED
surfaceFlinger.transact(// BOOT_FINISHED
IBinder.FIRST_CALL_TRANSACTION, data, null, 0);
data.recycle();
}
} catch (RemoteException ex) {
Slog.e(TAG_WM, "Boot completed: SurfaceFlinger is dead!");
}
mBootAnimationStopped = true;
}
if (!mForceDisplayEnabled && !checkBootAnimationCompleteLocked()) {
if (DEBUG_BOOT)
Slog.i(TAG_WM, "performEnableScreen: Waiting for anim complete");
return;
}
EventLog.writeEvent(EventLogTags.WM_BOOT_ANIMATION_DONE, SystemClock.uptimeMillis());
Trace.asyncTraceEnd(Trace.TRACE_TAG_WINDOW_MANAGER, "Stop bootanim", 0);
mDisplayEnabled = true;
if (DEBUG_SCREEN_ON || DEBUG_BOOT)
Slog.i(TAG_WM, "******************** ENABLING SCREEN!");
// Enable input dispatch.
mInputMonitor.setEventDispatchingLw(mEventDispatchingEnabled);
}
try {
mActivityManager.bootAnimationComplete();
} catch (RemoteException e) {
}
mPolicy.enableScreenAfterBoot();
// clear any intrusive lighting which may still be on from the
// crypto landing ui
LightsManager lm = LocalServices.getService(LightsManager.class);
Light batteryLight = lm.getLight(LightsManager.LIGHT_ID_BATTERY);
Light notifLight = lm.getLight(LightsManager.LIGHT_ID_NOTIFICATIONS);
if (batteryLight != null) {
batteryLight.turnOff();
}
if (notifLight != null) {
notifLight.turnOff();
}
// Make sure the last requested orientation has been applied.
updateRotationUnchecked(false, false);
}
use of com.android.server.lights.Light in project android_frameworks_base by crdroidandroid.
the class PowerManagerService method setAttentionLightInternal.
private void setAttentionLightInternal(boolean on, int color) {
Light light;
synchronized (mLock) {
if (!mSystemReady) {
return;
}
light = mAttentionLight;
}
// Control light outside of lock.
light.setFlashing(color, Light.LIGHT_FLASH_HARDWARE, (on ? 3 : 0), 0);
}
Aggregations