[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-developers] Microphone problem on GalaxyS with CyanogenMod
From: |
Ben Sartor |
Subject: |
Re: [Linphone-developers] Microphone problem on GalaxyS with CyanogenMod |
Date: |
Wed, 23 Oct 2013 01:49:50 +0200 |
User-agent: |
KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) |
Hi Guillaume,
thanks for your reply.
I tried the solutions from the following stackoverflow thread to detect
cyanogenmod:
http://stackoverflow.com/questions/5499217/how-to-recognize-that-cyanogenmod-
is-on-a-board/9801191
System.getProperty("os.version").toLowerCase().contains("cyanogenmod")
Does not work. With the version of cyanogenmod my friend uses (about a week
old) "os.version" showes nothing indicating CyanogenMod.
Parsing "/proc/version" works.
getPackageManager().hasSystemFeature("com.cyanogenmod.android")
Works. Probably the best way to detect cyanogenmod as
com.cyanogenmod.trebuchet uses it for detection, too. But we do not have a
Context in Hacks.java to call getPackageManager(). A patch, adding a Context
as parameter to e.g. Hacks.needGalaxySAudioHack() and handling it down
toisGT9000, would be much more invasive.
What do you think?
Best Regards
Ben
> Hi Ben,
>
> Thanks for the patch.
>
> However, I prefer if we detect CyanogenMod to disable the hack.
> How may I detect CyanogenMod?
>
>
> Guillaume
>
> On Tue, Oct 22, 2013 at 02:57:15AM +0200, Ben Sartor wrote:
> > Hi,
> >
> > thanks for linphone. It is working great at my place.
> >
> > However, a friend of mine has a problem with linphone on his GalaxyS
> > running CyanogenMod: The microphone is not working.
> >
> > Attached is a little mediastreamer2 patch, disabling AudioHacks on the
> > GalaxyS if it has at least Gingerbread. Would you mind including it?
> >
> > Of course I accept yout Contributors Agreement.
> >
> > Best Regards
> >
> > Ben
> >
> > From 4dd0ebe9dc693c7bad7bec2315d1f51a275259d0 Mon Sep 17 00:00:00 2001
> > From: Ben Sartor <address@hidden>
> > Date: Thu, 17 Oct 2013 13:53:11 +0200
> > Subject: [PATCH] Do not use galaxyS hacks if android version >=
> > Gingerbread
> >
> > since it is fixed in mods.
> >
> > ---
> >
> > java/src/org/linphone/mediastream/video/capture/hwconf/Hacks.java | 2
> > +- 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git
> > a/java/src/org/linphone/mediastream/video/capture/hwconf/Hacks.java
> > b/java/src/org/linphone/mediastream/video/capture/hwconf/Hacks.java
> > index ac22f76..ace0c9a 100644
> > --- a/java/src/org/linphone/mediastream/video/capture/hwconf/Hacks.java
> > +++ b/java/src/org/linphone/mediastream/video/capture/hwconf/Hacks.java
> > @@ -76,7 +76,7 @@ public final class Hacks {
> >
> > // Galaxy S variants
> > private static final boolean isSPHD700() {return
> > Build.DEVICE.startsWith("SPH-D700");} // Epic private static boolean
> > isSGHI896() {return Build.DEVICE.startsWith("SGH-I896");} //
Captivate
> >
> > - private static boolean isGT9000() {return
> > Build.DEVICE.startsWith("GT-I9000");} // Galaxy S + private static
> > boolean isGT9000() {return Build.DEVICE.startsWith("GT-I9000") &&
> > Version.sdkStrictlyBelow(Version.API09_GINGERBREAD_23);} // GalaxyS not
> > modded
> >
> > private static boolean isSC02B() {return
> > Build.DEVICE.startsWith("SC-02B");} // Docomo private static boolean
> > isGTP1000() {return Build.DEVICE.startsWith("GT-P1000");} // Tab
> >
> > _______________________________________________
> > Linphone-developers mailing list
> > address@hidden
> > https://lists.nongnu.org/mailman/listinfo/linphone-developers
>
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/linphone-developers