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
1diff --git a/compat/media/media_recorder_client.cpp b/compat/media/media_recorder_client.cpp
2index 896bec8..bcaf886 100644
3--- a/compat/media/media_recorder_client.cpp
4+++ b/compat/media/media_recorder_client.cpp
5@@ -254,6 +254,7 @@ status_t MediaRecorderClient::stop()
6 return recorder->stop();
7 }
8
9+#if ANDROID_VERSION_MAJOR==4
10 status_t MediaRecorderClient::pause()
11 {
12 REPORT_FUNCTION();
13@@ -265,6 +266,7 @@ status_t MediaRecorderClient::pause()
14 return recorder->pause();
15
16 }
17+#endif
18
19 status_t MediaRecorderClient::reset()
20 {
21diff --git a/compat/media/media_recorder_client.h b/compat/media/media_recorder_client.h
22index d5c3eb6..a165e65 100644
23--- a/compat/media/media_recorder_client.h
24+++ b/compat/media/media_recorder_client.h
25@@ -60,7 +60,9 @@ public:
26 virtual status_t getMaxAmplitude(int* max);
27 virtual status_t start();
28 virtual status_t stop();
29+#if ANDROID_VERSION_MAJOR==4
30 virtual status_t pause();
31+#endif
32 virtual status_t reset();
33 virtual status_t init();
34 virtual status_t close();
35diff --git a/hybris/tests/Makefile.am b/hybris/tests/Makefile.am
36index 7ed6335..a2b4d69 100644
37--- a/hybris/tests/Makefile.am
38+++ b/hybris/tests/Makefile.am
39@@ -1,6 +1,6 @@
40 bin_PROGRAMS = \
41- test_audio \
42 test_egl \
43+ test_egl_init \
44 test_egl_configs \
45 test_glesv2 \
46 test_ui \
47@@ -15,6 +15,11 @@ bin_PROGRAMS = \
48 test_gps \
49 test_wifi
50
51+if !HAS_ANDROID_5_0_0
52+bin_PROGRAMS += \
53+ test_audio
54+endif
55+
56 if HAS_ANDROID_4_2_0
57 bin_PROGRAMS += test_hwcomposer
58 endif
59@@ -33,6 +38,7 @@ endif
60 # bin_PROGRAMS += test_audio
61 # endif
62
63+if !HAS_ANDROID_5_0_0
64 test_audio_SOURCES = test_audio.c
65 test_audio_CFLAGS = \
66 -I$(top_srcdir)/include \
67@@ -40,6 +46,7 @@ test_audio_CFLAGS = \
68 test_audio_LDADD = \
69 $(top_builddir)/common/libhybris-common.la \
70 $(top_builddir)/hardware/libhardware.la
71+endif
72
73 test_egl_SOURCES = test_egl.c
74 test_egl_CFLAGS = \
75@@ -62,6 +69,15 @@ test_egl_configs_LDADD = \
76 $(top_builddir)/common/libhybris-common.la \
77 $(top_builddir)/egl/libEGL.la
78
79+test_egl_init_SOURCES = test_egl_init.c
80+test_egl_init_CFLAGS = \
81+ -I$(top_srcdir)/include \
82+ $(ANDROID_HEADERS_CFLAGS) \
83+ -I$(top_srcdir)/egl/platforms/common
84+test_egl_init_LDADD = \
85+ $(top_builddir)/common/libhybris-common.la \
86+ $(top_builddir)/egl/libEGL.la
87+
88 test_glesv2_SOURCES = test_glesv2.c
89 test_glesv2_CFLAGS = \
90 -I$(top_srcdir)/include \
91diff --git a/hybris/tests/test_egl_init.c b/hybris/tests/test_egl_init.c
92new file mode 100644
93index 0000000..1403c12
94--- /dev/null
95+++ b/hybris/tests/test_egl_init.c
96@@ -0,0 +1,31 @@
97+/*
98+ *
99+ * Licensed under the Apache License, Version 2.0 (the "License");
100+ * you may not use this file except in compliance with the License.
101+ * You may obtain a copy of the License at
102+ *
103+ * http://www.apache.org/licenses/LICENSE-2.0
104+ *
105+ * Unless required by applicable law or agreed to in writing, software
106+ * distributed under the License is distributed on an "AS IS" BASIS,
107+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
108+ * See the License for the specific language governing permissions and
109+ * limitations under the License.
110+ *
111+ */
112+#include <EGL/egl.h>
113+#include <stdio.h>
114+#include <unistd.h>
115+
116+int main(int argc, char **argv)
117+{
118+ EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
119+ printf("eglGetDisplay returns %p\n", display);
120+
121+ EGLint major = 0, minor = 0;
122+ EGLBoolean rc = eglInitialize(display, &major, &minor);
123+ printf("eglInitialize returns %i\n", rc);
124+
125+ sleep(10);
126+ return 0;
127+}
128\ No newline at end of file

Subscribers

People subscribed via source and target branches