mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Disable hinge sensor while the screen is off" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
92b4a88f78
@@ -270,6 +270,18 @@ public class TouchInteractionService extends Service
|
||||
MAIN_EXECUTOR.execute(ProxyScreenStatusProvider.INSTANCE::onScreenTurnedOn);
|
||||
}
|
||||
|
||||
@BinderThread
|
||||
@Override
|
||||
public void onScreenTurningOn() {
|
||||
MAIN_EXECUTOR.execute(ProxyScreenStatusProvider.INSTANCE::onScreenTurningOn);
|
||||
}
|
||||
|
||||
@BinderThread
|
||||
@Override
|
||||
public void onScreenTurningOff() {
|
||||
MAIN_EXECUTOR.execute(ProxyScreenStatusProvider.INSTANCE::onScreenTurningOff);
|
||||
}
|
||||
|
||||
/**
|
||||
* Preloads the Overview activity.
|
||||
*
|
||||
|
||||
@@ -39,6 +39,16 @@ public class ProxyScreenStatusProvider implements ScreenStatusProvider {
|
||||
mListeners.forEach(ScreenListener::onScreenTurnedOn);
|
||||
}
|
||||
|
||||
/** Called when the screen is starting to turn on. */
|
||||
public void onScreenTurningOn() {
|
||||
mListeners.forEach(ScreenListener::onScreenTurningOn);
|
||||
}
|
||||
|
||||
/** Called when the screen is starting to turn off. */
|
||||
public void onScreenTurningOff() {
|
||||
mListeners.forEach(ScreenListener::onScreenTurningOff);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCallback(@NonNull ScreenListener listener) {
|
||||
mListeners.add(listener);
|
||||
|
||||
Reference in New Issue
Block a user