2 * Copyright (C) 2017 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package com.android.systemui.doze;
19 import android.annotation.NonNull;
20 import android.app.PendingIntent;
23 * A rudimentary fake for DozeHost.
25 class DozeHostFake implements DozeHost {
28 boolean pulseExtended;
29 boolean animateWakeup;
33 float aodDimmingScrimOpacity;
36 public void addCallback(@NonNull Callback callback) {
37 this.callback = callback;
41 public void removeCallback(@NonNull Callback callback) {
46 public void startDozing() {
51 public void pulseWhileDozing(@NonNull PulseCallback callback, int reason) {
52 throw new RuntimeException("not implemented");
56 public void stopDozing() {
61 public void dozeTimeTick() {
62 throw new RuntimeException("not implemented");
66 public boolean isPowerSaveActive() {
71 public boolean isPulsingBlocked() {
76 public boolean isProvisioned() {
81 public boolean isBlockingDoze() {
86 public void startPendingIntentDismissingKeyguard(PendingIntent intent) {
87 throw new RuntimeException("not implemented");
91 public void onIgnoreTouchWhilePulsing(boolean ignore) {
95 public void abortPulsing() {
100 public void extendPulse() {
101 pulseExtended = true;
105 public void setAnimateWakeup(boolean animateWakeup) {
106 this.animateWakeup = animateWakeup;
110 public void onDoubleTap(float x, float y) {
116 public void setDozeScreenBrightness(int value) {
120 public void setAodDimmingScrim(float scrimOpacity) {
121 aodDimmingScrimOpacity = scrimOpacity;