From 9d8c8c80db113bef2f07ca7d2ee17cc8f9d80b70 Mon Sep 17 00:00:00 2001
From: Assam Boudjelthia <assam.boudjelthia@qt.io>
Date: Tue, 16 Jun 2020 12:03:41 +0300
Subject: [PATCH] Remove ministro code

Since Ministro no longer work on recent Android versions (Android 8+),
and it hasn't been maintained and the repos are not updated, the
existing code is practically a dead code.

[ChangeLog][Android] Remove ministro code since it's been unmaintained
and not working with recent Android versions.

Task-number: QTBUG-85201
Change-Id: I18d7b1e209cba3cfd04674060e9bf39aa5a5510f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
(cherry picked from commit af6bc5a21bbef6a5870f8e49c2cc70c53d4fa352)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../qt5/android/QtActivityDelegate.java       |   6 -
 src/android/java/res/values-de/strings.xml    |   2 -
 src/android/java/res/values-el/strings.xml    |   2 -
 src/android/java/res/values-es/strings.xml    |   2 -
 src/android/java/res/values-et/strings.xml    |   2 -
 src/android/java/res/values-fa/strings.xml    |   2 -
 src/android/java/res/values-fr/strings.xml    |   2 -
 src/android/java/res/values-in/strings.xml    |   2 -
 src/android/java/res/values-it/strings.xml    |   2 -
 src/android/java/res/values-ja/strings.xml    |   2 -
 src/android/java/res/values-ms/strings.xml    |   2 -
 src/android/java/res/values-nb/strings.xml    |   2 -
 src/android/java/res/values-nl/strings.xml    |   2 -
 src/android/java/res/values-pl/strings.xml    |   2 -
 .../java/res/values-pt-rBR/strings.xml        |   2 -
 src/android/java/res/values-ro/strings.xml    |   2 -
 src/android/java/res/values-ru/strings.xml    |   2 -
 src/android/java/res/values-se/strings.xml    |   2 -
 .../java/res/values-zh-rCN/strings.xml        |   2 -
 .../java/res/values-zh-rTW/strings.xml        |   2 -
 src/android/java/res/values/strings.xml       |   2 -
 .../kde/necessitas/ministro/IMinistro.aidl    |  60 -------
 .../ministro/IMinistroCallback.aidl           |  65 --------
 .../qt5/android/bindings/QtActivity.java      |   2 -
 .../android/bindings/QtActivityLoader.java    |  26 ----
 .../qt5/android/bindings/QtLoader.java        | 146 +-----------------
 src/android/templates/AndroidManifest.xml     |   5 -
 src/android/templates/res/values/libs.xml     |   4 -
 src/network/ssl/qsslsocket_openssl.cpp        |   3 +-
 .../android/qandroidplatformtheme.cpp         |  10 +-
 src/tools/androiddeployqt/main.cpp            |  24 +--
 31 files changed, 13 insertions(+), 378 deletions(-)
 delete mode 100644 src/android/java/src/org/kde/necessitas/ministro/IMinistro.aidl
 delete mode 100644 src/android/java/src/org/kde/necessitas/ministro/IMinistroCallback.aidl

diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
index 1218164d05..66a1c02e0b 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
@@ -120,7 +120,6 @@ public class QtActivityDelegate
     private static final String ENVIRONMENT_VARIABLES_KEY = "environment.variables";
     private static final String APPLICATION_PARAMETERS_KEY = "application.parameters";
     private static final String STATIC_INIT_CLASSES_KEY = "static.init.classes";
-    private static final String NECESSITAS_API_LEVEL_KEY = "necessitas.api.level";
     private static final String EXTRACT_STYLE_KEY = "extract.android.style";
     private static final String EXTRACT_STYLE_MINIMAL_KEY = "extract.android.style.option";
 
@@ -734,14 +733,9 @@ public class QtActivityDelegate
                                                loaderParams.getBoolean(EXTRACT_STYLE_MINIMAL_KEY));
         }
 
-        int necessitasApiLevel = 1;
-        if (loaderParams.containsKey(NECESSITAS_API_LEVEL_KEY))
-            necessitasApiLevel = loaderParams.getInt(NECESSITAS_API_LEVEL_KEY);
-
         m_environmentVariables = loaderParams.getString(ENVIRONMENT_VARIABLES_KEY);
         String additionalEnvironmentVariables = "QT_ANDROID_FONTS_MONOSPACE=Droid Sans Mono;Droid Sans;Droid Sans Fallback"
                                               + "\tQT_ANDROID_FONTS_SERIF=Droid Serif"
-                                              + "\tNECESSITAS_API_LEVEL=" + necessitasApiLevel
                                               + "\tHOME=" + m_activity.getFilesDir().getAbsolutePath()
                                               + "\tTMPDIR=" + m_activity.getFilesDir().getAbsolutePath();
 
diff --git a/src/android/java/res/values-de/strings.xml b/src/android/java/res/values-de/strings.xml
index 21881ec97f..55b927ebff 100644
--- a/src/android/java/res/values-de/strings.xml
+++ b/src/android/java/res/values-de/strings.xml
@@ -1,7 +1,5 @@
 ﻿<?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Ministro-Dienst wurde nicht gefunden.\nAnwendung kann nicht gestartet werden</string>
-    <string name="ministro_needed_msg">Diese Anwendung benötigt den Ministro-Dienst. Möchten Sie ihn installieren?</string>
     <string name="fatal_error_msg">In Ihrer Anwendung ist ein schwerwiegender Fehler aufgetreten, sie kann nicht fortgesetzt werden</string>
     <string name="unsupported_android_version">Diese Android-Version wird nicht unterstützt.</string>
 </resources>
diff --git a/src/android/java/res/values-el/strings.xml b/src/android/java/res/values-el/strings.xml
index 42b2b3b49d..9dd0973f2d 100644
--- a/src/android/java/res/values-el/strings.xml
+++ b/src/android/java/res/values-el/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Δεν ήταν δυνατή η εύρεση της υπηρεσίας Ministro. Δεν είναι δυνατή η εκκίνηση της εφαρμογής.</string>
-    <string name="ministro_needed_msg">Η εφαρμογή απαιτεί την υπηρεσία Ministro. Να εγκατασταθεί η υπηρεσία?</string>
     <string name="fatal_error_msg">Παρουσιάστηκε ένα κρίσιμο σφάλμα και η εφαρμογή δεν μπορεί να συνεχίσει.</string>
     <string name="unsupported_android_version">Αυτή η έκδοση του Android δεν υποστηρίζεται.</string>
 </resources>
diff --git a/src/android/java/res/values-es/strings.xml b/src/android/java/res/values-es/strings.xml
index 1da33a6444..ee991e15f5 100644
--- a/src/android/java/res/values-es/strings.xml
+++ b/src/android/java/res/values-es/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Servicio Ministro inesistente. Imposible ejecutar la aplicación.</string>
-    <string name="ministro_needed_msg">Esta aplicación requiere el servicio Ministro. Instalarlo?</string>
     <string name="fatal_error_msg">La aplicación ha causado un error grave y no es posible continuar.</string>
     <string name="unsupported_android_version">Esta versión de Android no es compatible.</string>
 </resources>
diff --git a/src/android/java/res/values-et/strings.xml b/src/android/java/res/values-et/strings.xml
index 9620fd2bc8..9c5b430961 100644
--- a/src/android/java/res/values-et/strings.xml
+++ b/src/android/java/res/values-et/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Ei suuda leida Ministro teenust.\nProgrammi ei saa käivitada.</string>
-    <string name="ministro_needed_msg">See programm vajab Ministro teenust.\nKas soovite paigaldada?</string>
     <string name="fatal_error_msg">Programmiga juhtus fataalne viga.\nKahjuks ei saa jätkata.</string>
     <string name="unsupported_android_version">Seda Androidi versiooni ei toetata.</string>
 </resources>
diff --git a/src/android/java/res/values-fa/strings.xml b/src/android/java/res/values-fa/strings.xml
index d1ee06118a..0c88c7b1a1 100644
--- a/src/android/java/res/values-fa/strings.xml
+++ b/src/android/java/res/values-fa/strings.xml
@@ -1,7 +1,5 @@
 ﻿<?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">سرویس Ministro را پیدا نمی‌کند. برنامه نمی‌تواند آغاز شود.</string>
-    <string name="ministro_needed_msg">این نرم‌افزار به سرویس Ministro احتیاج دارد. آیا دوست دارید آن را نصب کنید؟</string>
     <string name="fatal_error_msg">خطایی اساسی در برنامه‌تان رخ داد و اجرای برنامه نمی‌تواند ادامه یابد.</string>
     <string name="unsupported_android_version">این نسخه از Android پشتیبانی نمی شود</string>
 </resources>
diff --git a/src/android/java/res/values-fr/strings.xml b/src/android/java/res/values-fr/strings.xml
index ce8e5f5af1..c3717f377d 100644
--- a/src/android/java/res/values-fr/strings.xml
+++ b/src/android/java/res/values-fr/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Le service Ministro est introuvable.\nL\'application ne peut pas démarrer.</string>
-    <string name="ministro_needed_msg">Cette application requiert le service Ministro. Voulez-vous l\'installer?</string>
     <string name="fatal_error_msg">Votre application a rencontré une erreur fatale et ne peut pas continuer.</string>
     <string name="unsupported_android_version">Cette version d\'Android n\'est pas supportée.</string>
 </resources>
diff --git a/src/android/java/res/values-in/strings.xml b/src/android/java/res/values-in/strings.xml
index b25f568ee9..3499dd3ef1 100644
--- a/src/android/java/res/values-in/strings.xml
+++ b/src/android/java/res/values-in/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Layanan Ministro tidak bisa ditemukan.\nAplikasi tidak bisa dimulai.</string>
-    <string name="ministro_needed_msg">Aplikasi ini membutuhkan layanan Ministro. Apakah Anda ingin menginstalnya?</string>
     <string name="fatal_error_msg">Aplikasi Anda mengalami kesalahan fatal dan tidak dapat melanjutkan.</string>
     <string name="unsupported_android_version">Versi Android ini tidak didukung.</string>
 </resources>
diff --git a/src/android/java/res/values-it/strings.xml b/src/android/java/res/values-it/strings.xml
index 9ba5fe2b1c..f93fa1cac7 100644
--- a/src/android/java/res/values-it/strings.xml
+++ b/src/android/java/res/values-it/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Servizio Ministro inesistente. Impossibile eseguire \nl\'applicazione.</string>
-    <string name="ministro_needed_msg">Questa applicazione richiede il servizio Ministro.Installarlo?</string>
     <string name="fatal_error_msg">L\'applicazione ha provocato un errore grave e non puo\' continuare.</string>
     <string name="unsupported_android_version">Questa versione di Android non è supportata.</string>
 </resources>
diff --git a/src/android/java/res/values-ja/strings.xml b/src/android/java/res/values-ja/strings.xml
index 40da7dce48..f8888b407c 100644
--- a/src/android/java/res/values-ja/strings.xml
+++ b/src/android/java/res/values-ja/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Ministroサービスが見つかりません。\nアプリケーションが起動できません。</string>
-    <string name="ministro_needed_msg">このアプリケーションにはMinistroサービスが必要です。 インストールしてもよろしいですか？</string>
     <string name="fatal_error_msg">アプリケーションで致命的なエラーが発生したため続行できません。</string>
     <string name="unsupported_android_version">このバージョンのAndroidはサポートされていません。</string>
 </resources>
diff --git a/src/android/java/res/values-ms/strings.xml b/src/android/java/res/values-ms/strings.xml
index bd27890eb2..bbf90de357 100644
--- a/src/android/java/res/values-ms/strings.xml
+++ b/src/android/java/res/values-ms/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Tidak jumpa servis Ministro.\nAplikasi tidak boleh dimulakan.</string>
-    <string name="ministro_needed_msg">Aplikasi ini memerlukan servis Ministro. Adakah anda ingin pasang servis itu?</string>
     <string name="fatal_error_msg">Aplikasi anda menemui ralat muat dan tidak boleh diteruskan.</string>
     <string name="unsupported_android_version">Versi Android ini tidak disokong.</string>
 </resources>
diff --git a/src/android/java/res/values-nb/strings.xml b/src/android/java/res/values-nb/strings.xml
index 53529b7f52..a66e997853 100644
--- a/src/android/java/res/values-nb/strings.xml
+++ b/src/android/java/res/values-nb/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Kan ikke finne tjenesten Ministro. Applikasjonen kan ikke starte.</string>
-    <string name="ministro_needed_msg">Denne applikasjonen krever tjenesten Ministro. Vil du installere denne?</string>
     <string name="fatal_error_msg">Applikasjonen fikk en kritisk feil og kan ikke fortsette</string>
     <string name="unsupported_android_version">Denne versjonen av Android støttes ikke.</string>
 </resources>
diff --git a/src/android/java/res/values-nl/strings.xml b/src/android/java/res/values-nl/strings.xml
index 7e54587f61..9f4d166035 100644
--- a/src/android/java/res/values-nl/strings.xml
+++ b/src/android/java/res/values-nl/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">De Ministro service is niet gevonden.\nDe applicatie kan niet starten.</string>
-    <string name="ministro_needed_msg">Deze applicatie maakt gebruik van de Ministro service. Wilt u deze installeren?</string>
     <string name="fatal_error_msg">Er is een fatale fout in de applicatie opgetreden. De applicatie kan niet verder gaan.</string>
     <string name="unsupported_android_version">Deze versie van Android wordt niet ondersteund.</string>
 </resources>
diff --git a/src/android/java/res/values-pl/strings.xml b/src/android/java/res/values-pl/strings.xml
index e7feb01392..abbd2f6394 100644
--- a/src/android/java/res/values-pl/strings.xml
+++ b/src/android/java/res/values-pl/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Usługa Ministro nie została znaleziona.\nAplikacja nie może zostać uruchomiona.</string>
-    <string name="ministro_needed_msg">Aplikacja wymaga usługi Ministro. Czy chcesz ją zainstalować?</string>
     <string name="fatal_error_msg">Wystąpił błąd krytyczny. Aplikacja zostanie zamknięta.</string>
     <string name="unsupported_android_version">Ta wersja Androida nie jest obsługiwana.</string>
 </resources>
diff --git a/src/android/java/res/values-pt-rBR/strings.xml b/src/android/java/res/values-pt-rBR/strings.xml
index 4bac77c784..8a07b7e68a 100644
--- a/src/android/java/res/values-pt-rBR/strings.xml
+++ b/src/android/java/res/values-pt-rBR/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Não foi possível encontrar o serviço Ministro.\nA aplicação não pode iniciar.</string>
-    <string name="ministro_needed_msg">Essa aplicação requer o serviço Ministro. Gostaria de instalá-lo?</string>
     <string name="fatal_error_msg">Sua aplicação encontrou um erro fatal e não pode continuar.</string>
     <string name="unsupported_android_version">Esta versão do Android não é suportada.</string>
 </resources>
diff --git a/src/android/java/res/values-ro/strings.xml b/src/android/java/res/values-ro/strings.xml
index d55c5b5c38..033f743cf4 100644
--- a/src/android/java/res/values-ro/strings.xml
+++ b/src/android/java/res/values-ro/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Serviciul Ministro nu poate fi găsit.\nAplicaţia nu poate porni.</string>
-    <string name="ministro_needed_msg">Această aplicaţie necesită serviciul Ministro.\nDoriţi să-l instalaţi?</string>
     <string name="fatal_error_msg">Aplicaţia dumneavoastră a întâmpinat o eroare fatală şi nu poate continua.</string>
     <string name="unsupported_android_version">Această versiune de Android nu este suportată.</string>
 </resources>
diff --git a/src/android/java/res/values-ru/strings.xml b/src/android/java/res/values-ru/strings.xml
index ec853d22f9..73344c8f9b 100644
--- a/src/android/java/res/values-ru/strings.xml
+++ b/src/android/java/res/values-ru/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Сервис Ministro не найден.\nПриложение нельзя запустить.</string>
-    <string name="ministro_needed_msg">Этому приложению необходим сервис Ministro. Вы хотите его установить?</string>
     <string name="fatal_error_msg">Ваше приложение столкнулось с фатальной ошибкой и не может более работать.</string>
     <string name="unsupported_android_version">Эта версия Android не поддерживается.</string>
 </resources>
diff --git a/src/android/java/res/values-se/strings.xml b/src/android/java/res/values-se/strings.xml
index 2a1e8284ce..f0927eee1f 100644
--- a/src/android/java/res/values-se/strings.xml
+++ b/src/android/java/res/values-se/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">Ministro servise nije pronađen. Aplikacija ne može biti pokrenuta.</string>
-    <string name="ministro_needed_msg">Ova aplikacija zahteva Ministro servis. Želite li da ga instalirate?</string>
     <string name="fatal_error_msg">Vaša aplikacija je naišla na fatalnu grešku i ne može nastaviti sa radom.</string>
     <string name="unsupported_android_version">Ova verzija Android-a nije podržana.</string>
 </resources>
diff --git a/src/android/java/res/values-zh-rCN/strings.xml b/src/android/java/res/values-zh-rCN/strings.xml
index 58cdd89946..d63fb0a1f2 100644
--- a/src/android/java/res/values-zh-rCN/strings.xml
+++ b/src/android/java/res/values-zh-rCN/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">无法找到Ministro服务。\n应用程序无法启动。</string>
-    <string name="ministro_needed_msg">此应用程序需要Ministro服务。您想安装它吗？</string>
     <string name="fatal_error_msg">您的应用程序遇到一个致命错误导致它无法继续。</string>
     <string name="unsupported_android_version">这个版本的安卓系统不被支持。</string>
 </resources>
diff --git a/src/android/java/res/values-zh-rTW/strings.xml b/src/android/java/res/values-zh-rTW/strings.xml
index 81d2bebdee..e6dcaac27a 100644
--- a/src/android/java/res/values-zh-rTW/strings.xml
+++ b/src/android/java/res/values-zh-rTW/strings.xml
@@ -1,7 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <string name="ministro_not_found_msg">無法找到Ministro服務。\n應用程序無法啟動。</string>
-    <string name="ministro_needed_msg">此應用程序需要Ministro服務。您想安裝它嗎？</string>
     <string name="fatal_error_msg">您的應用程序遇到一個致命錯誤導致它無法繼續。</string>
     <string name="unsupported_android_version">這個版本的安卓系統不被支持。</string>
 </resources>
diff --git a/src/android/java/res/values/strings.xml b/src/android/java/res/values/strings.xml
index 0110948dcf..42077b07db 100644
--- a/src/android/java/res/values/strings.xml
+++ b/src/android/java/res/values/strings.xml
@@ -1,8 +1,6 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
     <!-- %%INSERT_STRINGS -->
-    <string name="ministro_not_found_msg">Can\'t find Ministro service.\nThe application can\'t start.</string>
-    <string name="ministro_needed_msg">This application requires Ministro service. Would you like to install it?</string>
     <string name="fatal_error_msg">Your application encountered a fatal error and cannot continue.</string>
     <string name="unsupported_android_version">This version of Android is not supported.</string>
 </resources>
diff --git a/src/android/java/src/org/kde/necessitas/ministro/IMinistro.aidl b/src/android/java/src/org/kde/necessitas/ministro/IMinistro.aidl
deleted file mode 100644
index bbd8116d96..0000000000
--- a/src/android/java/src/org/kde/necessitas/ministro/IMinistro.aidl
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-    Copyright (c) 2011-2013, BogDan Vatra <bogdan@kde.org>
-    Contact: http://www.qt.io/licensing/
-
-    Commercial License Usage
-    Licensees holding valid commercial Qt licenses may use this file in
-    accordance with the commercial license agreement provided with the
-    Software or, alternatively, in accordance with the terms contained in
-    a written agreement between you and The Qt Company. For licensing terms
-    and conditions see http://www.qt.io/terms-conditions. For further
-    information use the contact form at http://www.qt.io/contact-us.
-
-    BSD License Usage
-    Alternatively, this file may be used under the BSD license as follows:
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-    2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
-    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-    IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-    NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-    THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-package org.kde.necessitas.ministro;
-
-import org.kde.necessitas.ministro.IMinistroCallback;
-
-interface IMinistro
-{
-/**
-* Check/download required libs to run the application
-*
-* param callback  - interface used by Minsitro service to notify the client when the loader is ready
-* param parameters
-*            parameters fields:
-*                 * Key Name                   Key type         Explanations
-*                   "sources"                  StringArray      Sources list from where Ministro will download the libs. Make sure you are using ONLY secure locations.
-*                   "repository"               String           Overwrites the default Ministro repository. Possible values: default, stable, testing and unstable
-*                   "required.modules"         StringArray      Required modules by your application
-*                   "application.title"        String           Application name, used to show more informations to user
-*                   "qt.provider"              String           Qt libs provider, currently only "necessitas" is supported.
-*                   "minimum.ministro.api"     Integer          Minimum Ministro API level, used to check if Ministro service compatible with your application. Current API Level is 3 !
-*                   "minimum.qt.version"       Integer          Minimim Qt version (e.g. 0x040800, which means Qt 4.8.0, check http://qt-project.org/doc/qt-4.8/qtglobal.html#QT_VERSION)!
-*/
-    void requestLoader(in IMinistroCallback callback, in Bundle parameters);
-}
diff --git a/src/android/java/src/org/kde/necessitas/ministro/IMinistroCallback.aidl b/src/android/java/src/org/kde/necessitas/ministro/IMinistroCallback.aidl
deleted file mode 100644
index f19caa69e0..0000000000
--- a/src/android/java/src/org/kde/necessitas/ministro/IMinistroCallback.aidl
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-    Copyright (c) 2011-2013, BogDan Vatra <bogdan@kde.org>
-    Contact: http://www.qt.io/licensing/
-
-    Commercial License Usage
-    Licensees holding valid commercial Qt licenses may use this file in
-    accordance with the commercial license agreement provided with the
-    Software or, alternatively, in accordance with the terms contained in
-    a written agreement between you and The Qt Company. For licensing terms
-    and conditions see http://www.qt.io/terms-conditions. For further
-    information use the contact form at http://www.qt.io/contact-us.
-
-    BSD License Usage
-    Alternatively, this file may be used under the BSD license as follows:
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    1. Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-    2. Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-
-    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-    IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-    NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-    THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-package org.kde.necessitas.ministro;
-
-oneway interface IMinistroCallback {
-/**
-* This method is called by the Ministro service back into the application which
-* implements this interface.
-*
-* param in - loaderParams
-*            loaderParams fields:
-*                 * Key Name                   Key type         Explanations
-*                 * "error.code"               Integer          See below
-*                 * "error.message"            String           Missing if no error, otherwise will contain the error message translated into phone language where available.
-*                 * "dex.path"                 String           The list of jar/apk files containing classes and resources, needed to be passed to application DexClassLoader
-*                 * "lib.path"                 String           The list of directories containing native libraries; may be missing, needed to be passed to application DexClassLoader
-*                 * "loader.class.name"        String           Loader class name.
-*
-* "error.code" field possible errors:
-*  - 0 no error.
-*  - 1 incompatible Ministro version. Ministro needs to be upgraded.
-*  - 2 not all modules could be satisfy.
-*  - 3 invalid parameters
-*  - 4 invalid qt version
-*  - 5 download canceled
-*
-* The parameter contains additional fields which are used by the loader to start your application, so it must be passed to the loader.
-*/
-
-    void loaderReady(in Bundle loaderParams);
-}
diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java
index dd94d6267a..0e3f0f947e 100644
--- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java
+++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java
@@ -173,8 +173,6 @@ public class QtActivity extends Activity
             QtApplication.invokeDelegateMethod(QtApplication.onActivityResult, requestCode, resultCode, data);
             return;
         }
-        if (requestCode == QtLoader.MINISTRO_INSTALL_REQUEST_CODE)
-            m_loader.startApp(false);
         super.onActivityResult(requestCode, resultCode, data);
     }
     public void super_onActivityResult(int requestCode, int resultCode, Intent data)
diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java
index 3a8fb34863..b003b8ed62 100644
--- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java
+++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java
@@ -59,32 +59,6 @@ public class QtActivityLoader extends QtLoader {
         super(activity, QtActivity.class);
         m_activity = activity;
     }
-    @Override
-    protected void downloadUpgradeMinistro(String msg) {
-        AlertDialog.Builder downloadDialog = new AlertDialog.Builder(m_activity);
-        downloadDialog.setMessage(msg);
-        downloadDialog.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
-            @Override
-            public void onClick(DialogInterface dialogInterface, int i) {
-                try {
-                    Uri uri = Uri.parse("market://details?id=org.kde.necessitas.ministro");
-                    Intent intent = new Intent(Intent.ACTION_VIEW, uri);
-                    m_activity.startActivityForResult(intent, MINISTRO_INSTALL_REQUEST_CODE);
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    ministroNotFound();
-                }
-            }
-        });
-
-        downloadDialog.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
-            @Override
-            public void onClick(DialogInterface dialogInterface, int i) {
-                m_activity.finish();
-            }
-        });
-        downloadDialog.show();
-    }
 
     @Override
     protected String loaderClassName() {
diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
index 9b4feb9f91..2cc39fd9cb 100644
--- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
+++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java
@@ -38,22 +38,15 @@ package org.qtproject.qt5.android.bindings;
 
 import android.app.AlertDialog;
 import android.app.Dialog;
-import android.content.ComponentName;
 import android.content.Context;
 import android.content.ContextWrapper;
 import android.content.DialogInterface;
 import android.content.Intent;
-import android.content.ServiceConnection;
 import android.content.pm.ComponentInfo;
 import android.os.Build;
 import android.os.Bundle;
-import android.os.IBinder;
-import android.os.RemoteException;
 import android.util.Log;
 
-import org.kde.necessitas.ministro.IMinistro;
-import org.kde.necessitas.ministro.IMinistroCallback;
-
 import java.io.File;
 import java.io.FileOutputStream;
 import java.lang.reflect.Method;
@@ -66,11 +59,6 @@ import dalvik.system.DexClassLoader;
 
 public abstract class QtLoader {
 
-    public final static int MINISTRO_INSTALL_REQUEST_CODE = 0xf3ee; // request code used to know when Ministro instalation is finished
-    public static final int MINISTRO_API_LEVEL = 5; // Ministro api level (check IMinistro.aidl file)
-    public static final int NECESSITAS_API_LEVEL = 2; // Necessitas api level used by platform plugin
-    public static final int QT_VERSION = 0x050700; // This app requires at least Qt version 5.7.0
-
     public static final String ERROR_CODE_KEY = "error.code";
     public static final String ERROR_MESSAGE_KEY = "error.message";
     public static final String DEX_PATH_KEY = "dex.path";
@@ -82,7 +70,6 @@ public abstract class QtLoader {
     public static final String BUNDLED_LIBRARIES_KEY = "bundled.libraries";
     public static final String MAIN_LIBRARY_KEY = "main.library";
     public static final String STATIC_INIT_CLASSES_KEY = "static.init.classes";
-    public static final String NECESSITAS_API_LEVEL_KEY = "necessitas.api.level";
     public static final String EXTRACT_STYLE_KEY = "extract.android.style";
     private static final String EXTRACT_STYLE_MINIMAL_KEY = "extract.android.style.option";
 
@@ -90,20 +77,6 @@ public abstract class QtLoader {
     public static final String SYSTEM_LIB_PATH = "/system/lib/";
     public String[] SYSTEM_APP_PATHS = {"/system/priv-app/", "/system/app/"};
 
-    /// Ministro server parameter keys
-    public static final String REQUIRED_MODULES_KEY = "required.modules";
-    public static final String APPLICATION_TITLE_KEY = "application.title";
-    public static final String MINIMUM_MINISTRO_API_KEY = "minimum.ministro.api";
-    public static final String MINIMUM_QT_VERSION_KEY = "minimum.qt.version";
-    public static final String SOURCES_KEY = "sources";               // needs MINISTRO_API_LEVEL >=3 !!!
-    // Use this key to specify any 3rd party sources urls
-    // Ministro will download these repositories into their
-    // own folders, check http://community.kde.org/Necessitas/Ministro
-    // for more details.
-
-    public static final String REPOSITORY_KEY = "repository";         // use this key to overwrite the default ministro repsitory
-    public static final String ANDROID_THEMES_KEY = "android.themes"; // themes that your application uses
-
     public String APPLICATION_PARAMETERS = null; // use this variable to pass any parameters to your application,
     // the parameters must not contain any white spaces
     // and must be separated with "\t"
@@ -130,20 +103,6 @@ public abstract class QtLoader {
 
     public String QT_ANDROID_DEFAULT_THEME = null; // sets the default theme.
 
-    public static final int INCOMPATIBLE_MINISTRO_VERSION = 1; // Incompatible Ministro version. Ministro needs to be upgraded.
-
-    public String[] m_sources = {"https://download.qt-project.org/ministro/android/qt5/qt-5.7"}; // Make sure you are using ONLY secure locations
-    public String m_repository = "default"; // Overwrites the default Ministro repository
-    // Possible values:
-    // * default - Ministro default repository set with "Ministro configuration tool".
-    // By default the stable version is used. Only this or stable repositories should
-    // be used in production.
-    // * stable - stable repository, only this and default repositories should be used
-    // in production.
-    // * testing - testing repository, DO NOT use this repository in production,
-    // this repository is used to push a new release, and should be used to test your application.
-    // * unstable - unstable repository, DO NOT use this repository in production,
-    // this repository is used to push Qt snapshots.
     public ArrayList<String> m_qtLibs = null; // required qt libs
     public int m_displayDensity = -1;
     private ContextWrapper m_context;
@@ -168,10 +127,6 @@ public abstract class QtLoader {
     protected void runOnUiThread(Runnable run) {
         run.run();
     }
-    protected void downloadUpgradeMinistro(String msg)
-    {
-        Log.e(QtApplication.QtTAG, msg);
-    }
 
     protected abstract String loaderClassName();
     protected abstract Class<?> contextClassName();
@@ -219,11 +174,6 @@ public abstract class QtLoader {
         try {
             final int errorCode = loaderParams.getInt(ERROR_CODE_KEY);
             if (errorCode != 0) {
-                if (errorCode == INCOMPATIBLE_MINISTRO_VERSION) {
-                    downloadUpgradeMinistro(loaderParams.getString(ERROR_MESSAGE_KEY));
-                    return;
-                }
-
                 // fatal error, show the error and quit
                 AlertDialog errorDialog = new AlertDialog.Builder(m_context).create();
                 errorDialog.setMessage(loaderParams.getString(ERROR_MESSAGE_KEY));
@@ -253,7 +203,6 @@ public abstract class QtLoader {
             }
 
             loaderParams.putStringArrayList(BUNDLED_LIBRARIES_KEY, libs);
-            loaderParams.putInt(NECESSITAS_API_LEVEL_KEY, NECESSITAS_API_LEVEL);
 
             // load and start QtLoader class
             DexClassLoader classLoader = new DexClassLoader(loaderParams.getString(DEX_PATH_KEY), // .jar/.apk files
@@ -296,84 +245,9 @@ public abstract class QtLoader {
         }
     }
 
-    private ServiceConnection m_ministroConnection=new ServiceConnection() {
-        private IMinistro m_service = null;
-        @Override
-        public void onServiceConnected(ComponentName name, IBinder service)
-        {
-            m_service = IMinistro.Stub.asInterface(service);
-            try {
-                if (m_service != null) {
-                    Bundle parameters = new Bundle();
-                    parameters.putStringArray(REQUIRED_MODULES_KEY, (String[]) m_qtLibs.toArray());
-                    parameters.putString(APPLICATION_TITLE_KEY, getTitle());
-                    parameters.putInt(MINIMUM_MINISTRO_API_KEY, MINISTRO_API_LEVEL);
-                    parameters.putInt(MINIMUM_QT_VERSION_KEY, QT_VERSION);
-                    parameters.putString(ENVIRONMENT_VARIABLES_KEY, ENVIRONMENT_VARIABLES);
-                    if (APPLICATION_PARAMETERS != null)
-                        parameters.putString(APPLICATION_PARAMETERS_KEY, APPLICATION_PARAMETERS);
-                    parameters.putStringArray(SOURCES_KEY, m_sources);
-                    parameters.putString(REPOSITORY_KEY, m_repository);
-                    if (QT_ANDROID_THEMES != null)
-                        parameters.putStringArray(ANDROID_THEMES_KEY, QT_ANDROID_THEMES);
-                    m_service.requestLoader(m_ministroCallback, parameters);
-                }
-            } catch (RemoteException e) {
-                e.printStackTrace();
-            }
-        }
-
-        private IMinistroCallback m_ministroCallback = new IMinistroCallback.Stub() {
-            // this function is called back by Ministro.
-            @Override
-            public void loaderReady(final Bundle loaderParams) throws RemoteException {
-                runOnUiThread(new Runnable() {
-                    @Override
-                    public void run() {
-                        m_context.unbindService(m_ministroConnection);
-                        loadApplication(loaderParams);
-                    }
-                });
-            }
-        };
-
-        @Override
-        public void onServiceDisconnected(ComponentName name) {
-            m_service = null;
-        }
-    };
-
-    protected void ministroNotFound()
-    {
-        AlertDialog errorDialog = new AlertDialog.Builder(m_context).create();
-
-        if (m_contextInfo.metaData.containsKey("android.app.ministro_not_found_msg"))
-            errorDialog.setMessage(m_contextInfo.metaData.getString("android.app.ministro_not_found_msg"));
-        else
-            errorDialog.setMessage("Can't find Ministro service.\nThe application can't start.");
-
-        errorDialog.setButton(Dialog.BUTTON_POSITIVE,
-                              m_context.getResources().getString(android.R.string.ok),
-                              new DialogInterface.OnClickListener() {
-            @Override
-            public void onClick(DialogInterface dialog, int which) {
-                finish();
-            }
-        });
-        errorDialog.show();
-    }
-
     public void startApp(final boolean firstStart)
     {
         try {
-            if (m_contextInfo.metaData.containsKey("android.app.qt_sources_resource_id")) {
-                int resourceId = m_contextInfo.metaData.getInt("android.app.qt_sources_resource_id");
-                m_sources = m_context.getResources().getStringArray(resourceId);
-            }
-
-            if (m_contextInfo.metaData.containsKey("android.app.repository"))
-                m_repository = m_contextInfo.metaData.getString("android.app.repository");
-
             if (m_contextInfo.metaData.containsKey("android.app.qt_libs_resource_id")) {
                 int resourceId = m_contextInfo.metaData.getInt("android.app.qt_libs_resource_id");
                 m_qtLibs = prefferedAbiLibs(m_context.getResources().getStringArray(resourceId));
@@ -479,8 +353,7 @@ public abstract class QtLoader {
                 if (extractOption.equals("full"))
                     ENVIRONMENT_VARIABLES += "\tQT_USE_ANDROID_NATIVE_STYLE=1";
 
-                ENVIRONMENT_VARIABLES += "\tMINISTRO_ANDROID_STYLE_PATH=" + stylePath
-                        + "\tQT_ANDROID_THEMES_ROOT_PATH=" + themePath;
+                ENVIRONMENT_VARIABLES += "\tANDROID_STYLE_PATH=" + stylePath;
 
                 loaderParams.putString(ENVIRONMENT_VARIABLES_KEY, ENVIRONMENT_VARIABLES);
 
@@ -512,23 +385,6 @@ public abstract class QtLoader {
                 loadApplication(loaderParams);
                 return;
             }
-
-            try {
-                if (!m_context.bindService(new Intent(org.kde.necessitas.ministro.IMinistro.class.getCanonicalName()),
-                        m_ministroConnection,
-                        Context.BIND_AUTO_CREATE)) {
-                    throw new SecurityException("");
-                }
-            } catch (Exception e) {
-                if (firstStart) {
-                    String msg = "This application requires Ministro service. Would you like to install it?";
-                    if (m_contextInfo.metaData.containsKey("android.app.ministro_needed_msg"))
-                        msg = m_contextInfo.metaData.getString("android.app.ministro_needed_msg");
-                    downloadUpgradeMinistro(msg);
-                } else {
-                    ministroNotFound();
-                }
-            }
         } catch (Exception e) {
             Log.e(QtApplication.QtTAG, "Can't create main activity", e);
         }
diff --git a/src/android/templates/AndroidManifest.xml b/src/android/templates/AndroidManifest.xml
index c434c0cb0d..119eeb604a 100644
--- a/src/android/templates/AndroidManifest.xml
+++ b/src/android/templates/AndroidManifest.xml
@@ -21,8 +21,6 @@
             <!-- Application arguments -->
 
             <meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
-            <meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
-            <meta-data android:name="android.app.repository" android:value="default"/>
             <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
             <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
             <!-- Deploy Qt libs as part of package -->
@@ -30,15 +28,12 @@
 
             <!-- Run with local libs -->
             <meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/>
-            <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
             <meta-data android:name="android.app.load_local_libs_resource_id" android:resource="@array/load_local_libs"/>
             <meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/>
             <meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/>
             <!-- Used to specify custom system library path to run with local system libs -->
             <!-- <meta-data android:name="android.app.system_libs_prefix" android:value="/system/lib/"/> -->
             <!--  Messages maps -->
-            <meta-data android:value="@string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/>
-            <meta-data android:value="@string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/>
             <meta-data android:value="@string/fatal_error_msg" android:name="android.app.fatal_error_msg"/>
             <meta-data android:value="@string/unsupported_android_version" android:name="android.app.unsupported_android_version"/>
             <!--  Messages maps -->
diff --git a/src/android/templates/res/values/libs.xml b/src/android/templates/res/values/libs.xml
index 6b1a4a2a02..280c03c686 100644
--- a/src/android/templates/res/values/libs.xml
+++ b/src/android/templates/res/values/libs.xml
@@ -1,9 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
 <resources>
-    <array name="qt_sources">
-        <item>https://download.qt.io/ministro/android/qt5/qt-5.14</item>
-    </array>
-
     <!-- The following is handled automatically by the deployment tool. It should
          not be edited manually. -->
 
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 20a3a10766..2287052e43 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -934,8 +934,7 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
     platformEncodingFormat = QSsl::Pem;
 # else
     // Q_OS_ANDROID
-    QByteArray ministroPath = qgetenv("MINISTRO_SSL_CERTS_PATH"); // Set by Ministro
-    directories << ministroPath;
+    QByteArray ministroPath; // UNUSED NOW
     nameFilters << QLatin1String("*.der");
     platformEncodingFormat = QSsl::Der;
 #  ifndef Q_OS_ANDROID_EMBEDDED
diff --git a/src/plugins/platforms/android/qandroidplatformtheme.cpp b/src/plugins/platforms/android/qandroidplatformtheme.cpp
index c9edf0c38f..1d63b0dc38 100644
--- a/src/plugins/platforms/android/qandroidplatformtheme.cpp
+++ b/src/plugins/platforms/android/qandroidplatformtheme.cpp
@@ -187,21 +187,17 @@ static void setPaletteColor(const QVariantMap &object,
 
 QJsonObject AndroidStyle::loadStyleData()
 {
-    QString stylePath(QLatin1String(qgetenv("MINISTRO_ANDROID_STYLE_PATH")));
+    QString stylePath(QLatin1String(qgetenv("ANDROID_STYLE_PATH")));
     const QLatin1Char slashChar('/');
     if (!stylePath.isEmpty() && !stylePath.endsWith(slashChar))
         stylePath += slashChar;
 
+    Q_ASSERT(!stylePath.isEmpty());
+
     QString androidTheme = QLatin1String(qgetenv("QT_ANDROID_THEME"));
     if (!androidTheme.isEmpty() && !androidTheme.endsWith(slashChar))
         androidTheme += slashChar;
 
-    if (stylePath.isEmpty()) {
-        stylePath = QLatin1String("/data/data/org.kde.necessitas.ministro/files/dl/style/")
-                  + QLatin1String(qgetenv("QT_ANDROID_THEME_DISPLAY_DPI")) + slashChar;
-    }
-    Q_ASSERT(!stylePath.isEmpty());
-
     if (!androidTheme.isEmpty() && QFileInfo::exists(stylePath + androidTheme + QLatin1String("style.json")))
         stylePath += androidTheme;
 
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index aded9f31c7..0039955956 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -135,8 +135,7 @@ struct Options
 
     enum DeploymentMechanism
     {
-        Bundled,
-        Ministro
+        Bundled
     };
 
     enum TriState {
@@ -443,9 +442,7 @@ Options parseOptions()
                 options.helpRequested = true;
             } else {
                 QString deploymentMechanism = arguments.at(++i);
-                if (deploymentMechanism.compare(QLatin1String("ministro"), Qt::CaseInsensitive) == 0) {
-                    options.deploymentMechanism = Options::Ministro;
-                } else if (deploymentMechanism.compare(QLatin1String("bundled"), Qt::CaseInsensitive) == 0) {
+                if (deploymentMechanism.compare(QLatin1String("bundled"), Qt::CaseInsensitive) == 0) {
                     options.deploymentMechanism = Options::Bundled;
                 } else {
                     fprintf(stderr, "Unrecognized deployment mechanism: %s\n", qPrintable(deploymentMechanism));
@@ -557,7 +554,7 @@ void printHelp()
                     "       directory will be used if nothing else is specified.\n"
                     "    --deployment <mechanism>: Supported deployment mechanisms:\n"
                     "       bundled (default): Include Qt files in stand-alone package.\n"
-                    "       ministro: Use the Ministro service to manage Qt files.\n"
+                    "\n"
                     "    --aab: Build an Android App Bundle.\n"
                     "    --no-build: Do not build the package, it is useful to just install\n"
                     "       a package previously built.\n"
@@ -1406,8 +1403,8 @@ bool updateAndroidManifest(Options &options)
     replacements[QStringLiteral("package=\"org.qtproject.example\"")] = QLatin1String("package=\"%1\"").arg(options.packageName);
     replacements[QStringLiteral("-- %%BUNDLE_LOCAL_QT_LIBS%% --")]
             = (options.deploymentMechanism == Options::Bundled) ? QLatin1String("1") : QLatin1String("0");
-    replacements[QStringLiteral("-- %%USE_LOCAL_QT_LIBS%% --")]
-            = (options.deploymentMechanism != Options::Ministro) ? QLatin1String("1") : QLatin1String("0");
+     // use libs from the apk
+    replacements[QStringLiteral("-- %%USE_LOCAL_QT_LIBS%% --")] = QLatin1String("1");
 
     QString permissions;
     for (const QString &permission : qAsConst(options.permissions))
@@ -2090,9 +2087,6 @@ bool copyQtFiles(Options *options)
         case Options::Bundled:
             fprintf(stdout, "Copying %d dependencies from Qt into package.\n", options->qtDependencies.size());
             break;
-        case Options::Ministro:
-            fprintf(stdout, "Setting %d dependencies from Qt in package.\n", options->qtDependencies.size());
-            break;
         };
     }
 
@@ -2931,7 +2925,7 @@ int main(int argc, char *argv[])
             fprintf(stdout, "[TIMING] %d ms: Copied extra resources\n", options.timer.elapsed());
 
         if (!options.auxMode) {
-            if (options.deploymentMechanism != Options::Ministro && !copyStdCpp(&options))
+            if (!copyStdCpp(&options))
                 return CannotCopyGnuStl;
 
             if (Q_UNLIKELY(options.timing))
@@ -2944,10 +2938,8 @@ int main(int argc, char *argv[])
         if (Q_UNLIKELY(options.timing))
             fprintf(stdout, "[TIMING] %d ms: Checked for application binary\n", options.timer.elapsed());
 
-        if (options.deploymentMechanism != Options::Ministro) {
-            if (Q_UNLIKELY(options.timing))
-                fprintf(stdout, "[TIMING] %d ms: Bundled Qt libs\n", options.timer.elapsed());
-        }
+        if (Q_UNLIKELY(options.timing))
+            fprintf(stdout, "[TIMING] %d ms: Bundled Qt libs\n", options.timer.elapsed());
     }
 
     if (!createRcc(options))
-- 
2.45.2.windows.1

