Compare commits

...

3 Commits

Author SHA1 Message Date
Caio Schnepper
1ed061f396 libgralloc: Fix refresh rate calculation
Calculated refresh rate can be 3% off
Reference: https://code.google.com/p/android/issues/detail?id=69391

Change-Id: I3b4efefcc0aef695ba48abdfb61f6d38b9d0a79c
2015-11-30 05:13:02 -08:00
Andreas Schneider
cbdae1245d ril: Use debug log level and not error
Change-Id: I8f017cb181967790260183fd06d1226d303bd2b8
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-10-23 08:36:26 +02:00
Andreas Schneider
7f60587448 ril: Fix network operator search
Newer RIL versions have more QAN elements so we need a way
to adjust them to the correct value.

This needs to be set to same value as mQANElements in the RIL Telephony
class.

Change-Id: Icfad9c0acf1b95f63c232b6c4c49ed52bd4e3aa4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-10-22 16:23:34 +02:00
2 changed files with 12 additions and 4 deletions

View File

@ -263,8 +263,8 @@ int init_frame_buffer_locked(struct private_module_t* module)
int refreshRate = 1000000000000000LLU /
(
uint64_t( info.upper_margin + info.lower_margin + info.yres )
* ( info.left_margin + info.right_margin + info.xres )
uint64_t( info.upper_margin + info.lower_margin + info.vsync_len + info.yres )
* ( info.left_margin + info.right_margin + info.hsync_len + info.xres )
* info.pixclock
);

View File

@ -67,6 +67,7 @@ namespace android {
#define PROPERTY_RIL_IMPL "gsm.version.ril-impl"
#define PROPERTY_QAN_ELEMENTS "ro.ril.qanelements"
// match with constant in RIL.java
#define MAX_COMMAND_BYTES (8 * 1024)
@ -2132,7 +2133,7 @@ sendResponseRaw (const void *data, size_t dataSize, RIL_SOCKET_ID socket_id) {
uint32_t header;
pthread_mutex_t * writeMutexHook = &s_writeMutex;
RLOGE("Send Response to %s", rilSocketIdToString(socket_id));
RLOGD("Send Response to %s", rilSocketIdToString(socket_id));
#if (SIM_COUNT >= 2)
if (socket_id == RIL_SOCKET_2) {
@ -2297,7 +2298,14 @@ static int responseStrings(Parcel &p, void *response, size_t responselen, bool n
numStrings = responselen / sizeof(char *);
if (network_search) {
p.writeInt32 ((numStrings / 5) * 4);
int32_t QANElements;
/*
* This needs to be set to same value as mQANElements in the RIL
* Telephony class.
*/
QANElements = property_get_int32(PROPERTY_QAN_ELEMENTS, 4);
p.writeInt32 ((numStrings / 5) * QANElements);
} else {
p.writeInt32 (numStrings);
}