From 3d6bb94a9e7c80edc4b2a2321b464533a4a7f60b Mon Sep 17 00:00:00 2001 From: aavit Date: Wed, 10 Sep 2014 14:50:28 +0200 Subject: Rename DroidUtils -> B2QtUtils and refactor the API Preparing this module for being documented and presented for external users. - Renamed since this is for eLinux as well as eAndroid - Provide all settings as proper Q_PROPERTYs for easy QML access - Hide all the detailed audio stuff that's not useful for users - Implement a getter function for current backlight, so that we don't have to reset it to full every time this module is loaded - qmake now groks this as internal module, so get rid build kludges - hostname setting on eLinux fixed - getIPAddress() now returns ALL active addresses, and implentation is simplified Task-number: QTEE-704 Change-Id: I9f22d5531b5963ae7e78c840bcfe1edd6197f82a Reviewed-by: Samuli Piippo --- src/qt_hw_init/main.cpp | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'src/qt_hw_init/main.cpp') diff --git a/src/qt_hw_init/main.cpp b/src/qt_hw_init/main.cpp index 554004c..7a8b3a1 100644 --- a/src/qt_hw_init/main.cpp +++ b/src/qt_hw_init/main.cpp @@ -16,33 +16,15 @@ ** the contact form at http://qt.digia.com/ ** ****************************************************************************/ -#include "../utils/qdroidutils.h" -#include - -static void setMaxVolume(QDroidUtils *utils) -{ - // Set the audio orientation to something to force the HW driver to reconfigure - // audio routing (workaround for bug on Nexus 7) - utils->setOrientationForAudioSystem(QDroidUtils::LandscapeAudioOrientation); - utils->setMasterVolume(100); - utils->setMasterMute(false); - utils->setStreamVolume(QDroidUtils::SystemAudioStream, 100); - utils->setStreamVolume(QDroidUtils::MusicAudioStream, 100); - utils->setStreamVolume(QDroidUtils::NotificationAudioStream, 100); - utils->setStreamVolume(QDroidUtils::EnforcedAudibleAudioStream, 100); -} - -static void setDisplayBrightness(QDroidUtils *utils) -{ - utils->setDisplayBrightness(255); -} +#include "b2qtdevice.h" int main(int, char *[]) { - QDroidUtils utils; + B2QtDevice device; + + device.initAudio(); - setMaxVolume(&utils); - setDisplayBrightness(&utils); + device.setDisplayBrightness(255); return 0; } -- cgit v1.2.3