LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DisplayManager.cpp File Reference
#include "DisplayManager.h"
#include "AmbientLightSensor.h"
#include "Common.h"
#include "CoreNaviManager.h"
#include "CustomEvents.h"
#include "DeviceInfo.h"
#include "DisplayStates.h"
#include "HostBase.h"
#include "IMEController.h"
#include "JSONUtils.h"
#include "Preferences.h"
#include "Settings.h"
#include "SystemService.h"
#include "SystemUiController.h"
#include "Time.h"
#include "WindowServer.h"
#include <QApplication>
#include <SysMgrDeviceKeydefs.h>
#include <cjson/json.h>
#include <glib.h>
#include <lunaservice.h>
Include dependency graph for DisplayManager.cpp:

Classes

struct  DisplayCallbackCtx
 

Macros

#define KEYS
 
#define URI_POWERD_ACTIVITY_START   "palm://com.palm.power/com/palm/power/activityStart"
 
#define URI_POWERD_ACTIVITY_END   "palm://com.palm.power/com/palm/power/activityEnd"
 
#define JSON_POWERD_ACTIVITY_START   "{\"id\":\"com.palm.display-lock.timer\",\"duration_ms\":%i}"
 
#define JSON_POWERD_ACTIVITY_END   "{\"id\":\"com.palm.display-lock.timer\"}"
 
#define DISPLAY_APPID   "com.palm.display"
 
#define URI_PREFS_GET   "palm://com.palm.preferences/appProperties/Get"
 
#define URI_PREFS_SET   "palm://com.palm.preferences/appProperties/Set"
 
#define URI_SIGNAL_ADDMATCH   "palm://com.palm.lunabus/signal/addmatch"
 
#define URI_POWERD_BATTERY_SIGNAL_REQUEST   "palm://com.palm.display/com/palm/power/batteryStatusQuery"
 
#define URI_CHARGER_SIGNAL_REQUEST   "palm://com.palm.display/com/palm/power/chargerStatusQuery"
 
#define URI_TELEPHONY_CHARGER_SIGNAL_REQUEST   "palm://com.palm.telephony/chargeSourceQuery"
 
#define URI_USBDOCK_SIGNAL_REQUEST   "palm://com.palm.display/com/palm/power/USBDockStatus"
 
#define URI_LBS_GETCURRENTLOC   "palm://com.palm.location/getCurrentPosition"
 
#define URI_SLIDER_STATUS_REQUEST   "palm://com.palm.keys/switches/status"
 
#define JSON_CHARGER_SIGNAL_ADDMATCH   "{\"category\":\"/com/palm/power\",\"method\":\"chargerStatus\"}"
 
#define JSON_USBDOCK_SIGNAL_ADDMATCH   "{\"category\":\"/com/palm/power\",\"method\":\"USBDockStatus\"}"
 
#define JSON_BATTERY_SIGNAL_ADDMATCH   "{\"category\":\"/com/palm/power\",\"method\":\"batteryStatus\"}"
 
#define JSON_SIGNAL_REQUEST   "{}"
 
#define JSON_LBS_CURRENTLOCATIONINF   "{\"accuracy\":%i,\"responseTime\":%i}"
 
#define JSON_SLIDER_STATUS_REQUEST   "{\"get\":\"slider\"}"
 
#define URI_AUDIOD_STATUS   "palm://com.palm.audio/phone/status"
 
#define JSON_AUDIOD_SUBSCRIBE   "{\"subscribe\":true}"
 
#define URI_DISPLAY_POWER_KEY_SIGNAL   "palm://com.palm.display/com/palm/display/powerKeyPressed"
 
#define JSON_DISPLAY_POWER_KEY_SIGNAL   "{\"showDialog\":true}"
 
#define DEFAULT_TIMEOUT   120
 
#define DEFAULT_BRIGHTNESS   40
 
#define MINIMUM_ON_BRIGHTNESS   1
 
#define MINIMUM_DIMMED_BRIGHTNESS   1
 
#define DISPLAY_UNDEFINED   -1
 
#define DISPLAY_OFF   0
 
#define DISPLAY_DIMMED   1
 
#define DISPLAY_ON   2
 
#define DNAST_SUBSCRIPTION_KEY   "DNAST"
 
#define POWER_KEY_BLOCK_SUBSCRIPTION_KEY   "PKBSK"
 
#define PROXIMITY_SUBSCRIPTION_KEY   "PESK"
 
#define SLIDER_TIMEOUT   1500
 
#define SLIDER_MINTIME   200
 
#define ALERT_TIMEOUT   6000
 
#define SLIDER_LOCK_TIMEOUT   2000
 
#define TOUCHPANEL_DELAY   200
 
#define DISPLAY_LOCK_TIMEOUT   2000
 
#define DISPLAY_EVENT_REQUEST   0
 
#define DISPLAY_EVENT_ON   1
 
#define DISPLAY_EVENT_DIMMED   2
 
#define DISPLAY_EVENT_OFF   3
 
#define DISPLAY_EVENT_TIMEOUTS   4
 
#define DISPLAY_EVENT_PUSH_DNAST   5
 
#define DISPLAY_EVENT_POP_DNAST   6
 
#define DISPLAY_EVENT_ACTIVE   7
 
#define DISPLAY_EVENT_INACTIVE   8
 
#define DISPLAY_EVENT_DOCKMODE   9
 
#define CHARGER_NONE   0
 
#define CHARGER_USB   1
 
#define CHARGER_INDUCTIVE   (1 << 1)
 
#define DISPLAY_EVENT_NONE   100
 
#define DISPLAY_EVENT_SLIDER_LOCKED   101
 
#define DISPLAY_EVENT_SLIDER_UNLOCKED   102
 
#define DISPLAY_EVENT_POWER_BUTTON_UP   103
 
#define DISPLAY_EVENT_POWER_BUTTON_DOWN   104
 
#define DISPLAY_EVENT_INDUCTIVE_CHARGER_DISCONNECTED   105
 
#define DISPLAY_EVENT_INDUCTIVE_CHARGER_CONNECTED   106
 
#define DISPLAY_EVENT_USB_CHARGER_DISCONNECTED   107
 
#define DISPLAY_EVENT_USB_CHARGER_CONNECTED   108
 
#define DISPLAY_EVENT_ALS_REGION_CHANGED   109
 
#define DISPLAY_EVENT_ENTER_EMERGENCY_MODE   110
 
#define DISPLAY_EVENT_EXIT_EMERGENCY_MODE   111
 
#define DISPLAY_EVENT_PROXIMITY_ON   112
 
#define DISPLAY_EVENT_PROXIMITY_OFF   113
 
#define DISPLAY_EVENT_ON_CALL   114
 
#define DISPLAY_EVENT_OFF_CALL   115
 
#define DISPLAY_EVENT_HOME_BUTTON_UP   116
 

Typedefs

typedef struct DisplayCallbackCtx DisplayCallbackCtx_t
 

Variables

LSSignal displaySignals []
 

Macro Definition Documentation

#define ALERT_TIMEOUT   6000
#define CHARGER_INDUCTIVE   (1 << 1)
#define CHARGER_NONE   0
#define CHARGER_USB   1
#define DEFAULT_BRIGHTNESS   40
#define DEFAULT_TIMEOUT   120
#define DISPLAY_APPID   "com.palm.display"
#define DISPLAY_DIMMED   1
#define DISPLAY_EVENT_ACTIVE   7
#define DISPLAY_EVENT_ALS_REGION_CHANGED   109
#define DISPLAY_EVENT_DIMMED   2
#define DISPLAY_EVENT_DOCKMODE   9
#define DISPLAY_EVENT_ENTER_EMERGENCY_MODE   110
#define DISPLAY_EVENT_EXIT_EMERGENCY_MODE   111
#define DISPLAY_EVENT_HOME_BUTTON_UP   116
#define DISPLAY_EVENT_INACTIVE   8
#define DISPLAY_EVENT_INDUCTIVE_CHARGER_CONNECTED   106
#define DISPLAY_EVENT_INDUCTIVE_CHARGER_DISCONNECTED   105
#define DISPLAY_EVENT_NONE   100
#define DISPLAY_EVENT_OFF   3
#define DISPLAY_EVENT_OFF_CALL   115
#define DISPLAY_EVENT_ON   1
#define DISPLAY_EVENT_ON_CALL   114
#define DISPLAY_EVENT_POP_DNAST   6
#define DISPLAY_EVENT_POWER_BUTTON_DOWN   104
#define DISPLAY_EVENT_POWER_BUTTON_UP   103
#define DISPLAY_EVENT_PROXIMITY_OFF   113
#define DISPLAY_EVENT_PROXIMITY_ON   112
#define DISPLAY_EVENT_PUSH_DNAST   5
#define DISPLAY_EVENT_REQUEST   0
#define DISPLAY_EVENT_SLIDER_LOCKED   101
#define DISPLAY_EVENT_SLIDER_UNLOCKED   102
#define DISPLAY_EVENT_TIMEOUTS   4
#define DISPLAY_EVENT_USB_CHARGER_CONNECTED   108
#define DISPLAY_EVENT_USB_CHARGER_DISCONNECTED   107
#define DISPLAY_LOCK_TIMEOUT   2000
#define DISPLAY_OFF   0
#define DISPLAY_ON   2
#define DISPLAY_UNDEFINED   -1
#define DNAST_SUBSCRIPTION_KEY   "DNAST"
#define JSON_AUDIOD_SUBSCRIBE   "{\"subscribe\":true}"
#define JSON_BATTERY_SIGNAL_ADDMATCH   "{\"category\":\"/com/palm/power\",\"method\":\"batteryStatus\"}"
#define JSON_CHARGER_SIGNAL_ADDMATCH   "{\"category\":\"/com/palm/power\",\"method\":\"chargerStatus\"}"
#define JSON_DISPLAY_POWER_KEY_SIGNAL   "{\"showDialog\":true}"
#define JSON_LBS_CURRENTLOCATIONINF   "{\"accuracy\":%i,\"responseTime\":%i}"
#define JSON_POWERD_ACTIVITY_END   "{\"id\":\"com.palm.display-lock.timer\"}"
#define JSON_POWERD_ACTIVITY_START   "{\"id\":\"com.palm.display-lock.timer\",\"duration_ms\":%i}"
#define JSON_SIGNAL_REQUEST   "{}"
#define JSON_SLIDER_STATUS_REQUEST   "{\"get\":\"slider\"}"
#define JSON_USBDOCK_SIGNAL_ADDMATCH   "{\"category\":\"/com/palm/power\",\"method\":\"USBDockStatus\"}"
#define KEYS
#define MINIMUM_DIMMED_BRIGHTNESS   1
#define MINIMUM_ON_BRIGHTNESS   1
#define POWER_KEY_BLOCK_SUBSCRIPTION_KEY   "PKBSK"
#define PROXIMITY_SUBSCRIPTION_KEY   "PESK"
#define SLIDER_LOCK_TIMEOUT   2000
#define SLIDER_MINTIME   200
#define SLIDER_TIMEOUT   1500
#define TOUCHPANEL_DELAY   200
#define URI_AUDIOD_STATUS   "palm://com.palm.audio/phone/status"
#define URI_CHARGER_SIGNAL_REQUEST   "palm://com.palm.display/com/palm/power/chargerStatusQuery"
#define URI_DISPLAY_POWER_KEY_SIGNAL   "palm://com.palm.display/com/palm/display/powerKeyPressed"
#define URI_LBS_GETCURRENTLOC   "palm://com.palm.location/getCurrentPosition"
#define URI_POWERD_ACTIVITY_END   "palm://com.palm.power/com/palm/power/activityEnd"
#define URI_POWERD_ACTIVITY_START   "palm://com.palm.power/com/palm/power/activityStart"
#define URI_POWERD_BATTERY_SIGNAL_REQUEST   "palm://com.palm.display/com/palm/power/batteryStatusQuery"
#define URI_PREFS_GET   "palm://com.palm.preferences/appProperties/Get"
#define URI_PREFS_SET   "palm://com.palm.preferences/appProperties/Set"
#define URI_SIGNAL_ADDMATCH   "palm://com.palm.lunabus/signal/addmatch"
#define URI_SLIDER_STATUS_REQUEST   "palm://com.palm.keys/switches/status"
#define URI_TELEPHONY_CHARGER_SIGNAL_REQUEST   "palm://com.palm.telephony/chargeSourceQuery"
#define URI_USBDOCK_SIGNAL_REQUEST   "palm://com.palm.display/com/palm/power/USBDockStatus"

Typedef Documentation

Variable Documentation

LSSignal displaySignals[]
Initial value:
= {
{ "powerKeyPressed" },
{},
}