diff --git a/LenaPi/EnergySaver.cpp b/LenaPi/EnergySaver.cpp index da9db13..3d3c394 100644 --- a/LenaPi/EnergySaver.cpp +++ b/LenaPi/EnergySaver.cpp @@ -97,7 +97,7 @@ void EnergySaver::initAdroidLocks() QAndroidJniObject powerMgr = activity.callObjectMethod("getSystemService", "(Ljava/lang/String;)Ljava/lang/Object;",serviceName.object()); if ( powerMgr.isValid() ) { - jint levelAndFlags = QAndroidJniObject::getStaticField("android/os/PowerManager","SCREEN_DIM_WAKE_LOCK"); + jint levelAndFlags = QAndroidJniObject::getStaticField("android/os/PowerManager","PARTIAL_WAKE_LOCK"); QAndroidJniObject tag = QAndroidJniObject::fromString( "My Tag" ); diff --git a/LenaPi/LenaPi.pro.user b/LenaPi/LenaPi.pro.user index 73f8196..0c73fd4 100644 --- a/LenaPi/LenaPi.pro.user +++ b/LenaPi/LenaPi.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -54,6 +54,7 @@ *.md, *.MD, Makefile false true + true @@ -219,18 +220,6 @@ - true - RemoteLinux.CheckForFreeDiskSpaceStep - - - - - / - 5242880 - - - - true RemoteLinux.KillAppStep @@ -240,7 +229,7 @@ - + true RemoteLinux.RsyncDeployStep @@ -251,7 +240,7 @@ -av - 3 + 2 Deploy Deploy ProjectExplorer.BuildSteps.Deploy @@ -263,62 +252,21 @@ 1 + dwarf + + cpu-cycles + + -F true + 0 true true - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - - - 2 - - ProjectExplorer.CustomExecutableRunConfiguration - - false - true - false - true - - - true - true - true - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 1 - RemoteLinux.CustomRunConfig - + LenaPi (on %{Device:Name}) + RemoteLinuxRunConfiguration:/home/jmr/privat/src/LenaPi/LenaPi/LenaPi.pro + /home/jmr/privat/src/LenaPi/LenaPi/LenaPi.pro 1 false true @@ -326,7 +274,7 @@ true :0.0 - 2 + 1 @@ -532,8 +480,8 @@ armeabi-v7a armeabi - 58009fc2 - 28 + A209G5H30201 + 30 dwarf @@ -542,6 +490,7 @@ -F true + 0 true true @@ -570,7 +519,7 @@ desktop desktop {73308c85-3272-4fe8-8c9f-0eb72285644f} - 1 + 0 0 0 @@ -717,6 +666,7 @@ -F true + 0 true true diff --git a/LenaPi/android-files/AndroidManifest.xml b/LenaPi/android-files/AndroidManifest.xml index e0c143a..55385f3 100644 --- a/LenaPi/android-files/AndroidManifest.xml +++ b/LenaPi/android-files/AndroidManifest.xml @@ -60,7 +60,7 @@ application still try to draw after "applicationStateChanged(Qt::ApplicationSuspended)" signal is sent! --> - + diff --git a/LenaPi/controllers/NavigationController.cpp b/LenaPi/controllers/NavigationController.cpp index f3bb4ab..684bf94 100644 --- a/LenaPi/controllers/NavigationController.cpp +++ b/LenaPi/controllers/NavigationController.cpp @@ -36,7 +36,6 @@ void NavigationController::init(const QString &rootPath) auto rootDir = QDir(rootPath); if(!rootDir.exists()) return; mRootPath = rootPath; - add(mRootPath, mRootItem); mNavList->setModelItems(mRootItem->getChildren()); diff --git a/LenaPi/controllers/SettingsHandler.cpp b/LenaPi/controllers/SettingsHandler.cpp index a0f6edb..302134f 100644 --- a/LenaPi/controllers/SettingsHandler.cpp +++ b/LenaPi/controllers/SettingsHandler.cpp @@ -60,7 +60,13 @@ QString SettingsHandler::getShutdownScript() const void SettingsHandler::initDefaults() { +#ifdef ANDROID + // three out of four devices report '4' as QStandardPaths::MusicLocation + //mDefaults.insert(rootPath, "/storage/self/primary/Music"); + mDefaults.insert(rootPath, QStandardPaths::writableLocation(QStandardPaths::MusicLocation)); +#else mDefaults.insert(rootPath, QStandardPaths::MusicLocation); +#endif mDefaults.insert(enableEnergySaver, false); mDefaults.insert(timeout, 60); mDefaults.insert(shutdownScript, "/usr/local/sbin/do_shutdown.sh"); diff --git a/LenaPi/controllers/SettingsHandler.h b/LenaPi/controllers/SettingsHandler.h index 2b7cb8d..5c80603 100644 --- a/LenaPi/controllers/SettingsHandler.h +++ b/LenaPi/controllers/SettingsHandler.h @@ -31,6 +31,7 @@ public: QString getProfile() const; bool isEnergySaverEnabled() const; int getEnergySaverTimeout() const; + bool isVolumeControlsVisible() const; QString getShutdownScript() const; diff --git a/LenaPi/lenapi.qrc b/LenaPi/lenapi.qrc index 2a3ca97..f126528 100644 --- a/LenaPi/lenapi.qrc +++ b/LenaPi/lenapi.qrc @@ -11,5 +11,6 @@ resources/close.png resources/speaker_high_volume.png resources/speaker_low_volume.png + resources/pig.png diff --git a/LenaPi/main.qml b/LenaPi/main.qml index c796e43..7f8c018 100644 --- a/LenaPi/main.qml +++ b/LenaPi/main.qml @@ -15,6 +15,7 @@ Window { anchors.fill: parent z: -1 + //source: "qrc:/resources/pig.png" source: "qrc:/background" } diff --git a/LenaPi/models/UiStateModel.cpp b/LenaPi/models/UiStateModel.cpp index 98062ff..3d1ff7e 100644 --- a/LenaPi/models/UiStateModel.cpp +++ b/LenaPi/models/UiStateModel.cpp @@ -21,6 +21,7 @@ bool UiStateModel::isShowQuitAppButton() const bool UiStateModel::isShowVolumeControls() const { +// return true; //comment in as workaround for maya pi const auto & profileInfo = mProfileInfoMap[mProfile]; return profileInfo.isShowVolumeControls; } diff --git a/LenaPi/resources/pig.png b/LenaPi/resources/pig.png new file mode 100644 index 0000000..eee00bf Binary files /dev/null and b/LenaPi/resources/pig.png differ