Merge ~ondrak/libhybris/+git/libhybris:phablet-5.x into ~libhybris-maintainers/libhybris/+git/libhybris:stable

Proposed by Ondrej Kubik
Status: Needs review
Proposed branch: ~ondrak/libhybris/+git/libhybris:phablet-5.x
Merge into: ~libhybris-maintainers/libhybris/+git/libhybris:stable
Diff against target: 128 lines (+52/-1)
4 files modified
compat/media/media_recorder_client.cpp (+2/-0)
compat/media/media_recorder_client.h (+2/-0)
hybris/tests/Makefile.am (+17/-1)
hybris/tests/test_egl_init.c (+31/-0)
Reviewer Review Type Date Requested Status
You-Sheng Yang (community) Needs Fixing
Simon Fels Pending
Review via email: mp+281741@code.launchpad.net

Description of the change

Adding changes to support Android 5.x
 - Compiling test_audio only with non Android 5 headers
 - Adding test_egl_init test
 - Fixing compile error for media recorder in Anroid 5.x

To post a comment you must log in.
Revision history for this message
You-Sheng Yang (vicamo) wrote :

Besides, I don't think anyone should propose a merge into the stable branch.

review: Needs Fixing
Revision history for this message
Simon Fels (morphis) wrote :

Unmerged commits

17952e7... by Ondrej Kubik

Compiling test_audio only with non Android 5 headers

Signed-off-by: Ondrej Kubik <email address hidden>

e618eb5... by Ondrej Kubik

Adding test_egl_init test

Signed-off-by: Ondrej Kubik <email address hidden>

7e919d5... by Ondrej Kubik

Fixing compile error for media recorder in Anroid 5.x

Signed-off-by: Ondrej Kubik <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/compat/media/media_recorder_client.cpp b/compat/media/media_recorder_client.cpp
index 896bec8..bcaf886 100644
--- a/compat/media/media_recorder_client.cpp
+++ b/compat/media/media_recorder_client.cpp
@@ -254,6 +254,7 @@ status_t MediaRecorderClient::stop()
254 return recorder->stop();254 return recorder->stop();
255}255}
256256
257#if ANDROID_VERSION_MAJOR==4
257status_t MediaRecorderClient::pause()258status_t MediaRecorderClient::pause()
258{259{
259 REPORT_FUNCTION();260 REPORT_FUNCTION();
@@ -265,6 +266,7 @@ status_t MediaRecorderClient::pause()
265 return recorder->pause();266 return recorder->pause();
266267
267}268}
269#endif
268270
269status_t MediaRecorderClient::reset()271status_t MediaRecorderClient::reset()
270{272{
diff --git a/compat/media/media_recorder_client.h b/compat/media/media_recorder_client.h
index d5c3eb6..a165e65 100644
--- a/compat/media/media_recorder_client.h
+++ b/compat/media/media_recorder_client.h
@@ -60,7 +60,9 @@ public:
60 virtual status_t getMaxAmplitude(int* max);60 virtual status_t getMaxAmplitude(int* max);
61 virtual status_t start();61 virtual status_t start();
62 virtual status_t stop();62 virtual status_t stop();
63#if ANDROID_VERSION_MAJOR==4
63 virtual status_t pause();64 virtual status_t pause();
65#endif
64 virtual status_t reset();66 virtual status_t reset();
65 virtual status_t init();67 virtual status_t init();
66 virtual status_t close();68 virtual status_t close();
diff --git a/hybris/tests/Makefile.am b/hybris/tests/Makefile.am
index 7ed6335..a2b4d69 100644
--- a/hybris/tests/Makefile.am
+++ b/hybris/tests/Makefile.am
@@ -1,6 +1,6 @@
1bin_PROGRAMS = \1bin_PROGRAMS = \
2 test_audio \
3 test_egl \2 test_egl \
3 test_egl_init \
4 test_egl_configs \4 test_egl_configs \
5 test_glesv2 \5 test_glesv2 \
6 test_ui \6 test_ui \
@@ -15,6 +15,11 @@ bin_PROGRAMS = \
15 test_gps \15 test_gps \
16 test_wifi16 test_wifi
1717
18if !HAS_ANDROID_5_0_0
19bin_PROGRAMS += \
20 test_audio
21endif
22
18if HAS_ANDROID_4_2_023if HAS_ANDROID_4_2_0
19bin_PROGRAMS += test_hwcomposer24bin_PROGRAMS += test_hwcomposer
20endif25endif
@@ -33,6 +38,7 @@ endif
33# bin_PROGRAMS += test_audio 38# bin_PROGRAMS += test_audio
34# endif39# endif
3540
41if !HAS_ANDROID_5_0_0
36test_audio_SOURCES = test_audio.c42test_audio_SOURCES = test_audio.c
37test_audio_CFLAGS = \43test_audio_CFLAGS = \
38 -I$(top_srcdir)/include \44 -I$(top_srcdir)/include \
@@ -40,6 +46,7 @@ test_audio_CFLAGS = \
40test_audio_LDADD = \46test_audio_LDADD = \
41 $(top_builddir)/common/libhybris-common.la \47 $(top_builddir)/common/libhybris-common.la \
42 $(top_builddir)/hardware/libhardware.la48 $(top_builddir)/hardware/libhardware.la
49endif
4350
44test_egl_SOURCES = test_egl.c51test_egl_SOURCES = test_egl.c
45test_egl_CFLAGS = \52test_egl_CFLAGS = \
@@ -62,6 +69,15 @@ test_egl_configs_LDADD = \
62 $(top_builddir)/common/libhybris-common.la \69 $(top_builddir)/common/libhybris-common.la \
63 $(top_builddir)/egl/libEGL.la70 $(top_builddir)/egl/libEGL.la
6471
72test_egl_init_SOURCES = test_egl_init.c
73test_egl_init_CFLAGS = \
74 -I$(top_srcdir)/include \
75 $(ANDROID_HEADERS_CFLAGS) \
76 -I$(top_srcdir)/egl/platforms/common
77test_egl_init_LDADD = \
78 $(top_builddir)/common/libhybris-common.la \
79 $(top_builddir)/egl/libEGL.la
80
65test_glesv2_SOURCES = test_glesv2.c81test_glesv2_SOURCES = test_glesv2.c
66test_glesv2_CFLAGS = \82test_glesv2_CFLAGS = \
67 -I$(top_srcdir)/include \83 -I$(top_srcdir)/include \
diff --git a/hybris/tests/test_egl_init.c b/hybris/tests/test_egl_init.c
68new file mode 10064484new file mode 100644
index 0000000..1403c12
--- /dev/null
+++ b/hybris/tests/test_egl_init.c
@@ -0,0 +1,31 @@
1/*
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16#include <EGL/egl.h>
17#include <stdio.h>
18#include <unistd.h>
19
20int main(int argc, char **argv)
21{
22 EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
23 printf("eglGetDisplay returns %p\n", display);
24
25 EGLint major = 0, minor = 0;
26 EGLBoolean rc = eglInitialize(display, &major, &minor);
27 printf("eglInitialize returns %i\n", rc);
28
29 sleep(10);
30 return 0;
31}
0\ No newline at end of file32\ No newline at end of file

Subscribers

People subscribed via source and target branches