rhodes 7.4.1 → 7.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG +319 -0
- data/CREDITS +3 -1
- data/LICENSE +1 -1
- data/README.md +6 -16
- data/Rakefile +55 -43
- data/SECURITY.md +19 -0
- data/appveyor.yml +66 -8
- data/azure-pipelines.yml +67 -0
- data/bin/rhodes-setup +22 -8
- data/extensions/emdk3-manager/ext/platform/android/src/com/rho/emdk3/EMDK3Extension.java +14 -5
- data/extensions/instrumentation/ext/platform/android/src/com/rho/instrumentation/Instrumentation.java +29 -15
- data/extensions/rhoconnect-push/ext/rhoconnect-push/platform/android/src/com/rhomobile/rhoelements/ans/ANSManager.java +3 -3
- data/extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/ElementsCore.java +12 -9
- data/extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/graphics/BatteryIndicator.java +2 -2
- data/lib/commonAPI/barcode/ext/platform/android/AndroidManifest.xml +3 -1
- data/lib/commonAPI/barcode/ext/platform/android/src/com/google/barcodereader/BarcodeCaptureActivity.java +11 -13
- data/lib/commonAPI/barcode/ext/platform/android/src/com/google/barcodereader/BarcodeGraphicTracker.java +1 -1
- data/lib/commonAPI/barcode/ext/platform/android/src/com/google/barcodereader/ui/camera/CameraSource.java +3 -3
- data/lib/commonAPI/barcode/ext/platform/android/src/com/google/barcodereader/ui/camera/CameraSourcePreview.java +1 -1
- data/lib/commonAPI/barcode/ext/platform/qt/Barcode.pro +1 -1
- data/lib/commonAPI/barcode/ext/platform/qt/Barcode.pro.erb +2 -2
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/QZXing.pri +9 -21
- data/lib/commonAPI/barcode/ext.yml +5 -8
- data/lib/commonAPI/bluetooth/ext/platform/qt/Bluetooth.pro +1 -1
- data/lib/commonAPI/bluetooth/ext/platform/qt/Bluetooth.pro.erb +1 -1
- data/lib/commonAPI/bluetooth/ext/platform/qt/src/bluetooth/bluetoothhelper.h +1 -1
- data/lib/commonAPI/coreapi/RhoSystemApi.rb +6 -0
- data/lib/commonAPI/coreapi/ext/Intent.xml +4 -0
- data/lib/commonAPI/coreapi/ext/platform/android/Rakefile +0 -12
- data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/intent/IntentSingleton.java +6 -0
- data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/Notification.java +5 -2
- data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationScheduler.java +4 -4
- data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationSingleton.java +1 -1
- data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/webview/WebViewSingleton.java +40 -27
- data/lib/commonAPI/coreapi/ext/platform/iphone/cpp_based_impl/SystemImpl.mm +5 -6
- data/lib/commonAPI/coreapi/ext/platform/iphone/impl/Intent.h +1 -1
- data/lib/commonAPI/coreapi/ext/platform/iphone/impl/Intent.m +3 -1
- data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NotificationSingleton.h +2 -1
- data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NotificationSingleton.m +10 -0
- data/lib/commonAPI/coreapi/ext/platform/wm/src/IntentImpl.cpp +3 -0
- data/lib/commonAPI/coreapi/ext/push.xml +5 -2
- data/lib/commonAPI/coreapi/ext/shared/SystemImplBase.cpp +13 -0
- data/lib/commonAPI/coreapi/ext/shared/SystemImplBase.h +2 -0
- data/lib/commonAPI/coreapi/ext/system.xml +3 -0
- data/lib/commonAPI/mediacapture/ext/camera.xml +4 -9
- data/lib/commonAPI/mediacapture/ext/platform/android/ApplicationCameraActivity.erb +2 -2
- data/lib/commonAPI/mediacapture/ext/platform/android/ApplicationFileProvider.erb +1 -1
- data/lib/commonAPI/mediacapture/ext/platform/android/ext_java.files +2 -9
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraExtension.java +0 -2
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraFactory.java +19 -24
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraObject.java +322 -730
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraRhoListener.java +247 -433
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/{CameraSingletonObject.java → CameraSingleton.java} +68 -74
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/mediacapture/RhoCameraFileProvider.java +6 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/MediaCapture.pro.erb +1 -1
- data/lib/commonAPI/mediacapture/ext/platform/qt/Mediacapture.pro +1 -1
- data/lib/commonAPI/printing_zebra/ext/platform/android/src/com/rhomobile/printing/zebra/impl/ZebraPrintingProviderImpl.java +2 -1
- data/lib/commonAPI/signature/ext/platform/iphone/impl/readme.txt +7 -0
- data/lib/commonAPI/signature/ext/platform/qt/Signature.pro +3 -10
- data/lib/commonAPI/signature/ext/platform/qt/Signature.pro.erb +2 -2
- data/lib/extensions/fcm-push/ext/android/ApplicationManifestAdds.erb +15 -17
- data/lib/extensions/fcm-push/ext/android/Rakefile +59 -34
- data/lib/extensions/fcm-push/ext/android/ext_java.files +0 -1
- data/lib/extensions/fcm-push/ext/android/src/com/rhomobile/rhodes/fcm/FCMFacade.java +13 -17
- data/lib/extensions/fcm-push/ext/android/src/com/rhomobile/rhodes/fcm/FCMIntentService.java +81 -80
- data/lib/extensions/fcm-push/ext/android/src/com/rhomobile/rhodes/fcm/FCMListener.java +0 -16
- data/lib/extensions/fcm-push/ext/iphone/Podfile +15 -2
- data/lib/extensions/fcm-push/ext/iphone/fcm-push.xcodeproj/project.pbxproj +6 -7
- data/lib/extensions/fcm-push/ext.yml +1 -1
- data/lib/extensions/gmaps/ext/platform/android/ApplicationManifestAdds.erb +1 -0
- data/lib/extensions/gmaps/ext/platform/android/src/com/rhomobile/rhodes/gmaps/GMapActivity.java +12 -4
- data/lib/extensions/gmaps/ext.yml +3 -1
- data/lib/extensions/nfc/ext/platform/android/src/com/rhomobile/nfc/Nfc.java +2 -1
- data/lib/extensions/serialport/ext/serialport.pro +1 -1
- data/platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h +1 -0
- data/platform/android/Rhodes/jni/src/MethodResultJni.cpp +4 -0
- data/platform/android/Rhodes/jni/src/fileapi.cpp +4 -0
- data/platform/android/Rhodes/res/drawable/baseline_check_24.xml +5 -0
- data/platform/android/Rhodes/res/drawable/baseline_check_240.xml +5 -0
- data/platform/android/Rhodes/res/drawable/baseline_close_24.xml +5 -0
- data/platform/android/Rhodes/res/drawable/baseline_close_240.xml +5 -0
- data/platform/android/Rhodes/res/layout/overlay_layout.xml +39 -0
- data/platform/android/Rhodes/res/layout/perrmission_alert_dialog.xml +267 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +183 -66
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/LocalFileProvider.java +38 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoFileProvider.java +32 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +532 -92
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +26 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +259 -163
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/StatusNotification.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/AbstractRhoExtension.java +14 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtManager.java +4 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtension.java +5 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerImpl.java +79 -38
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java +20 -15
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java +18 -9
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/CallReceiver.java +22 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/IKioskMode.java +11 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/KioskManager.java +18 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/MyAccessibilityService.java +230 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/MyNotificationListenerService.java +16 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/MyOverlayService.java +197 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/PermissionManager.java +232 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +34 -8
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality26.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/permissioncheck/CheckDrawable.java +53 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/permissioncheck/PermissionListGenerate.java +366 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/rhodes.iml +11 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/SSLImpl.java +1 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +782 -41
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoInputConnectionWrapper.java +146 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoInputListener.java +21 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +92 -32
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/TauWebViewOptions.java +118 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/WebSettingsProviderBase.java +18 -17
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/WebSettingsProviderEclairMR1.java +4 -4
- data/platform/android/build/RhodesSRC_build.files +13 -0
- data/platform/android/build/{aab_builder.rb → aapt2_helper.rb} +94 -37
- data/platform/android/build/android-repack.rake +8 -1
- data/platform/android/build/android.rake +238 -238
- data/platform/android/build/android_tools.rb +10 -10
- data/platform/android/build/androidcommon.rb +31 -14
- data/platform/android/build/build_tools_finder.rb +46 -0
- data/platform/android/build/config.yml +8 -0
- data/platform/android/build/dex_builder.rb +88 -0
- data/platform/android/build/hostplatform.rb +9 -0
- data/platform/android/build/manifest_generator.rb +15 -10
- data/platform/android/build/maven_deps_extractor.rb +29 -22
- data/platform/android/build/ndkwrapper.rb +92 -51
- data/platform/android/proguard/proguard-base-rules.pro +5 -0
- data/platform/android/proguard/proguard.jar +0 -0
- data/platform/iphone/Classes/AppManager/AppManager.m +3 -1
- data/platform/iphone/Classes/Camera/PickImageDelegate.h +2 -0
- data/platform/iphone/Classes/Camera/PickImageDelegate.m +45 -23
- data/platform/iphone/Classes/CocoaServer/CCocoaServer.h +27 -0
- data/platform/iphone/Classes/CocoaServer/CCocoaServer.m +107 -0
- data/platform/iphone/Classes/CocoaServer/RhoHTTPConnection.h +16 -0
- data/platform/iphone/Classes/CocoaServer/RhoHTTPConnection.m +226 -0
- data/platform/iphone/Classes/RhoAppBaseLib-Bridging-Header.h +4 -0
- data/platform/iphone/Classes/RhoAppBaseStandaloneLib-Bridging-Header.h +4 -0
- data/platform/iphone/Classes/RhoCryptAESGCM.swift +105 -0
- data/platform/iphone/Classes/RhoUIWebView.h +1 -1
- data/platform/iphone/Classes/RhoUIWebView.m +1 -1
- data/platform/iphone/Classes/RhoWKWebView.h +1 -1
- data/platform/iphone/Classes/RhoWKWebView.mm +110 -15
- data/platform/iphone/Classes/RhoWebView.h +1 -1
- data/platform/iphone/Classes/RhoWebViewFabrique.m +13 -2
- data/platform/iphone/Classes/Rhodes.m +3 -0
- data/platform/iphone/Classes/SimpleMainView.m +5 -5
- data/platform/iphone/Classes/URLProtocol/CRhoURLProtocol.m +21 -10
- data/platform/iphone/Classes/rho/net/IPhoneNetRequest.mm +4 -0
- data/platform/iphone/CocoaHTTPServer/Core/Categories/DDData.h +14 -0
- data/platform/iphone/CocoaHTTPServer/Core/Categories/DDData.m +158 -0
- data/platform/iphone/CocoaHTTPServer/Core/Categories/DDNumber.h +12 -0
- data/platform/iphone/CocoaHTTPServer/Core/Categories/DDNumber.m +88 -0
- data/platform/iphone/CocoaHTTPServer/Core/Categories/DDRange.h +56 -0
- data/platform/iphone/CocoaHTTPServer/Core/Categories/DDRange.m +104 -0
- data/platform/iphone/CocoaHTTPServer/Core/HTTPAuthenticationRequest.h +45 -0
- data/platform/iphone/CocoaHTTPServer/Core/HTTPAuthenticationRequest.m +195 -0
- data/platform/iphone/CocoaHTTPServer/Core/HTTPConnection.h +120 -0
- data/platform/iphone/CocoaHTTPServer/Core/HTTPConnection.m +2708 -0
- data/platform/iphone/CocoaHTTPServer/Core/HTTPLogging.h +136 -0
- data/platform/iphone/CocoaHTTPServer/Core/HTTPMessage.h +48 -0
- data/platform/iphone/CocoaHTTPServer/Core/HTTPMessage.m +113 -0
- data/platform/iphone/CocoaHTTPServer/Core/HTTPResponse.h +149 -0
- data/platform/iphone/CocoaHTTPServer/Core/HTTPServer.h +205 -0
- data/platform/iphone/CocoaHTTPServer/Core/HTTPServer.m +772 -0
- data/platform/iphone/CocoaHTTPServer/Core/Mime/MultipartFormDataParser.h +65 -0
- data/platform/iphone/CocoaHTTPServer/Core/Mime/MultipartFormDataParser.m +529 -0
- data/platform/iphone/CocoaHTTPServer/Core/Mime/MultipartMessageHeader.h +33 -0
- data/platform/iphone/CocoaHTTPServer/Core/Mime/MultipartMessageHeader.m +86 -0
- data/platform/iphone/CocoaHTTPServer/Core/Mime/MultipartMessageHeaderField.h +23 -0
- data/platform/iphone/CocoaHTTPServer/Core/Mime/MultipartMessageHeaderField.m +211 -0
- data/platform/iphone/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.h +75 -0
- data/platform/iphone/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.m +405 -0
- data/platform/iphone/CocoaHTTPServer/Core/Responses/HTTPDataResponse.h +13 -0
- data/platform/iphone/CocoaHTTPServer/Core/Responses/HTTPDataResponse.m +79 -0
- data/platform/iphone/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.h +52 -0
- data/platform/iphone/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.m +292 -0
- data/platform/iphone/CocoaHTTPServer/Core/Responses/HTTPErrorResponse.h +9 -0
- data/platform/iphone/CocoaHTTPServer/Core/Responses/HTTPErrorResponse.m +38 -0
- data/platform/iphone/CocoaHTTPServer/Core/Responses/HTTPFileResponse.h +25 -0
- data/platform/iphone/CocoaHTTPServer/Core/Responses/HTTPFileResponse.m +237 -0
- data/platform/iphone/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.h +12 -0
- data/platform/iphone/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.m +73 -0
- data/platform/iphone/CocoaHTTPServer/Core/WebSocket.h +105 -0
- data/platform/iphone/CocoaHTTPServer/Core/WebSocket.m +791 -0
- data/platform/iphone/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.h +7 -0
- data/platform/iphone/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.m +160 -0
- data/platform/iphone/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.h +11 -0
- data/platform/iphone/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.m +372 -0
- data/platform/iphone/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.h +7 -0
- data/platform/iphone/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.m +49 -0
- data/platform/iphone/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.h +8 -0
- data/platform/iphone/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.m +69 -0
- data/platform/iphone/CocoaHTTPServer/LICENSE.txt +18 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaAsyncSocket/About.txt +4 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaAsyncSocket/GCDAsyncSocket.h +1226 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m +8528 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/About.txt +33 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/DDASLLogger.h +41 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/DDASLLogger.m +99 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.h +102 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/DDAbstractDatabaseLogger.m +727 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/DDFileLogger.h +334 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/DDFileLogger.m +1353 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/DDLog.h +601 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/DDLog.m +1083 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/DDTTYLogger.h +167 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/DDTTYLogger.m +1479 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/Extensions/ContextFilterLogFormatter.h +65 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/Extensions/ContextFilterLogFormatter.m +191 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/Extensions/DispatchQueueLogFormatter.h +116 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/Extensions/DispatchQueueLogFormatter.m +251 -0
- data/platform/iphone/CocoaHTTPServer/Vendor/CocoaLumberjack/Extensions/README.txt +7 -0
- data/platform/iphone/Framework/RhoApplication/RhoApplication.xcodeproj/project.pbxproj +1 -1
- data/platform/iphone/Framework/Rhodes/Rhodes.xcodeproj/project.pbxproj +2 -2
- data/platform/iphone/RhoAppBaseLib/RhoAppBaseLib.xcodeproj/project.pbxproj +410 -1
- data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +1 -1
- data/platform/iphone/curl/curl.xcodeproj/project.pbxproj +4 -1
- data/platform/iphone/rbuild/iphone.rake +13 -8
- data/platform/iphone/rhoextlib/rhoextlib.xcodeproj/project.pbxproj +4 -1
- data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +1 -1
- data/platform/iphone/rhosynclib/rhosynclib.xcodeproj/project.pbxproj +1 -1
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app.zip +0 -0
- data/platform/sailfish/build/{harbour-SailfishRhodes.pro.erb → SailfishRhodes.pro.erb} +10 -17
- data/platform/sailfish/build/rhodes.pro.erb +7 -17
- data/platform/sailfish/build/rpm/SailfishRhodes.desktop.erb +12 -0
- data/platform/sailfish/build/rpm/SailfishRhodes.erb +2 -0
- data/platform/sailfish/build/rpm/SailfishRhodes.spec.erb +43 -0
- data/platform/sailfish/build/rubylib.pro.erb +29 -29
- data/platform/sailfish/build/sailfish.rake +188 -180
- data/platform/sailfish/keys/regular_cert.pem +14 -0
- data/platform/sailfish/keys/regular_key.pem +4 -0
- data/platform/shared/common/RhodesApp.cpp +59 -10
- data/platform/shared/common/iphone/RhoCryptImpl.mm +130 -54
- data/platform/shared/net/HttpServer.cpp +20 -0
- data/platform/shared/qt/RhoSimulator.pro +1 -1
- data/platform/shared/qt/rhodes/rhodes.pro +4 -11
- data/platform/shared/qt/sailfish/SailfishRhodes.desktop +3 -4
- data/platform/shared/qt/sailfish/SailfishRhodes.pro +9 -10
- data/platform/shared/qt/sailfish/icons/108x108/108x108.png +0 -0
- data/platform/shared/qt/sailfish/privileges/sailfishrhodes +2 -0
- data/platform/shared/qt/sailfish/qml/pages/FirstPageWK.qml +7 -11
- data/platform/shared/qt/sailfish/qml/{harbour-sailfishrhodes.qml → sailfishrhodes.qml} +1 -1
- data/platform/shared/qt/sailfish/rpm/sailfishrhodes.spec +80 -0
- data/platform/shared/qt/sailfish/rpm/{harbour-sailfishrhodes.yaml → sailfishrhodes.yaml} +2 -2
- data/platform/shared/qt/sailfish/src/QtMainWindow.cpp +1 -1
- data/platform/shared/qt/sailfish/src/QtMainWindow.h +1 -1
- data/platform/shared/qt/sailfish/src/main.cpp +6 -38
- data/platform/shared/qt/sailfish/src/rootdelegate.h +2 -14
- data/platform/shared/ruby/aurora/ruby/config.h +386 -0
- data/platform/shared/ruby/aurora/ruby/constdefs.c +5866 -0
- data/platform/shared/ruby/aurora/ruby/constdefs.h +1788 -0
- data/platform/shared/ruby/osx/ruby/config.h +2 -0
- data/platform/shared/ruby/win32/win32.c +10 -3
- data/platform/shared/sqlite/crypto.c +14 -0
- data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
- data/platform/win32/build/rhodes.nsi +3 -3
- data/platform/win32/build/win32.rake +1 -1
- data/rakefile.rb +55 -43
- data/res/build-tools/RhoRuby.exe +0 -0
- data/res/build-tools/aapt2/linux/aapt2 +0 -0
- data/res/build-tools/aapt2/osx/aapt2 +0 -0
- data/res/build-tools/iphonesim/build/Release/iphonesim_8 +4 -4
- data/res/generators/templates/application/AndroidManifest.erb +28 -6
- data/res/generators/templates/application/build.yml +18 -11
- data/res/generators/templates/application/resources/android/res/xml/provider_paths.xml +4 -0
- data/res/generators/templates/application/rhoconfig.txt +15 -1
- data/res/generators/templates/iphone_project/Bremen8.xcodeproj/project.pbxproj +24 -1
- data/res/generators/templates/iphone_project/Classes/SimpleSwiftClass.swift +20 -0
- data/res/generators/templates/iphone_project/Classes/rhorunner-Bridging-Header.h +4 -0
- data/rhobuild.yml.example +4 -4
- data/rhodes.gemspec +4 -3
- data/version +1 -1
- metadata +157 -57
- data/lib/commonAPI/mediacapture/ext/platform/android/adds/res/drawable/camera_btn.xml +0 -14
- data/lib/commonAPI/mediacapture/ext/platform/android/adds/res/layout/camera_land.xml +0 -23
- data/lib/commonAPI/mediacapture/ext/platform/android/adds/res/layout/camera_port.xml +0 -23
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraActivity.java +0 -156
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraEclair.java +0 -227
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraGingerbread.java +0 -152
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraPreview.java +0 -183
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraSingletonEclair.java +0 -14
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraSingletonGingerbread.java +0 -60
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/ICameraObject.java +0 -20
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/ICameraSingletonObject.java +0 -8
- data/lib/extensions/fcm-push/ext/android/src/com/rhomobile/rhodes/fcm/FCMTokenRefresherService.java +0 -27
- data/platform/android/Rhodes/AndroidManifest.xml.erb +0 -89
- data/platform/sailfish/build/rho_build.cmd.erb +0 -14
- data/platform/sailfish/build/rho_clean.cmd.erb +0 -14
- data/platform/sailfish/build/rho_deploy.cmd.erb +0 -15
- data/platform/sailfish/build/rho_rpm.cmd.erb +0 -14
- data/platform/sailfish/build/rho_rpmvalidation.cmd.erb +0 -14
- data/platform/sailfish/build/rpm/harbour-SailfishRhodes.desktop.erb +0 -7
- data/platform/sailfish/build/rpm/harbour-SailfishRhodes.erb +0 -2
- data/platform/sailfish/build/rpm/harbour-SailfishRhodes.yaml.erb +0 -37
- data/platform/shared/qt/sailfish/harbour-sailfishrhodes.desktop +0 -6
- data/platform/shared/qt/sailfish/icons/108x108/harbour-sailfishrhodes.png +0 -0
- data/platform/shared/qt/sailfish/privileges/harbour-sailfishrhodes +0 -2
- data/platform/shared/qt/sailfish/qml/pages/FirstPageWE.qml +0 -236
- /data/platform/shared/qt/sailfish/icons/128x128/{harbour-sailfishrhodes.png → sailfishrhodes.png} +0 -0
- /data/platform/shared/qt/sailfish/icons/172x172/{harbour-sailfishrhodes.png → sailfishrhodes.png} +0 -0
- /data/platform/shared/qt/sailfish/icons/86x86/{harbour-sailfishrhodes.png → sailfishrhodes.png} +0 -0
@@ -35,6 +35,7 @@ import java.io.InputStream;
|
|
35
35
|
import java.util.Map;
|
36
36
|
import java.util.Vector;
|
37
37
|
import java.util.List;
|
38
|
+
import android.os.Looper;
|
38
39
|
|
39
40
|
import com.rhomobile.rhodes.R;
|
40
41
|
import com.rhomobile.rhodes.Logger;
|
@@ -679,6 +680,10 @@ public class SimpleMainView implements MainView {
|
|
679
680
|
|
680
681
|
@Override
|
681
682
|
public void setWebView(IRhoWebView view, int tabIndex) {
|
683
|
+
IRhoWebView rwv = detachWebView();
|
684
|
+
if (rwv != null) {
|
685
|
+
// destory
|
686
|
+
}
|
682
687
|
webView = view;
|
683
688
|
addWebViewToMainView(webView, 0, new LinearLayout.LayoutParams(FILL_PARENT, 0, 1));
|
684
689
|
}
|
@@ -729,18 +734,29 @@ public class SimpleMainView implements MainView {
|
|
729
734
|
}
|
730
735
|
}
|
731
736
|
|
732
|
-
|
737
|
+
|
733
738
|
//@Override
|
734
739
|
public void executeJS(String js, int index) {
|
735
|
-
|
740
|
+
|
736
741
|
//Utils.platformLog("@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@", "ExecuteJS("+js+")");
|
737
742
|
//((android.webkit.WebView)webView.getView()).executeJS();
|
738
743
|
if ((android.os.Build.VERSION.SDK_INT < 14) || (android.os.Build.VERSION.SDK_INT >= 19)) { // 14 is 4.0, 19 is 4.4
|
739
|
-
|
744
|
+
final String js_code = js;
|
745
|
+
if(Looper.getMainLooper().getThread() == Thread.currentThread()) {
|
746
|
+
((WebView)webView.getView()).evaluateJavascript(js_code, null);
|
747
|
+
}
|
748
|
+
else {
|
749
|
+
PerformOnUiThread.exec(new Runnable() {
|
750
|
+
public void run() {
|
751
|
+
((WebView)webView.getView()).evaluateJavascript(js_code, null);
|
752
|
+
}
|
753
|
+
});
|
754
|
+
}
|
755
|
+
//navigate("javascript:"+js, index);
|
740
756
|
return;
|
741
757
|
}
|
742
|
-
|
743
|
-
|
758
|
+
|
759
|
+
|
744
760
|
Method mStringByEvaluatingJavaScriptFromString = null;
|
745
761
|
Method mSendMessage = null;
|
746
762
|
Object mWebViewCore = null;
|
@@ -789,11 +805,21 @@ public class SimpleMainView implements MainView {
|
|
789
805
|
//e.printStackTrace();
|
790
806
|
}
|
791
807
|
}
|
792
|
-
|
808
|
+
|
793
809
|
if (!mHasReflectionWasExecutedOK) {
|
794
810
|
//com.rhomobile.rhodes.WebView.executeJs(js, index);
|
795
|
-
|
796
|
-
|
811
|
+
final String js_code = js;
|
812
|
+
if(Looper.getMainLooper().getThread() == Thread.currentThread()) {
|
813
|
+
((WebView)webView.getView()).evaluateJavascript(js_code, null);
|
814
|
+
}
|
815
|
+
else {
|
816
|
+
PerformOnUiThread.exec(new Runnable() {
|
817
|
+
public void run() {
|
818
|
+
((WebView)webView.getView()).evaluateJavascript(js_code, null);
|
819
|
+
}
|
820
|
+
});
|
821
|
+
}
|
822
|
+
//navigate("javascript:"+js, index);
|
797
823
|
}
|
798
824
|
}
|
799
825
|
|
data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality26.java
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
package com.rhomobile.rhodes.osfunctionality;
|
28
28
|
|
29
|
-
import
|
29
|
+
import androidx.annotation.RequiresApi;
|
30
30
|
import android.app.Notification.Builder;
|
31
31
|
import android.content.Context;
|
32
32
|
import android.app.NotificationManager;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
package com.rhomobile.rhodes.permissioncheck;
|
2
|
+
|
3
|
+
import android.graphics.Canvas;
|
4
|
+
import android.graphics.Color;
|
5
|
+
import android.graphics.ColorFilter;
|
6
|
+
import android.graphics.Paint;
|
7
|
+
import android.graphics.Path;
|
8
|
+
import android.graphics.PixelFormat;
|
9
|
+
import android.graphics.Rect;
|
10
|
+
import android.graphics.drawable.Drawable;
|
11
|
+
|
12
|
+
public class CheckDrawable extends Drawable {
|
13
|
+
private Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
14
|
+
private Path mPath = new Path();
|
15
|
+
|
16
|
+
@Override
|
17
|
+
public void draw(Canvas canvas) {
|
18
|
+
mPaint.setColor(Color.parseColor("#40FF00"));
|
19
|
+
canvas.drawPath(mPath,mPaint);
|
20
|
+
}
|
21
|
+
|
22
|
+
@Override
|
23
|
+
public int getOpacity() {
|
24
|
+
return PixelFormat.TRANSLUCENT;
|
25
|
+
}
|
26
|
+
|
27
|
+
@Override
|
28
|
+
public void setAlpha(int alpha) {
|
29
|
+
mPaint.setAlpha(alpha);
|
30
|
+
}
|
31
|
+
|
32
|
+
@Override
|
33
|
+
public void setColorFilter(ColorFilter colorFilter) {
|
34
|
+
mPaint.setColorFilter(colorFilter);
|
35
|
+
}
|
36
|
+
|
37
|
+
@Override
|
38
|
+
protected void onBoundsChange(Rect bounds) {
|
39
|
+
super.onBoundsChange(bounds);
|
40
|
+
|
41
|
+
int width = bounds.width();
|
42
|
+
int height = bounds.height();
|
43
|
+
|
44
|
+
mPath.reset();
|
45
|
+
mPath.moveTo(0.375f * width, 0.67375f * height);
|
46
|
+
mPath.lineTo(0.20125f * width, 0.5f * height);
|
47
|
+
mPath.lineTo(0.142083333f * width, 0.55875f * height);
|
48
|
+
mPath.lineTo(0.375f * width, 0.791666667f * height);
|
49
|
+
mPath.lineTo(0.875f * width, 0.291666667f * height);
|
50
|
+
mPath.lineTo(0.81625f * width, 0.232916667f * height);
|
51
|
+
mPath.close();
|
52
|
+
}
|
53
|
+
}
|
data/platform/android/Rhodes/src/com/rhomobile/rhodes/permissioncheck/PermissionListGenerate.java
ADDED
@@ -0,0 +1,366 @@
|
|
1
|
+
package com.rhomobile.rhodes.permissioncheck;
|
2
|
+
|
3
|
+
import android.app.Activity;
|
4
|
+
import android.app.AlertDialog;
|
5
|
+
import android.content.Context;
|
6
|
+
import android.content.Intent;
|
7
|
+
import android.content.pm.PackageInfo;
|
8
|
+
import android.content.pm.PackageManager;
|
9
|
+
import android.content.pm.PermissionInfo;
|
10
|
+
import android.graphics.Color;
|
11
|
+
import android.graphics.drawable.Drawable;
|
12
|
+
import android.net.Uri;
|
13
|
+
import android.os.Build;
|
14
|
+
import android.os.Environment;
|
15
|
+
import android.provider.Settings;
|
16
|
+
import android.view.Gravity;
|
17
|
+
import android.view.View;
|
18
|
+
import android.widget.Button;
|
19
|
+
import android.widget.ImageView;
|
20
|
+
import android.widget.LinearLayout;
|
21
|
+
import android.widget.ScrollView;
|
22
|
+
import android.widget.TextView;
|
23
|
+
import android.util.Log;
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
import androidx.annotation.NonNull;
|
28
|
+
import androidx.core.app.ActivityCompat;
|
29
|
+
import androidx.core.content.ContextCompat;
|
30
|
+
|
31
|
+
import java.util.ArrayList;
|
32
|
+
import java.util.HashMap;
|
33
|
+
import java.util.Locale;
|
34
|
+
import java.util.Map;
|
35
|
+
|
36
|
+
import com.rhomobile.rhodes.RhoConf;
|
37
|
+
import com.rhomobile.rhodes.kioskservices.PermissionManager;
|
38
|
+
|
39
|
+
|
40
|
+
public class PermissionListGenerate {
|
41
|
+
private final Context mContext;
|
42
|
+
private final Activity mActivity;
|
43
|
+
private AlertDialog mPermissionsDialog = null;
|
44
|
+
private final Map<String, ArrayList<String>> permissionsMap = new HashMap<String, ArrayList<String>>();
|
45
|
+
private AlertDialog.Builder ad;
|
46
|
+
final static private Integer MY_PERMISSIONS_REQUEST = 1;
|
47
|
+
private final String accessibility_key = "ACCESSIBILITY_SERVICE";
|
48
|
+
|
49
|
+
public PermissionListGenerate(Context context, Activity activity){
|
50
|
+
this.mContext = context;
|
51
|
+
this.mActivity = activity;
|
52
|
+
|
53
|
+
this.ad = new AlertDialog.Builder(context);
|
54
|
+
|
55
|
+
try {
|
56
|
+
init();
|
57
|
+
} catch (Exception e){
|
58
|
+
e.printStackTrace();
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
private void init() throws PackageManager.NameNotFoundException {
|
63
|
+
PackageInfo info = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(),PackageManager.GET_PERMISSIONS);
|
64
|
+
int sdkVersion = Build.VERSION.SDK_INT;
|
65
|
+
|
66
|
+
for(String p :info.requestedPermissions){
|
67
|
+
if(sdkVersion >= 29) {
|
68
|
+
PermissionInfo permissionInfo = mContext.getPackageManager().getPermissionInfo(p, 0);
|
69
|
+
int protectionLevel = permissionInfo.protectionLevel;
|
70
|
+
if (protectionLevel == PermissionInfo.PROTECTION_DANGEROUS || p.equals("android.permission.MANAGE_EXTERNAL_STORAGE"))
|
71
|
+
addToListPermission(p);
|
72
|
+
}else{
|
73
|
+
if(!p.equals("android.permission.MANAGE_EXTERNAL_STORAGE")){
|
74
|
+
PermissionInfo permissionInfo = mContext.getPackageManager().getPermissionInfo(p, 0);
|
75
|
+
int protectionLevel = permissionInfo.protectionLevel;
|
76
|
+
if (protectionLevel == PermissionInfo.PROTECTION_DANGEROUS)
|
77
|
+
addToListPermission(p);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
public void addToListPermission(String permissionName){
|
86
|
+
String nameKey = formatName(permissionName);
|
87
|
+
Log.d("permissionCheck", permissionName);
|
88
|
+
|
89
|
+
if(permissionsMap.get(nameKey) != null)
|
90
|
+
{
|
91
|
+
ArrayList<String> i = permissionsMap.get(nameKey);
|
92
|
+
if(!i.contains(permissionName)) {
|
93
|
+
i.add(permissionName);
|
94
|
+
permissionsMap.remove(nameKey);
|
95
|
+
permissionsMap.put(nameKey, i);
|
96
|
+
}
|
97
|
+
}else{
|
98
|
+
ArrayList<String> i = new ArrayList<String>();
|
99
|
+
i.add(permissionName);
|
100
|
+
permissionsMap.put(nameKey, i);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
|
105
|
+
@NonNull
|
106
|
+
private String formatName(String name) {
|
107
|
+
if(name == accessibility_key)
|
108
|
+
return "accessibility services";
|
109
|
+
|
110
|
+
name = name.toLowerCase(Locale.ROOT);
|
111
|
+
|
112
|
+
String[] splitNameToPoint = name.split("\\.");
|
113
|
+
String[] splitName = splitNameToPoint[splitNameToPoint.length -1].split("_");
|
114
|
+
|
115
|
+
StringBuilder returnName = new StringBuilder();
|
116
|
+
boolean firstWord = true;
|
117
|
+
for(int i = 0; i < splitName.length; i++){
|
118
|
+
if(!splitName[i].equals("read") && !splitName[i].equals("write") && !splitName[i].equals("manage"))
|
119
|
+
{
|
120
|
+
if(!firstWord)
|
121
|
+
returnName.append(" ");
|
122
|
+
else
|
123
|
+
firstWord = false;
|
124
|
+
|
125
|
+
returnName.append(splitName[i]);
|
126
|
+
}
|
127
|
+
}
|
128
|
+
return returnName.toString();
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
public boolean checkAllPermissionsStatus(){
|
134
|
+
if( RhoConf.isExist("click_sound_with_accessibility_service") &&
|
135
|
+
RhoConf.getBool("click_sound_with_accessibility_service")){
|
136
|
+
if(permissionsMap.get(accessibility_key) == null){
|
137
|
+
ArrayList<String> p = new ArrayList<String>();
|
138
|
+
p.add(accessibility_key);
|
139
|
+
permissionsMap.put(accessibility_key,p);
|
140
|
+
}
|
141
|
+
}
|
142
|
+
if(RhoConf.getInt("strict_permission_requirements") == 1){
|
143
|
+
for(Map.Entry<String, ArrayList<String>> entry : permissionsMap.entrySet()){
|
144
|
+
if(!getPermissionStatus(entry.getValue()))
|
145
|
+
return false;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
return true;
|
149
|
+
}
|
150
|
+
|
151
|
+
private boolean getPermissionStatus(@NonNull String pNameManifest){
|
152
|
+
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R &&
|
153
|
+
pNameManifest.equals("android.permission.MANAGE_EXTERNAL_STORAGE"))
|
154
|
+
return Environment.isExternalStorageManager();
|
155
|
+
else
|
156
|
+
return ContextCompat.checkSelfPermission(mContext, pNameManifest) == PackageManager.PERMISSION_GRANTED;
|
157
|
+
}
|
158
|
+
private boolean getPermissionStatus(@NonNull ArrayList<String> pNameManifest){
|
159
|
+
if(pNameManifest.contains(accessibility_key))
|
160
|
+
return PermissionManager.checkAccessibilityServicePermission(mContext);
|
161
|
+
|
162
|
+
for(String value : pNameManifest){
|
163
|
+
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && value.equals("android.permission.MANAGE_EXTERNAL_STORAGE")){
|
164
|
+
boolean manageExternal = Environment.isExternalStorageManager();
|
165
|
+
if(!manageExternal)
|
166
|
+
return false;
|
167
|
+
}
|
168
|
+
else
|
169
|
+
if(ContextCompat.checkSelfPermission(mContext, value) != PackageManager.PERMISSION_GRANTED)
|
170
|
+
return false;
|
171
|
+
}
|
172
|
+
return true;
|
173
|
+
}
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
public boolean isShowPermissionDialog(){
|
178
|
+
return mPermissionsDialog != null && mPermissionsDialog.isShowing();
|
179
|
+
}
|
180
|
+
public void closePermissionsDialog(){
|
181
|
+
if(mPermissionsDialog != null)
|
182
|
+
mPermissionsDialog.cancel();
|
183
|
+
}
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
public void showPermissionList(){
|
188
|
+
ad.setTitle("Permission check")
|
189
|
+
.setCancelable(false);
|
190
|
+
|
191
|
+
////////////////////////////////////////////////////////////
|
192
|
+
|
193
|
+
LinearLayout permissionLayout = new LinearLayout(mContext);
|
194
|
+
permissionLayout.setLayoutParams(new LinearLayout.LayoutParams(
|
195
|
+
LinearLayout.LayoutParams.MATCH_PARENT,
|
196
|
+
LinearLayout.LayoutParams.WRAP_CONTENT
|
197
|
+
));
|
198
|
+
permissionLayout.setOrientation(LinearLayout.VERTICAL);
|
199
|
+
permissionLayout.setBackgroundColor(Color.parseColor("#FFFFFF"));
|
200
|
+
|
201
|
+
////////////////////////////////////////////////////////////
|
202
|
+
|
203
|
+
TextView textView = new TextView(mContext);
|
204
|
+
textView.setTextSize(23);
|
205
|
+
textView.setText("This app requires some additional permissions in order to make its job properly:");
|
206
|
+
textView.setLayoutParams(new LinearLayout.LayoutParams(
|
207
|
+
LinearLayout.LayoutParams.WRAP_CONTENT,
|
208
|
+
LinearLayout.LayoutParams.WRAP_CONTENT
|
209
|
+
));
|
210
|
+
|
211
|
+
////////////////////////////////////////////////////////////
|
212
|
+
|
213
|
+
View space = new View(mContext);
|
214
|
+
space.setLayoutParams(new LinearLayout.LayoutParams(
|
215
|
+
LinearLayout.LayoutParams.MATCH_PARENT,
|
216
|
+
(int)convertDpToPixels(20)
|
217
|
+
));
|
218
|
+
|
219
|
+
////////////////////////////////////////////////////////////
|
220
|
+
|
221
|
+
permissionLayout.addView(textView);
|
222
|
+
permissionLayout.addView(space);
|
223
|
+
|
224
|
+
ScrollView scrollView = new ScrollView(mContext);
|
225
|
+
scrollView.setLayoutParams(new LinearLayout.LayoutParams(
|
226
|
+
LinearLayout.LayoutParams.MATCH_PARENT,
|
227
|
+
LinearLayout.LayoutParams.MATCH_PARENT
|
228
|
+
));
|
229
|
+
LinearLayout layoutForScrollView = new LinearLayout(mContext);
|
230
|
+
layoutForScrollView.setLayoutParams(new LinearLayout.LayoutParams(
|
231
|
+
LinearLayout.LayoutParams.MATCH_PARENT,
|
232
|
+
LinearLayout.LayoutParams.WRAP_CONTENT
|
233
|
+
));
|
234
|
+
layoutForScrollView.setOrientation(LinearLayout.VERTICAL);
|
235
|
+
layoutForScrollView.setBackgroundColor(Color.parseColor("#FFFFFF"));
|
236
|
+
|
237
|
+
for(Map.Entry<String, ArrayList<String>> entry : permissionsMap.entrySet()){
|
238
|
+
layoutForScrollView.addView(permissionLine(entry.getValue()));
|
239
|
+
}
|
240
|
+
|
241
|
+
scrollView.addView(layoutForScrollView);
|
242
|
+
permissionLayout.addView(scrollView);
|
243
|
+
|
244
|
+
ad.setView(permissionLayout);
|
245
|
+
mPermissionsDialog = ad.create();
|
246
|
+
mPermissionsDialog.show();
|
247
|
+
|
248
|
+
}
|
249
|
+
@NonNull
|
250
|
+
private LinearLayout permissionLine(@NonNull final ArrayList<String> pItems){
|
251
|
+
LinearLayout layout = new LinearLayout(mContext);
|
252
|
+
layout.setOrientation(LinearLayout.HORIZONTAL);
|
253
|
+
layout.setBackgroundColor(Color.parseColor("#F3F3F3"));
|
254
|
+
layout.setMinimumHeight(48);
|
255
|
+
layout.setMinimumWidth(88);
|
256
|
+
|
257
|
+
LinearLayout.LayoutParams lParams = new LinearLayout.LayoutParams(
|
258
|
+
LinearLayout.LayoutParams.MATCH_PARENT,
|
259
|
+
LinearLayout.LayoutParams.WRAP_CONTENT
|
260
|
+
);
|
261
|
+
lParams.setMargins(3,3,3,3);
|
262
|
+
layout.setLayoutParams(lParams);
|
263
|
+
|
264
|
+
////////////////////////////////////////////////////////////
|
265
|
+
|
266
|
+
TextView tv = new TextView(mContext);
|
267
|
+
|
268
|
+
LinearLayout.LayoutParams tvParams = new LinearLayout.LayoutParams(
|
269
|
+
LinearLayout.LayoutParams.WRAP_CONTENT,
|
270
|
+
LinearLayout.LayoutParams.WRAP_CONTENT
|
271
|
+
);
|
272
|
+
tvParams.setMargins(10,0,0,0);
|
273
|
+
|
274
|
+
tv.setLayoutParams(tvParams);
|
275
|
+
tv.setText(formatName(pItems.get(0)));
|
276
|
+
tv.setTextSize(20);
|
277
|
+
tv.setGravity(Gravity.CENTER);
|
278
|
+
|
279
|
+
////////////////////////////////////////////////////////////
|
280
|
+
|
281
|
+
View space = new View(mContext);
|
282
|
+
space.setLayoutParams(new LinearLayout.LayoutParams(0,0,1));
|
283
|
+
|
284
|
+
////////////////////////////////////////////////////////////
|
285
|
+
|
286
|
+
layout.addView(tv);
|
287
|
+
layout.addView(space);
|
288
|
+
|
289
|
+
////////////////////////////////////////////////////////////
|
290
|
+
|
291
|
+
if(getPermissionStatus(pItems)){
|
292
|
+
ImageView checkImg = new ImageView(mContext);
|
293
|
+
|
294
|
+
LinearLayout.LayoutParams imgParams = new LinearLayout.LayoutParams(
|
295
|
+
(int)convertDpToPixels(24),
|
296
|
+
(int)convertDpToPixels(24)
|
297
|
+
);
|
298
|
+
imgParams.gravity = Gravity.CENTER;
|
299
|
+
imgParams.rightMargin = (int) convertDpToPixels(10);
|
300
|
+
|
301
|
+
checkImg.setLayoutParams(imgParams);
|
302
|
+
Drawable dr = new CheckDrawable();
|
303
|
+
checkImg.setImageDrawable(dr);
|
304
|
+
|
305
|
+
layout.addView(checkImg);
|
306
|
+
}
|
307
|
+
else
|
308
|
+
{
|
309
|
+
Button btn = new Button(mContext);
|
310
|
+
|
311
|
+
LinearLayout.LayoutParams btnParams = new LinearLayout.LayoutParams(
|
312
|
+
(int) convertDpToPixels(130),
|
313
|
+
(int) convertDpToPixels(40)
|
314
|
+
);
|
315
|
+
btnParams.setMargins(0,0,(int)convertDpToPixels(3),0);
|
316
|
+
|
317
|
+
btn.setLayoutParams(btnParams);
|
318
|
+
btn.setText("Settings...");
|
319
|
+
btn.setTextColor(Color.parseColor("#FFFFFF"));
|
320
|
+
btn.setTextSize(15);
|
321
|
+
btn.setGravity(Gravity.CENTER);
|
322
|
+
btn.setBackgroundColor(Color.parseColor("#5CD9FF"));
|
323
|
+
btn.setOnClickListener(new View.OnClickListener(){
|
324
|
+
@Override
|
325
|
+
public void onClick(View v) {
|
326
|
+
if(pItems.contains(accessibility_key))
|
327
|
+
PermissionManager.setAccessibilityServicePermission(mActivity);
|
328
|
+
|
329
|
+
openManageExternalStorage(pItems);
|
330
|
+
|
331
|
+
ActivityCompat.requestPermissions(mActivity, pItems.toArray(new String[0]), MY_PERMISSIONS_REQUEST);
|
332
|
+
mPermissionsDialog.cancel();
|
333
|
+
}
|
334
|
+
});
|
335
|
+
|
336
|
+
layout.addView(btn);
|
337
|
+
|
338
|
+
}
|
339
|
+
|
340
|
+
////////////////////////////////////////////////////////////
|
341
|
+
|
342
|
+
return layout;
|
343
|
+
}
|
344
|
+
|
345
|
+
private void openManageExternalStorage(@NonNull final ArrayList<String> pItems){
|
346
|
+
if(pItems.contains("android.permission.MANAGE_EXTERNAL_STORAGE") &&
|
347
|
+
!getPermissionStatus("android.permission.MANAGE_EXTERNAL_STORAGE")){
|
348
|
+
try{
|
349
|
+
Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION);
|
350
|
+
intent.addCategory("android.intent.category.DEFAULT");
|
351
|
+
intent.setData(Uri.parse(String.format("package:%s", mContext.getPackageName())));
|
352
|
+
mActivity.startActivity(intent);
|
353
|
+
} catch (Exception e) {
|
354
|
+
Intent intent = new Intent();
|
355
|
+
intent.setAction(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION);
|
356
|
+
mActivity.startActivity(intent);
|
357
|
+
}
|
358
|
+
}
|
359
|
+
}
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
private float convertDpToPixels(float dp) {
|
364
|
+
return dp * mContext.getResources().getDisplayMetrics().density;
|
365
|
+
}
|
366
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
4
|
+
<exclude-output />
|
5
|
+
<content url="file://$MODULE_DIR$">
|
6
|
+
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" packagePrefix="com.rhomobile.rhodes" />
|
7
|
+
</content>
|
8
|
+
<orderEntry type="inheritedJdk" />
|
9
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
10
|
+
</component>
|
11
|
+
</module>
|
@@ -640,6 +640,7 @@ public class SSLImpl {
|
|
640
640
|
String host = st.nextToken();
|
641
641
|
|
642
642
|
SSLSocket aSock = (SSLSocket)f.createSocket(s, host, remote.port, true);
|
643
|
+
aSock.setEnabledProtocols(new String[] {"TLSv1", "TLSv1.1","TLSv1.2"});
|
643
644
|
aSock.setUseClientMode(true);
|
644
645
|
|
645
646
|
synchronized (this) {
|