highwaystar / android_device_xiaomi_mocha Goto Github PK
View Code? Open in Web Editor NEWThis project forked from cyanogenmod/android_device_nvidia_shieldtablet
This project forked from cyanogenmod/android_device_nvidia_shieldtablet
Random application force clauses on app swithihng or on orientation change caused by
EGLBoolean egl_display_t::initialize from opengl/libs/EGL/egl_display.cpp
called without calling EGLDisplay egl_display_t::getDisplay(EGLNativeDisplayType display) which loads vendor libs. Not sure what causing this, but it can be fixed by force calling getDisplay inside initialize()
Here is path for project frameworks/native
diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp
index ec59235..ecfbf24 100644
--- a/opengl/libs/EGL/egl_display.cpp
+++ b/opengl/libs/EGL/egl_display.cpp
@@ -158,6 +158,9 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) {
cnx->major = -1;
cnx->minor = -1;
if (cnx->dso) {
+
+ disp.dpy = cnx->egl.eglGetDisplay(EGL_DEFAULT_DISPLAY);
+
EGLDisplay idpy = disp.dpy;
if (cnx->egl.eglInitialize(idpy, &cnx->major, &cnx->minor)) {
//ALOGD("initialized dpy=%p, ver=%d.%d, cnx=%p",
ROM: lineage-14.1-20170911-UNOFFICIAL-mocha
GApps: open_gapps-arm-7.1-mini-20200325
Root: No
When I turn off the device and charge it to 100% then disconnect the cord, the green LED may stay on for a very long time. There is once that it's on for several hours, until I turn on the device.
Here is patches to fix missing symbols for audio.primary.tegra.so
Help to implement them as device tree libs fro LD_PRELOAD are welcome.
project frameworks/av/
diff --git a/media/libnbaio/MonoPipe.cpp b/media/libnbaio/MonoPipe.cpp
index 0b65861..338b7cf 100644
--- a/media/libnbaio/MonoPipe.cpp
+++ b/media/libnbaio/MonoPipe.cpp
@@ -98,6 +98,24 @@ MonoPipe::MonoPipe(size_t reqFrames, const NBAIO_Format& format, bool writeCanBl
mSamplesToLocalTime.a_to_b_denom = static_cast<uint32_t>(D);
}
+extern "C" void _ZN7android8MonoPipeC1EjRKNS_12NBAIO_FormatEb(size_t reqFrames, const NBAIO_Format& format, bool writeCanBlock);
+extern "C" void _ZN7android8MonoPipeC1Ejjb(size_t reqFrames, unsigned format_old, bool writeCanBlock)
+{
+ NBAIO_Format ret;
+ unsigned sampleRate=0;
+ unsigned channelCount=0;
+ audio_format_t format_new = AUDIO_FORMAT_PCM_16_BIT;
+ switch(format_old) {
+ case 1: sampleRate = 44100; channelCount = 2; break;
+ case 2: sampleRate = 48000; channelCount = 2; break;
+ case 3: sampleRate = 44100; channelCount = 1; break;
+ case 4: sampleRate = 48000; channelCount = 1; break;
+ default: format_new = AUDIO_FORMAT_INVALID;
+ }
+ ret = Format_from_SR_C(sampleRate, channelCount, format_new);
+ _ZN7android8MonoPipeC1EjRKNS_12NBAIO_FormatEb(reqFrames, ret, writeCanBlock);
+}
+
MonoPipe::~MonoPipe()
{
free(mBuffer);
diff --git a/media/libnbaio/NBAIO.cpp b/media/libnbaio/NBAIO.cpp
index d641e74..6bf2b36 100644
--- a/media/libnbaio/NBAIO.cpp
+++ b/media/libnbaio/NBAIO.cpp
@@ -60,6 +60,16 @@ NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount,
return ret;
}
+unsigned Format_from_SR_C(unsigned sampleRate, unsigned channelCount)
+{
+ if (sampleRate == 44100 && channelCount == 2) return 1;
+ if (sampleRate == 48000 && channelCount == 2) return 2;
+ if (sampleRate == 44100 && channelCount == 1) return 3;
+ if (sampleRate == 48000 && channelCount == 1) return 4;
+ return 0;
+}
+
+
// This is a default implementation; it is expected that subclasses will optimize this.
ssize_t NBAIO_Sink::writeVia(writeVia_t via, size_t total, void *user, size_t block)
{
project external/icu/
diff --git a/icu4c/source/common/ucnv.c b/icu4c/source/common/ucnv.c
index 5cf4d15..55b4faa 100644
--- a/icu4c/source/common/ucnv.c
+++ b/icu4c/source/common/ucnv.c
@@ -2914,6 +2914,145 @@ ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status){
return FALSE;
}
}
+
+U_CAPI void U_EXPORT2 ucnv_setToUCallBack_48 (UConverter * converter,
+ UConverterToUCallback newAction,
+ const void* newContext,
+ UConverterToUCallback *oldAction,
+ const void** oldContext,
+ UErrorCode * err) {
+ ucnv_setToUCallBack(converter, newAction, newContext,
+ oldAction, oldContext, err);
+}
+
+U_CAPI void U_EXPORT2 ucnv_close_48 (UConverter * converter) {
+ ucnv_close (converter);
+}
+
+U_CAPI void U_EXPORT2
+ucnv_setFromUCallBack_48 (UConverter * converter,
+ UConverterFromUCallback newAction,
+ const void* newContext,
+ UConverterFromUCallback *oldAction,
+ const void** oldContext,
+ UErrorCode * err) {
+
+ ucnv_setFromUCallBack(converter, newAction, newContext, oldAction,
+ oldContext, err);
+}
+
+U_CAPI void U_EXPORT2
+ucnv_convertEx_48 (UConverter *targetCnv, UConverter *sourceCnv,
+ char **target, const char *targetLimit,
+ const char **source, const char *sourceLimit,
+ UChar *pivotStart, UChar **pivotSource,
+ UChar **pivotTarget, const UChar *pivotLimit,
+ UBool reset, UBool flush,
+ UErrorCode *pErrorCode) {
+ ucnv_convertEx(targetCnv, sourceCnv, target, targetLimit, source,
+ sourceLimit, pivotStart, pivotSource,
+ pivotTarget, pivotLimit, reset, flush,
+ pErrorCode);
+}
+
+U_CAPI UConverter* U_EXPORT2
+ucnv_open_48 (const char *name,
+ UErrorCode * err) {
+ return ucnv_open(name, err);
+}
+
+U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP_48 (
+ const void *context,
+ UConverterFromUnicodeArgs *fromUArgs,
+ const UChar* codeUnits,
+ int32_t length,
+ UChar32 codePoint,
+ UConverterCallbackReason reason,
+ UErrorCode * err) {
+ return UCNV_FROM_U_CALLBACK_STOP(context, fromUArgs, codeUnits,
+ length, codePoint, reason, err);
+}
+
+U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP_48 (
+ const void *context,
+ UConverterToUnicodeArgs *toUArgs,
+ const char* codeUnits,
+ int32_t length,
+ UConverterCallbackReason reason,
+ UErrorCode * err) {
+ return UCNV_TO_U_CALLBACK_STOP(context, toUArgs, codeUnits, length,
+ reason, err);
+}
+
+U_CAPI void U_EXPORT2 ucnv_setToUCallBack_51 (UConverter * converter,
+ UConverterToUCallback newAction,
+ const void* newContext,
+ UConverterToUCallback *oldAction,
+ const void** oldContext,
+ UErrorCode * err) {
+ ucnv_setToUCallBack(converter, newAction, newContext,
+ oldAction, oldContext, err);
+}
+
+U_CAPI void U_EXPORT2 ucnv_close_51 (UConverter * converter) {
+ ucnv_close (converter);
+}
+
+U_CAPI void U_EXPORT2
+ucnv_setFromUCallBack_51 (UConverter * converter,
+ UConverterFromUCallback newAction,
+ const void* newContext,
+ UConverterFromUCallback *oldAction,
+ const void** oldContext,
+ UErrorCode * err) {
+
+ ucnv_setFromUCallBack(converter, newAction, newContext, oldAction,
+ oldContext, err);
+}
+
+U_CAPI void U_EXPORT2
+ucnv_convertEx_51 (UConverter *targetCnv, UConverter *sourceCnv,
+ char **target, const char *targetLimit,
+ const char **source, const char *sourceLimit,
+ UChar *pivotStart, UChar **pivotSource,
+ UChar **pivotTarget, const UChar *pivotLimit,
+ UBool reset, UBool flush,
+ UErrorCode *pErrorCode) {
+ ucnv_convertEx(targetCnv, sourceCnv, target, targetLimit, source,
+ sourceLimit, pivotStart, pivotSource,
+ pivotTarget, pivotLimit, reset, flush,
+ pErrorCode);
+}
+
+U_CAPI UConverter* U_EXPORT2
+ucnv_open_51 (const char *name,
+ UErrorCode * err) {
+ return ucnv_open(name, err);
+}
+
+U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP_51 (
+ const void *context,
+ UConverterFromUnicodeArgs *fromUArgs,
+ const UChar* codeUnits,
+ int32_t length,
+ UChar32 codePoint,
+ UConverterCallbackReason reason,
+ UErrorCode * err) {
+ return UCNV_FROM_U_CALLBACK_STOP(context, fromUArgs, codeUnits,
+ length, codePoint, reason, err);
+}
+
+U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP_51 (
+ const void *context,
+ UConverterToUnicodeArgs *toUArgs,
+ const char* codeUnits,
+ int32_t length,
+ UConverterCallbackReason reason,
+ UErrorCode * err) {
+ return UCNV_TO_U_CALLBACK_STOP(context, toUArgs, codeUnits, length,
+ reason, err);
+}
+
#endif
/*
ROM: lineage-14.1-20170911-UNOFFICIAL-mocha
GApps: open_gapps-arm-7.1-mini-20200325
Root: No
The time I wait for the backlight go dark after I turn off the light of room is longer then before.
Besides, the lowest level of backlight is lighter than the original version, even when auto light is off.
This can be fixed by reverting commit
176e4c253a63d581af6b21f3182d71b3026ef516 Camera1: Validate scene mode override AF mode
in frameworks/av
Searching for way to fix it in device tree.
This caused by some bug in old mipad GLES drivers. Can be resolved by using custom built webview.apk from https://github.com/manumanfred/android_external_chromium-webview
Or by updating graphics drivers. Work both on kernel and nvidia shield blobs required.
ROM: lineage-14.1-20170911-UNOFFICIAL-mocha
GApps: open_gapps-arm-7.1-mini-20200325
Root: No
For example, I turn on the device at 9:00 with 100% of battery and disonncect the power cord, then just put it there without doing anything. It dropped to 52% at 12:00.
The health of battery is 72% according to AccuBattery. The device never shut down suddenly. When I touch the back of the device at 12:00, it's a little warm at the upper-right side.
If I didn't turn on the device at 9:00 but at 12:00, it's 100%, 0 dropped.
It didn't drop so quick when using stock rom.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.