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;
35 public void addCallback(@NonNull Callback callback) {
36 this.callback = callback;
40 public void removeCallback(@NonNull Callback callback) {
45 public void startDozing() {
50 public void pulseWhileDozing(@NonNull PulseCallback callback, int reason) {
51 throw new RuntimeException("not implemented");
55 public void stopDozing() {
60 public void dozeTimeTick() {
61 throw new RuntimeException("not implemented");
65 public boolean isPowerSaveActive() {
70 public boolean isPulsingBlocked() {
75 public boolean isProvisioned() {
80 public boolean isBlockingDoze() {
85 public void startPendingIntentDismissingKeyguard(PendingIntent intent) {
86 throw new RuntimeException("not implemented");
90 public void onIgnoreTouchWhilePulsing(boolean ignore) {
94 public void abortPulsing() {
99 public void extendPulse() {
100 pulseExtended = true;
104 public void setAnimateWakeup(boolean animateWakeup) {
105 this.animateWakeup = animateWakeup;
109 public void onDoubleTap(float x, float y) {
115 public void setDozeScreenBrightness(int value) {