1 /* 2 * Copyright (C) 2020 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 17 package com.android.systemui.car.statusbar; 18 19 import com.android.systemui.dagger.SysUISingleton; 20 import com.android.systemui.doze.DozeHost; 21 22 import javax.inject.Inject; 23 24 /** No-op implementation of {@link DozeHost} for use by car sysui, which does not support dozing. */ 25 @SysUISingleton 26 public class DozeServiceHost implements DozeHost { 27 28 @Inject DozeServiceHost()29 public DozeServiceHost() {} 30 31 @Override addCallback(Callback callback)32 public void addCallback(Callback callback) { 33 // No op. 34 } 35 36 @Override removeCallback(Callback callback)37 public void removeCallback(Callback callback) { 38 // No op. 39 } 40 41 @Override startDozing()42 public void startDozing() { 43 // No op. 44 } 45 46 @Override pulseWhileDozing(PulseCallback callback, int reason)47 public void pulseWhileDozing(PulseCallback callback, int reason) { 48 // No op. 49 } 50 51 @Override stopDozing()52 public void stopDozing() { 53 // No op. 54 } 55 56 @Override dozeTimeTick()57 public void dozeTimeTick() { 58 // No op. 59 } 60 61 @Override isPowerSaveActive()62 public boolean isPowerSaveActive() { 63 return false; 64 } 65 66 @Override isPulsingBlocked()67 public boolean isPulsingBlocked() { 68 return true; 69 } 70 71 @Override isProvisioned()72 public boolean isProvisioned() { 73 return false; 74 } 75 76 77 @Override isPulsePending()78 public boolean isPulsePending() { 79 return false; 80 } 81 82 @Override setPulsePending(boolean isPulsePending)83 public void setPulsePending(boolean isPulsePending) { 84 // No op. 85 } 86 87 @Override extendPulse(int reason)88 public void extendPulse(int reason) { 89 // No op. 90 } 91 92 @Override setAnimateWakeup(boolean animateWakeup)93 public void setAnimateWakeup(boolean animateWakeup) { 94 // No op. 95 } 96 97 @Override onSlpiTap(float x, float y)98 public void onSlpiTap(float x, float y) { 99 // No op. 100 } 101 102 @Override setDozeScreenBrightness(int value)103 public void setDozeScreenBrightness(int value) { 104 // No op. 105 } 106 107 @Override prepareForGentleSleep(Runnable onDisplayOffCallback)108 public void prepareForGentleSleep(Runnable onDisplayOffCallback) { 109 // No op. 110 } 111 112 @Override cancelGentleSleep()113 public void cancelGentleSleep() { 114 // No op. 115 } 116 117 @Override onIgnoreTouchWhilePulsing(boolean ignore)118 public void onIgnoreTouchWhilePulsing(boolean ignore) { 119 // No op. 120 } 121 122 @Override stopPulsing()123 public void stopPulsing() { 124 // No op. 125 } 126 127 @Override isAlwaysOnSuppressed()128 public boolean isAlwaysOnSuppressed() { 129 return true; 130 } 131 } 132