[mythtv-commits] Ticket #13229: Android frontend needs a HostName
MythTV
noreply at mythtv.org
Sun Mar 4 19:39:51 UTC 2018
#13229: Android frontend needs a HostName
----------------------------------+-----------------------------
Reporter: pbennett | Owner: pbennett
Type: Bug Report - General | Status: accepted
Priority: minor | Milestone: 30.0
Component: Ports - Android | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
----------------------------------+-----------------------------
Comment (by pbennett):
> Replace both includes with
> #include <QtAndroidExtras>
> Replace the first call with
> QAndroidJniObject activity = QtAndroid::androidActivity();
I changed the includes and the call to get the activity as you suggested.
> I usually don't bother with exception checking.
I changed it to use a macro to make the exception checking a little less
intrusive. What happens if there is an exception and you don't clear it?
It seems like bad things may happen later?
> Also Im not sure you need an object since the final is a static object
method call. Not sure whats required in this case.
The call to android/provider/Settings$Secure is a static call but it
requires you to pass in a !ContentResolver object. It is a bit weird.
Proper object-oriented code would let you just call a method on the
!ContentResolver object. (I would think - but I am no Android expert).
> The string param in the last call could probably be just a literal.
Replacing myID.object<jstring>() with "android-id" causes a crash with
signal 33 at the point where it does that call. Nothing useful shows in
the backtrace. Is that what you had proposed, or did I misunderstand?
Updated patch is attached.
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13229#comment:5>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list