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.systembar; 18 19 import android.annotation.IntDef; 20 import android.view.View; 21 22 import com.android.systemui.statusbar.policy.ConfigurationController; 23 24 import java.lang.annotation.ElementType; 25 import java.lang.annotation.Retention; 26 import java.lang.annotation.RetentionPolicy; 27 import java.lang.annotation.Target; 28 29 /** 30 * An interface for controlling system bars. 31 */ 32 public interface CarSystemBarController extends ConfigurationController.ConfigurationListener { 33 34 int LEFT = 0; 35 int TOP = 1; 36 int RIGHT = 2; 37 int BOTTOM = 3; 38 39 @IntDef(value = {LEFT, TOP, RIGHT, BOTTOM}) 40 @Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE}) 41 @Retention(RetentionPolicy.SOURCE) 42 @interface SystemBarSide { 43 } 44 45 /** 46 * initializes the system bars. 47 */ init()48 void init(); 49 50 /** 51 * Registers a touch listener callbar for the given system bar side. 52 */ registerBarTouchListener(@ystemBarSide int side, View.OnTouchListener listener)53 void registerBarTouchListener(@SystemBarSide int side, View.OnTouchListener listener); 54 } 55