1 /* Copyright (C) 2010 The Android Open Source Project 2 ** 3 ** This software is licensed under the terms of the GNU General Public 4 ** License version 2, as published by the Free Software Foundation, and 5 ** may be copied, distributed, and modified under those terms. 6 ** 7 ** This program is distributed in the hope that it will be useful, 8 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 9 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 ** GNU General Public License for more details. 11 */ 12 13 /* 14 * This file contains helper routines that are used to establish communication 15 * between UI and Core components of the emulator. This is a temporary file 16 * where we will collect functional dependencies between UI and Core in the 17 * process of separating UI and Core in the emulator build. Ideally at the 18 * end this will be replaced with a message protocol over sockets, or other 19 * means of interprocess communication. 20 */ 21 22 #include "android/android.h" 23 #include "android/globals.h" 24 #include "android/hw-control.h" 25 #include "android/ui-core-protocol.h" 26 27 int 28 android_core_get_hw_lcd_density(void) 29 { 30 return android_hw->hw_lcd_density; 31 } 32 33 void 34 android_core_set_brightness_change_callback(AndroidHwLightBrightnessCallback callback, 35 void* opaque) 36 { 37 AndroidHwControlFuncs funcs; 38 39 funcs.light_brightness = callback; 40 android_hw_control_init( opaque, &funcs ); 41 } 42 43 int 44 android_core_get_base_port(void) 45 { 46 return android_base_port; 47 } 48