Merge lp:~osomon/oxide/pa-context-app-name into lp:~oxide-developers/oxide/oxide.trunk

Proposed by Olivier Tilloy on 2015-09-10
Status: Merged
Merged at revision: 1193
Proposed branch: lp:~osomon/oxide/pa-context-app-name
Merge into: lp:~oxide-developers/oxide/oxide.trunk
Diff against target: 51 lines (+21/-0)
3 files modified
patches/pa-context-application-name.patch (+16/-0)
patches/series (+1/-0)
shared/browser/oxide_browser_main_parts.cc (+4/-0)
To merge this branch: bzr merge lp:~osomon/oxide/pa-context-app-name
Reviewer Review Type Date Requested Status
Chris Coulson 2015-09-10 Approve on 2015-09-10
Review via email: mp+270721@code.launchpad.net

Commit message

Use the application name for the pulse audio context.

Description of the change

Note: unfortunately I haven’t been able to verify that this actually works, as it seems the behaviour of the trust store on ubuntu touch devices has changed, I don’t get prompted for microphone permission access from unconfined apps like the browser (this used to be the case, see the description of bug #1486645).

I don’t know of a way to list open pulse audio contexts, which I guess would prove that the right name is being used.

To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'patches/pa-context-application-name.patch'
2--- patches/pa-context-application-name.patch 1970-01-01 00:00:00 +0000
3+++ patches/pa-context-application-name.patch 2015-09-10 17:54:23 +0000
4@@ -0,0 +1,16 @@
5+# Description: Use the application name for the pulse audio context
6+# Bug: https://launchpad.net/bugs/1486645
7+# Author: Olivier Tilloy <olivier.tilloy@canonical.com>
8+
9+diff --git a/media/audio/pulse/audio_manager_pulse.cc b/media/audio/pulse/audio_manager_pulse.cc
10+--- a/media/audio/pulse/audio_manager_pulse.cc
11++++ b/media/audio/pulse/audio_manager_pulse.cc
12+@@ -248,7 +248,7 @@
13+
14+ pa_mainloop_api* pa_mainloop_api =
15+ pa_threaded_mainloop_get_api(input_mainloop_);
16+- input_context_ = pa_context_new(pa_mainloop_api, "Chrome input");
17++ input_context_ = pa_context_new(pa_mainloop_api, GetGlobalAppName().c_str());
18+ if (!input_context_)
19+ return false;
20+
21
22=== modified file 'patches/series'
23--- patches/series 2015-09-01 21:41:24 +0000
24+++ patches/series 2015-09-10 17:54:23 +0000
25@@ -35,3 +35,4 @@
26 enable-optional-neon-for-skia.patch
27 add-suggested-filename-to-download-starting-resource-delegate.patch
28 always-define-angle-commit-hash.patch
29+pa-context-application-name.patch
30
31=== modified file 'shared/browser/oxide_browser_main_parts.cc'
32--- shared/browser/oxide_browser_main_parts.cc 2015-07-27 16:40:33 +0000
33+++ shared/browser/oxide_browser_main_parts.cc 2015-09-10 17:54:23 +0000
34@@ -25,6 +25,7 @@
35 #include "EGL/egl.h"
36 #include "gpu/config/gpu_driver_bug_workaround_type.h"
37 #include "gpu/config/gpu_info_collector.h"
38+#include "media/audio/audio_manager.h"
39 #include "net/base/net_module.h"
40 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
41 #include "ui/gfx/display.h"
42@@ -259,6 +260,9 @@
43 }
44
45 void BrowserMainParts::PreMainMessageLoopRun() {
46+ media::AudioManager::SetGlobalAppName(
47+ BrowserPlatformIntegration::GetInstance()->GetApplicationName());
48+
49 // With in-process GPU, nothing calls CollectContextGraphicsInfo, so we do
50 // this now. Note that this will have no effect on driver bug workarounds
51 // (those are added to the command line from the basic info found in

Subscribers

People subscribed via source and target branches