mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Allow running on Android 5.0 but with a warning that it's unsupported
* The apk targets api level 21 which is 5.0, so it still won't install on anything older. * We pop up a big warning to the user the first time they try and select such a remote host.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!-- BEGIN_INCLUDE(manifest) -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="@RENDERDOC_ANDROID_PACKAGE_NAME@">
|
||||
|
||||
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="23"/>
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="26"/>
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
Reference in New Issue
Block a user