blob: 34026b0b61451c4c4b5dbe144c1a3fcb3e9e41e3 [file] [log] [blame]
Adrian Roosff2c4562016-11-03 12:13:36 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17package com.android.systemui.doze;
18
Adrian Roos2981eb02017-05-26 18:40:09 -070019import android.os.PowerManager;
Adrian Roosff2c4562016-11-03 12:13:36 -070020import android.view.Display;
21
22public class DozeServiceFake implements DozeMachine.Service {
23
24 public boolean finished;
25 public int screenState;
Adrian Roos4fb1f512017-02-14 14:01:32 +010026 public boolean requestedWakeup;
Adrian Roos2981eb02017-05-26 18:40:09 -070027 public int screenBrightness;
Adrian Roosff2c4562016-11-03 12:13:36 -070028
29 public DozeServiceFake() {
30 reset();
31 }
32
33 @Override
34 public void finish() {
35 finished = true;
36 }
37
38 @Override
39 public void setDozeScreenState(int state) {
40 screenState = state;
41 }
42
Adrian Roos4fb1f512017-02-14 14:01:32 +010043 @Override
44 public void requestWakeUp() {
45 requestedWakeup = true;
46 }
Adrian Roos2981eb02017-05-26 18:40:09 -070047
48 @Override
49 public void setDozeScreenBrightness(int brightness) {
50 screenBrightness = brightness;
51 }
52
53 public void reset() {
54 finished = false;
55 screenState = Display.STATE_UNKNOWN;
56 screenBrightness = PowerManager.BRIGHTNESS_DEFAULT;
57 }
Adrian Roosff2c4562016-11-03 12:13:36 -070058}