NavigationRenderer.java revision 8cf86912f5abf7ceb2cf39d799a8f3b5a79d3608
1d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev/*
2d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev * Copyright (C) 2016 The Android Open Source Project
3d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev *
4d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev * Licensed under the Apache License, Version 2.0 (the "License");
5d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev * you may not use this file except in compliance with the License.
6d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev * You may obtain a copy of the License at
7d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev *
8d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev *      http://www.apache.org/licenses/LICENSE-2.0
9d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev *
10d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev * Unless required by applicable law or agreed to in writing, software
11d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev * distributed under the License is distributed on an "AS IS" BASIS,
12d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev * See the License for the specific language governing permissions and
14d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev * limitations under the License.
15d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev */
161ecdd6ca75fdf8ff62105630664de5125e29676bPavel Maltsevpackage android.car.cluster.renderer;
17d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev
18d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsevimport android.annotation.SystemApi;
191ecdd6ca75fdf8ff62105630664de5125e29676bPavel Maltsevimport android.annotation.UiThread;
208cf86912f5abf7ceb2cf39d799a8f3b5a79d3608Pavel Maltsevimport android.car.navigation.CarNavigationInstrumentCluster;
21d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsevimport android.graphics.Bitmap;
22d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev
23d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev/**
24d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev * Contains methods specified for Navigation App renderer in instrument cluster.
25d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev *
26d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev * TODO: Consider to add methods to report time / distance to final destination.
27d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev * @hide
28d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev */
29d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev@SystemApi
301ecdd6ca75fdf8ff62105630664de5125e29676bPavel Maltsev@UiThread
31d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsevpublic abstract class NavigationRenderer {
328cf86912f5abf7ceb2cf39d799a8f3b5a79d3608Pavel Maltsev    /**
338cf86912f5abf7ceb2cf39d799a8f3b5a79d3608Pavel Maltsev     * Returns properties of instrument cluster for navigation.
348cf86912f5abf7ceb2cf39d799a8f3b5a79d3608Pavel Maltsev     */
358cf86912f5abf7ceb2cf39d799a8f3b5a79d3608Pavel Maltsev    abstract public CarNavigationInstrumentCluster getNavigationProperties();
368cf86912f5abf7ceb2cf39d799a8f3b5a79d3608Pavel Maltsev
37d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev    abstract public void onStartNavigation();
38d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev    abstract public void onStopNavigation();
39d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev    abstract public void onNextTurnChanged(int event, String road, int turnAngle, int turnNumber,
40d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev            Bitmap image, int turnSide);
41d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev    abstract public void onNextTurnDistanceChanged(int distanceMeters, int timeSeconds);
42d644c8715c839ccdcbd76fcf9cc27705b5399f7aPavel Maltsev}
43