diff --git a/qrenderdoc/Code/Interface/PersistantConfig.h b/qrenderdoc/Code/Interface/PersistantConfig.h index 97a3a7a40..f24f5c12a 100644 --- a/qrenderdoc/Code/Interface/PersistantConfig.h +++ b/qrenderdoc/Code/Interface/PersistantConfig.h @@ -322,6 +322,9 @@ DECLARE_REFLECTION_STRUCT(BugReport); \ CONFIG_SETTING_VAL(public, int, int, Android_MaxConnectTimeout, 30) \ \ + CONFIG_SETTING_VAL(public, QDateTime, rdcdatetime, UnsupportedAndroid_LastUpdate, \ + rdcdatetime(2015, 01, 01)) \ + \ CONFIG_SETTING_VAL(public, bool, bool, CheckUpdate_AllowChecks, true) \ \ CONFIG_SETTING_VAL(public, bool, bool, CheckUpdate_UpdateAvailable, false) \ @@ -625,6 +628,14 @@ For more information about some of these settings that are user-facing see Defaults to ``30``. +.. data:: UnsupportedAndroid_LastUpdate + + A date containing the last time that the user was warned about an Android device being older than + is generally supported. This prevents the user being spammed if they consistently use an old + Android device. If it has been more than 3 weeks since the last time an old device was seen, we + re-warn the user, but if it's less than 3 weeks we silently update this date so continuous use + doesn't nag. + .. data:: CheckUpdate_AllowChecks ``True`` if when coloring marker regions in the :class:`EventBrowser`, the whole row should be diff --git a/qrenderdoc/Windows/MainWindow.cpp b/qrenderdoc/Windows/MainWindow.cpp index f89d554bb..6ce0518c0 100644 --- a/qrenderdoc/Windows/MainWindow.cpp +++ b/qrenderdoc/Windows/MainWindow.cpp @@ -1843,13 +1843,22 @@ void MainWindow::setRemoteHost(int hostIdx) if(host->IsADB() && !RENDERDOC_IsAndroidSupported(host->hostname.c_str())) { + // check to see if we should warn the user about this unsupported android version. GUIInvoke::call(this, [this]() { - statusText->setText(tr("Device unsupported, Android 6.0 is required.")); - contextChooser->setIcon(Icons::disconnect()); - contextChooser->setText(tr("Replay Context: Local")); - contextChooser->setEnabled(true); + QDateTime today = QDateTime::currentDateTimeUtc(); + QDateTime compare = today.addDays(-21); + + if(compare > m_Ctx.Config().UnsupportedAndroid_LastUpdate) + { + RDDialog::critical( + this, tr("Unsupported Device Android Version"), + tr("This device is older than Android 6.0, the minimum required version for " + "RenderDoc.\n\nThis may break or cause unknown problems - use at your own " + "risk.")); + } + + m_Ctx.Config().UnsupportedAndroid_LastUpdate = today; }); - return; } if(!host->serverRunning && !host->runCommand.isEmpty()) diff --git a/renderdoc/android/android.cpp b/renderdoc/android/android.cpp index c74da6dff..1cf943a90 100644 --- a/renderdoc/android/android.cpp +++ b/renderdoc/android/android.cpp @@ -619,9 +619,6 @@ extern "C" RENDERDOC_API ReplayStatus RENDERDOC_CC RENDERDOC_StartAndroidRemoteS Android::ExtractDeviceIDAndIndex(device, index, deviceID); - if(!Android::IsSupported(deviceID)) - return ReplayStatus::UnknownError; - std::string packagesOutput = trim( Android::adbExecCommand(deviceID, "shell pm list packages " RENDERDOC_ANDROID_PACKAGE_BASE) .strStdout); diff --git a/renderdoc/android/android_utils.cpp b/renderdoc/android/android_utils.cpp index f09e89dec..7a0507166 100644 --- a/renderdoc/android/android_utils.cpp +++ b/renderdoc/android/android_utils.cpp @@ -142,7 +142,11 @@ bool IsSupported(std::string deviceID) // SDK 23 == Android 6.0, our minimum spec. Only fail if we did parse an SDK string, in case some // Android devices don't support the query - we assume they are new enough. if(apiVersion >= 0 && apiVersion < 23) + { + RDCWARN("Device '%s' is on api version %d which is not supported", + GetFriendlyName(deviceID).c_str(), apiVersion); return false; + } return true; } @@ -170,7 +174,7 @@ std::string GetFriendlyName(std::string deviceID) combined = manuf + " " + model; if(!IsSupported(deviceID)) - combined += " - Unsupported"; + combined += " - (Android 5.x)"; return combined; } diff --git a/renderdoccmd/android/AndroidManifest.xml b/renderdoccmd/android/AndroidManifest.xml index c19b2a317..f9ac6af99 100644 --- a/renderdoccmd/android/AndroidManifest.xml +++ b/renderdoccmd/android/AndroidManifest.xml @@ -2,7 +2,7 @@ - +