#include <binder/IServiceManager.h>
#include <binder/ProcessState.h>
#include <binder/IPCThreadState.h>
#include <android/native_window.h>
#include <gui/Surface.h>
#include <gui/SurfaceComposerClient.h>
#include <gui/ISurfaceComposer.h>
#include <ui/DisplayStatInfo.h>
int main (int argc, char *argv[]) {
long tOSDWidth = 0;
long tOSDHeight = 0;
sp<IServiceManager> sm = defaultServiceManager();
sp<ISurfaceComposer> composer = interface_cast<ISurfaceComposer>(sm->checkService(String16("SurfaceFlinger")));
//FIXME
tOSDWidth = 1920;
tOSDHeight = 1080;
if (composer != NULL){
DisplayStatInfo stats;
status_t res = composer->getDisplayStats(NULL , &stats);
if (res == NO_ERROR){
ALOGI("OSD width=%d height=%d", stats.displayWidth, stats.displayHeight);