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
@@ -12,7 +12,7 @@ public abstract class AbstractRhoExtension implements IRhoExtension {
|
|
12
12
|
public IRhoWebView onCreateWebView(IRhoExtManager extManager, int tabIndex) {
|
13
13
|
return null;
|
14
14
|
}
|
15
|
-
|
15
|
+
|
16
16
|
@Override
|
17
17
|
public boolean onWebViewCreated(IRhoExtManager extManager, IRhoWebView ext, boolean res) {
|
18
18
|
return res;
|
@@ -64,6 +64,17 @@ public abstract class AbstractRhoExtension implements IRhoExtension {
|
|
64
64
|
return res;
|
65
65
|
}
|
66
66
|
|
67
|
+
@Override
|
68
|
+
public boolean onGoBack(IRhoExtManager extManager, String current_url, String back_url, IRhoWebView ext, boolean res) {
|
69
|
+
return res;
|
70
|
+
}
|
71
|
+
|
72
|
+
@Override
|
73
|
+
public boolean onGoForward(IRhoExtManager extManager, String current_url, String forward_url, IRhoWebView ext, boolean res) {
|
74
|
+
return res;
|
75
|
+
}
|
76
|
+
|
77
|
+
|
67
78
|
@Override
|
68
79
|
public boolean onAlert(IRhoExtManager extManager, String message, IRhoWebView ext, IAlertResult alertResult, boolean res) {
|
69
80
|
return res;
|
@@ -113,7 +124,7 @@ public abstract class AbstractRhoExtension implements IRhoExtension {
|
|
113
124
|
public void onAppActivate(IRhoExtManager extManager, boolean bActivate) {
|
114
125
|
}
|
115
126
|
|
116
|
-
|
127
|
+
|
117
128
|
@Override
|
118
129
|
public boolean startLocationUpdates(IRhoExtManager extManager, boolean highAccuracy, IRhoWebView ext, boolean res) {
|
119
130
|
return res;
|
@@ -133,7 +144,7 @@ public abstract class AbstractRhoExtension implements IRhoExtension {
|
|
133
144
|
public boolean onNewConfig(IRhoExtManager extManager, IRhoConfig config, String name, boolean res) {
|
134
145
|
return res;
|
135
146
|
}
|
136
|
-
|
147
|
+
|
137
148
|
@Override
|
138
149
|
public String onGetProperty(IRhoExtManager extManager, String name) {
|
139
150
|
return null;
|
@@ -3,6 +3,8 @@ package com.rhomobile.rhodes.extmanager;
|
|
3
3
|
import android.content.Context;
|
4
4
|
import android.view.KeyEvent;
|
5
5
|
import android.view.View;
|
6
|
+
import android.graphics.Rect;
|
7
|
+
|
6
8
|
|
7
9
|
public interface IRhoExtManager {
|
8
10
|
|
@@ -103,6 +105,8 @@ public interface IRhoExtManager {
|
|
103
105
|
* @param requestCode value to erase from map
|
104
106
|
*/
|
105
107
|
void dropActivityResultRequestCode(int requestCode);
|
108
|
+
|
109
|
+
void onInputMethod(View view, boolean enabled, String type, Rect area);
|
106
110
|
}
|
107
111
|
|
108
112
|
|
@@ -36,6 +36,8 @@ public interface IRhoExtension {
|
|
36
36
|
boolean onNavigateProgress(IRhoExtManager extManager, String url, int pos, int total, IRhoWebView ext, boolean res);
|
37
37
|
boolean onNavigateComplete(IRhoExtManager extManager, String url, IRhoWebView ext, boolean res);
|
38
38
|
boolean onDocumentComplete(IRhoExtManager extManager, String url, IRhoWebView ext, boolean res);
|
39
|
+
boolean onGoBack(IRhoExtManager extManager, String current_url, String back_url, IRhoWebView ext, boolean res);
|
40
|
+
boolean onGoForward(IRhoExtManager extManager, String current_url, String forward_url, IRhoWebView ext, boolean res);
|
39
41
|
boolean onAlert(IRhoExtManager extManager, String message, IRhoWebView ext, IAlertResult alertResult, boolean res);
|
40
42
|
boolean onConfirm(IRhoExtManager extManager, String message, IRhoWebView ext, IAlertResult confirmResult, boolean res);
|
41
43
|
boolean onPrompt(IRhoExtManager extManager, String message, String defaultResponse, IRhoWebView ext, IPromptResult promptResult, boolean res);
|
@@ -45,16 +47,15 @@ public interface IRhoExtension {
|
|
45
47
|
boolean onConsole(IRhoExtManager extManager, String message, IRhoWebView ext, boolean res);
|
46
48
|
boolean onInputMethod(IRhoExtManager extManager, boolean enabled, String type, Rect area, IRhoWebView ext, boolean res);
|
47
49
|
boolean onNavigateError(IRhoExtManager extManager, String url, LoadErrorReason reason, IRhoWebView ext, boolean res);
|
48
|
-
boolean onAuthRequest(IRhoExtManager extManager, IAuthRequest request, IRhoWebView ext, boolean res);
|
50
|
+
boolean onAuthRequest(IRhoExtManager extManager, IAuthRequest request, IRhoWebView ext, boolean res);
|
49
51
|
|
50
52
|
void onAppActivate(IRhoExtManager extManager, boolean bActivate);
|
51
53
|
|
52
|
-
|
53
|
-
boolean startLocationUpdates(IRhoExtManager extManager, boolean highAccuracy, IRhoWebView ext, boolean res);
|
54
|
+
|
55
|
+
boolean startLocationUpdates(IRhoExtManager extManager, boolean highAccuracy, IRhoWebView ext, boolean res);
|
54
56
|
boolean stopLocationUpdates(IRhoExtManager extManager, IRhoWebView ext, boolean res);
|
55
57
|
|
56
58
|
boolean onNewConfig(IRhoExtManager extManager, IRhoConfig config, String name, boolean res);
|
57
59
|
|
58
60
|
String onGetProperty(IRhoExtManager extManager, String name);
|
59
61
|
}
|
60
|
-
|
@@ -63,7 +63,7 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
63
63
|
private IRhoWebView makeDefExtData(View view) {
|
64
64
|
return RhodesActivity.safeGetInstance().getMainView().getWebView(view);
|
65
65
|
}
|
66
|
-
|
66
|
+
|
67
67
|
private static native void nativeRequireRubyFile(String path);
|
68
68
|
static native String nativeJSCallEntryPoint(String query);
|
69
69
|
|
@@ -77,22 +77,22 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
77
77
|
throw new IllegalArgumentException("Cannot get " + className + "." + idName, e);
|
78
78
|
}
|
79
79
|
}
|
80
|
-
|
80
|
+
|
81
81
|
|
82
82
|
public RhoExtManagerImpl() {
|
83
83
|
mConfigs.put("rhoconfig", new RhoConf.RhoConfig());
|
84
84
|
}
|
85
|
-
|
85
|
+
|
86
86
|
@Override
|
87
87
|
public int getActivityResultNextRequestCode(IRhoListener listener) {
|
88
|
-
|
88
|
+
|
89
89
|
synchronized (mLastActivityRequestCode) {
|
90
90
|
++mLastActivityRequestCode;
|
91
91
|
mActivityResultListeners.append(mLastActivityRequestCode.intValue(), listener);
|
92
92
|
}
|
93
93
|
return mLastActivityRequestCode;
|
94
94
|
}
|
95
|
-
|
95
|
+
|
96
96
|
@Override
|
97
97
|
public void dropActivityResultRequestCode(int requestCode) {
|
98
98
|
synchronized (mLastActivityRequestCode) {
|
@@ -121,7 +121,7 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
121
121
|
mListeners.add(listener);
|
122
122
|
}
|
123
123
|
}
|
124
|
-
|
124
|
+
|
125
125
|
|
126
126
|
@Override
|
127
127
|
public void setConfig(String name, IRhoConfig config) {
|
@@ -206,13 +206,13 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
206
206
|
|
207
207
|
@Override
|
208
208
|
public void stopNavigate(final IRhoExtension.LoadErrorReason reason) {
|
209
|
-
|
210
|
-
|
209
|
+
|
210
|
+
|
211
211
|
//WebView.stopNavigate();
|
212
|
-
|
212
|
+
|
213
213
|
final RhodesActivity activity = RhodesActivity.safeGetInstance();
|
214
214
|
final MainView mainView = activity.getMainView();
|
215
|
-
|
215
|
+
|
216
216
|
// In case stopNavigate is called from onBeforeNavigate
|
217
217
|
// we must be aware that all other parties (extensions) finish to proceed current event
|
218
218
|
activity.post(new Runnable() {
|
@@ -231,7 +231,7 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
231
231
|
public void historyBack() {
|
232
232
|
WebView.navigateBack();
|
233
233
|
}
|
234
|
-
|
234
|
+
|
235
235
|
@Override
|
236
236
|
public boolean onKey(int keyCode, KeyEvent event){
|
237
237
|
for(IRhoListener listener: mKeyListeners){
|
@@ -254,7 +254,7 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
254
254
|
|
255
255
|
@Override
|
256
256
|
public void setFullScreen(boolean fullScreen) {
|
257
|
-
|
257
|
+
|
258
258
|
}
|
259
259
|
|
260
260
|
@Override
|
@@ -302,7 +302,7 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
302
302
|
return RhodesService.getBuildConfig(name);
|
303
303
|
}
|
304
304
|
|
305
|
-
/**
|
305
|
+
/**
|
306
306
|
* @return is extension allowed to navigate to its start page
|
307
307
|
*/
|
308
308
|
@Override
|
@@ -351,24 +351,24 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
351
351
|
}
|
352
352
|
return res;
|
353
353
|
}
|
354
|
-
|
354
|
+
|
355
355
|
public void enableLogLevelError(boolean enabled) {
|
356
356
|
Logger.I(TAG, "RE Error log: " + enabled);
|
357
357
|
mLogError = enabled;
|
358
358
|
}
|
359
|
-
public void enableLogLevelWarning(boolean enabled) {
|
359
|
+
public void enableLogLevelWarning(boolean enabled) {
|
360
360
|
Logger.I(TAG, "RE Warning log: " + enabled);
|
361
|
-
mLogWarning = enabled;
|
361
|
+
mLogWarning = enabled;
|
362
362
|
}
|
363
|
-
public void enableLogLevelInfo(boolean enabled) {
|
363
|
+
public void enableLogLevelInfo(boolean enabled) {
|
364
364
|
Logger.I(TAG, "RE Info log: " + enabled);
|
365
365
|
mLogInfo = enabled;
|
366
366
|
}
|
367
|
-
public void enableLogLevelUser(boolean enabled) {
|
367
|
+
public void enableLogLevelUser(boolean enabled) {
|
368
368
|
Logger.I(TAG, "RE User log: " + enabled);
|
369
369
|
mLogUser = enabled;
|
370
370
|
}
|
371
|
-
public void enableLogLevelDebug(boolean enabled) {
|
371
|
+
public void enableLogLevelDebug(boolean enabled) {
|
372
372
|
Logger.I(TAG, "RE Debug log: " + enabled);
|
373
373
|
mLogDebug = enabled;
|
374
374
|
}
|
@@ -398,7 +398,7 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
398
398
|
Logger.E(tag, msg);
|
399
399
|
}
|
400
400
|
|
401
|
-
|
401
|
+
|
402
402
|
public void onSetPropertiesData(View view,String propId, String data, int position, int total) {
|
403
403
|
IRhoWebView rhoWebView = makeDefExtData(view);
|
404
404
|
synchronized (mExtensions) {
|
@@ -409,7 +409,7 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
409
409
|
}
|
410
410
|
}
|
411
411
|
|
412
|
-
private boolean isFirstNavigate() {
|
412
|
+
private boolean isFirstNavigate() {
|
413
413
|
return mFirstNavigate;
|
414
414
|
}
|
415
415
|
|
@@ -475,6 +475,41 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
475
475
|
}
|
476
476
|
}
|
477
477
|
|
478
|
+
public void onGoBack(View view, String current_url, String back_url) {
|
479
|
+
IRhoWebView rhoWebView = null;
|
480
|
+
try {
|
481
|
+
int tabIndex = RhodesActivity.safeGetInstance().getMainView().getWebViewTab(view);
|
482
|
+
rhoWebView = RhodesActivity.safeGetInstance().getMainView().getWebView(tabIndex);
|
483
|
+
}
|
484
|
+
catch(IllegalArgumentException ex) {
|
485
|
+
Logger.W(TAG, "Cannot get webView object for onGoBack event: WebView object is destroyed.");
|
486
|
+
}
|
487
|
+
synchronized (mExtensions) {
|
488
|
+
boolean res = false;
|
489
|
+
for (IRhoExtension ext : mExtensions.values()) {
|
490
|
+
res = ext.onGoBack(this, current_url, back_url, rhoWebView, res);
|
491
|
+
}
|
492
|
+
}
|
493
|
+
}
|
494
|
+
|
495
|
+
public void onGoForward(View view, String current_url, String forward_url) {
|
496
|
+
IRhoWebView rhoWebView = null;
|
497
|
+
try {
|
498
|
+
int tabIndex = RhodesActivity.safeGetInstance().getMainView().getWebViewTab(view);
|
499
|
+
rhoWebView = RhodesActivity.safeGetInstance().getMainView().getWebView(tabIndex);
|
500
|
+
}
|
501
|
+
catch(IllegalArgumentException ex) {
|
502
|
+
Logger.W(TAG, "Cannot get webView object for onGoForward event: WebView object is destroyed.");
|
503
|
+
}
|
504
|
+
synchronized (mExtensions) {
|
505
|
+
boolean res = false;
|
506
|
+
for (IRhoExtension ext : mExtensions.values()) {
|
507
|
+
res = ext.onGoForward(this, current_url, forward_url, rhoWebView, res);
|
508
|
+
}
|
509
|
+
}
|
510
|
+
}
|
511
|
+
|
512
|
+
|
478
513
|
public void onAppActivate(boolean isActivate) {
|
479
514
|
Logger.T(TAG, "onAppActivate: " + isActivate);
|
480
515
|
synchronized (mExtensions) {
|
@@ -562,12 +597,13 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
562
597
|
}
|
563
598
|
}
|
564
599
|
|
600
|
+
|
565
601
|
public void onAuthRequest(View view, final IRhoExtension.IAuthRequest request) {
|
566
602
|
final IRhoWebView rhoWebView = makeDefExtData(view);
|
567
603
|
boolean res = false;
|
568
604
|
synchronized (mExtensions) {
|
569
605
|
for (IRhoExtension ext : mExtensions.values()) {
|
570
|
-
res = ext.onAuthRequest(this, request, rhoWebView, res);
|
606
|
+
res = res || ext.onAuthRequest(this, request, rhoWebView, res);
|
571
607
|
}
|
572
608
|
}
|
573
609
|
if (!res) {
|
@@ -580,36 +616,36 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
580
616
|
realmView.setPadding(10, 10, 10, 10);
|
581
617
|
|
582
618
|
TableLayout formLayout = new TableLayout(ctx);
|
583
|
-
|
619
|
+
|
584
620
|
TableRow userRow = new TableRow(ctx);
|
585
|
-
|
621
|
+
|
586
622
|
TextView userPrompt = new TextView(ctx, null, android.R.style.Widget_TextView);
|
587
623
|
userPrompt.setText("Name:");
|
588
624
|
userPrompt.setPadding(0, 0, 10, 0);
|
589
625
|
final EditText userField = new EditText(ContextFactory.getUiContext());
|
590
626
|
userField.setSingleLine();
|
591
627
|
userField.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
592
|
-
|
628
|
+
|
593
629
|
userRow.addView(userPrompt);
|
594
630
|
userRow.addView(userField);
|
595
631
|
//userRow.setPadding(5, 0, 0, 5);
|
596
632
|
formLayout.addView(userRow);
|
597
|
-
|
633
|
+
|
598
634
|
TableRow passRow = new TableRow(ctx);
|
599
|
-
|
635
|
+
|
600
636
|
TextView passPrompt = new TextView(ctx, null, android.R.style.Widget_TextView);
|
601
637
|
passPrompt.setText("Password:");
|
602
638
|
passPrompt.setPadding(0, 0, 10, 0);
|
603
639
|
final EditText passField = new EditText(ContextFactory.getUiContext());
|
604
640
|
passField.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
|
605
641
|
passField.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
606
|
-
|
642
|
+
|
607
643
|
passRow.addView(passPrompt);
|
608
644
|
passRow.addView(passField);
|
609
645
|
//passRow.setPadding(5, 0, 0, 5);
|
610
646
|
formLayout.addView(passRow);
|
611
647
|
formLayout.setColumnStretchable(1, true);
|
612
|
-
|
648
|
+
|
613
649
|
mainLayout.addView(realmView, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
|
614
650
|
mainLayout.addView(formLayout, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
|
615
651
|
|
@@ -742,7 +778,7 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
742
778
|
final TextView promptView = new TextView(ContextFactory.getUiContext(), null, android.R.style.Widget_TextView);
|
743
779
|
promptView.setPadding(10, 10, 10, 10);
|
744
780
|
final EditText input = new EditText(ContextFactory.getUiContext());
|
745
|
-
|
781
|
+
|
746
782
|
layout.addView(promptView, 0, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
|
747
783
|
layout.addView(input, 1, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
|
748
784
|
|
@@ -840,7 +876,7 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
840
876
|
{
|
841
877
|
startKeyEventUpdates(listener, false);
|
842
878
|
}
|
843
|
-
|
879
|
+
|
844
880
|
@Override
|
845
881
|
public void startKeyEventUpdates(IRhoListener listener, boolean makeImportant)
|
846
882
|
{
|
@@ -855,7 +891,7 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
855
891
|
}
|
856
892
|
}
|
857
893
|
}
|
858
|
-
|
894
|
+
|
859
895
|
@Override
|
860
896
|
public void stopKeyEventUpdates(IRhoListener listener)
|
861
897
|
{
|
@@ -875,11 +911,11 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
875
911
|
}
|
876
912
|
return null;
|
877
913
|
}
|
878
|
-
|
914
|
+
|
879
915
|
public void createRhoListeners() {
|
880
916
|
for (String classname: RhodesStartupListeners.ourRunnableList) {
|
881
917
|
if (classname.length() == 0) continue;
|
882
|
-
|
918
|
+
|
883
919
|
Class<? extends IRhoListener> klass = null;
|
884
920
|
try {
|
885
921
|
klass = Class.forName(classname).asSubclass(IRhoListener.class);
|
@@ -911,6 +947,12 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
911
947
|
}
|
912
948
|
activity.getMainView().setWebView(createWebView(activity, 0), 0);
|
913
949
|
}
|
950
|
+
|
951
|
+
public void doFullResetWebViewByCreateNewOne() {
|
952
|
+
RhodesActivity.safeGetInstance().getMainView().setWebView(createWebView(RhodesActivity.safeGetInstance(), 0), 0);
|
953
|
+
}
|
954
|
+
|
955
|
+
|
914
956
|
public void onStartActivity(RhodesActivity activity) {
|
915
957
|
for (IRhoListener listener: mListeners) {
|
916
958
|
listener.onStart(activity);
|
@@ -981,19 +1023,19 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
981
1023
|
listener.onConfigurationChanged(activity, newConfig);
|
982
1024
|
}
|
983
1025
|
}
|
984
|
-
|
1026
|
+
|
985
1027
|
public void onEBLicenseVisible() {
|
986
1028
|
for (IRhoListener listener: mListeners) {
|
987
1029
|
listener.onEBLicenseVisible();
|
988
1030
|
}
|
989
1031
|
}
|
990
|
-
|
1032
|
+
|
991
1033
|
public void onEBLicenseHidden() {
|
992
1034
|
for (IRhoListener listener: mListeners) {
|
993
1035
|
listener.onEBLicenseHidden();
|
994
1036
|
}
|
995
1037
|
}
|
996
|
-
|
1038
|
+
|
997
1039
|
public void onEBLicenseDestroyed() {
|
998
1040
|
for (IRhoListener listener: mListeners) {
|
999
1041
|
listener.onEBLicenseDestroyed();
|
@@ -1001,4 +1043,3 @@ public class RhoExtManagerImpl implements IRhoExtManager {
|
|
1001
1043
|
}
|
1002
1044
|
|
1003
1045
|
}
|
1004
|
-
|
@@ -69,7 +69,12 @@ public class GeoLocation {
|
|
69
69
|
ourSpeed = loc.getSpeed();
|
70
70
|
//The way of getiing satellites is changed
|
71
71
|
//ourSatellities = getImpl().getSatellities();
|
72
|
-
|
72
|
+
android.os.Bundle extras = loc.getExtras();
|
73
|
+
if (extras != null) {
|
74
|
+
ourSatellities = extras.getInt("satellites");
|
75
|
+
} else {
|
76
|
+
ourSatellities = 0;
|
77
|
+
}
|
73
78
|
ourIsKnownPosition = true;
|
74
79
|
}
|
75
80
|
else {
|
@@ -166,9 +171,9 @@ public class GeoLocation {
|
|
166
171
|
return false;
|
167
172
|
}
|
168
173
|
|
169
|
-
public static double getLatitude() {
|
170
|
-
onUpdateLocation();
|
174
|
+
public static double getLatitude() {
|
171
175
|
try {
|
176
|
+
onUpdateLocation();
|
172
177
|
checkState();
|
173
178
|
Logger.T(TAG, "getLatitude");
|
174
179
|
return ourLatitude;
|
@@ -179,9 +184,9 @@ public class GeoLocation {
|
|
179
184
|
return 0.0;
|
180
185
|
}
|
181
186
|
|
182
|
-
public static double getSpeed() {
|
183
|
-
onUpdateLocation();
|
187
|
+
public static double getSpeed() {
|
184
188
|
try {
|
189
|
+
onUpdateLocation();
|
185
190
|
checkState();
|
186
191
|
Logger.T(TAG, "getSpeed");
|
187
192
|
return ourSpeed;
|
@@ -192,9 +197,9 @@ public class GeoLocation {
|
|
192
197
|
return 0.0;
|
193
198
|
}
|
194
199
|
|
195
|
-
public static int getSatellities() {
|
196
|
-
onUpdateLocation();
|
200
|
+
public static int getSatellities() {
|
197
201
|
try {
|
202
|
+
onUpdateLocation();
|
198
203
|
checkState();
|
199
204
|
Logger.T(TAG, "getSatellities");
|
200
205
|
return ourSatellities;
|
@@ -206,9 +211,9 @@ public class GeoLocation {
|
|
206
211
|
}
|
207
212
|
|
208
213
|
|
209
|
-
public static double getLongitude() {
|
210
|
-
onUpdateLocation();
|
214
|
+
public static double getLongitude() {
|
211
215
|
try {
|
216
|
+
onUpdateLocation();
|
212
217
|
checkState();
|
213
218
|
Logger.T(TAG, "getLongitude");
|
214
219
|
return ourLongitude;
|
@@ -219,9 +224,9 @@ public class GeoLocation {
|
|
219
224
|
return 0.0;
|
220
225
|
}
|
221
226
|
|
222
|
-
public static double getAltitude() {
|
223
|
-
onUpdateLocation();
|
227
|
+
public static double getAltitude() {
|
224
228
|
try {
|
229
|
+
onUpdateLocation();
|
225
230
|
checkState();
|
226
231
|
Logger.T(TAG, "getAltitude");
|
227
232
|
return ourAltitude;
|
@@ -232,9 +237,9 @@ public class GeoLocation {
|
|
232
237
|
return 0.0;
|
233
238
|
}
|
234
239
|
|
235
|
-
public static float getAccuracy() {
|
236
|
-
onUpdateLocation();
|
240
|
+
public static float getAccuracy() {
|
237
241
|
try {
|
242
|
+
onUpdateLocation();
|
238
243
|
checkState();
|
239
244
|
Logger.T(TAG, "getAccuracy");
|
240
245
|
return (float)ourAccuracy;
|
@@ -245,9 +250,9 @@ public class GeoLocation {
|
|
245
250
|
return 0;
|
246
251
|
}
|
247
252
|
|
248
|
-
public static boolean isKnownPosition() {
|
249
|
-
onUpdateLocation();
|
253
|
+
public static boolean isKnownPosition() {
|
250
254
|
try {
|
255
|
+
onUpdateLocation();
|
251
256
|
checkState();
|
252
257
|
Logger.T(TAG, "isKnownPosition");
|
253
258
|
return ourIsKnownPosition;
|
@@ -87,13 +87,17 @@ public class GeoLocationImpl {
|
|
87
87
|
}
|
88
88
|
}
|
89
89
|
if(this.provider != null) {
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
90
|
+
try {
|
91
|
+
if (exMode) {
|
92
|
+
this.manager.requestLocationUpdates(providerName, minTime, (float)minDistance, this);
|
93
|
+
}
|
94
|
+
else {
|
95
|
+
this.manager.requestLocationUpdates(providerName, UPDATE_PERIOD_IN_MILLISECONDS, 0, this, Looper.getMainLooper());
|
96
|
+
}
|
97
|
+
available = this.manager.isProviderEnabled(this.providerName);
|
98
|
+
} catch ( SecurityException e ) {
|
99
|
+
Logger.E(TAG,e);
|
95
100
|
}
|
96
|
-
available = this.manager.isProviderEnabled(this.providerName);
|
97
101
|
}
|
98
102
|
return available;
|
99
103
|
}
|
@@ -102,7 +106,7 @@ public class GeoLocationImpl {
|
|
102
106
|
available = false;
|
103
107
|
if (this.provider != null && this.manager != null) {
|
104
108
|
Logger.T(TAG, "Unregistering location listener for '" + this.providerName + "'.");
|
105
|
-
this.manager.removeUpdates(this);
|
109
|
+
this.manager.removeUpdates(this);
|
106
110
|
this.provider = null;
|
107
111
|
return true;
|
108
112
|
}
|
@@ -112,8 +116,13 @@ public class GeoLocationImpl {
|
|
112
116
|
|
113
117
|
void requestLastLocation() {
|
114
118
|
if (this.provider != null && this.manager != null) {
|
115
|
-
|
116
|
-
|
119
|
+
try
|
120
|
+
{
|
121
|
+
Location location = this.manager.getLastKnownLocation(this.providerName);
|
122
|
+
onLocationChanged(location);
|
123
|
+
} catch ( SecurityException e ) {
|
124
|
+
Logger.E(TAG,e);
|
125
|
+
}
|
117
126
|
}
|
118
127
|
}
|
119
128
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
package com.rhomobile.rhodes.kioskservices;
|
2
|
+
|
3
|
+
import android.content.BroadcastReceiver;
|
4
|
+
import android.content.Context;
|
5
|
+
import android.content.Intent;
|
6
|
+
import android.telecom.TelecomManager;
|
7
|
+
import android.telephony.TelephonyManager;
|
8
|
+
import android.widget.Toast;
|
9
|
+
|
10
|
+
import java.net.URISyntaxException;
|
11
|
+
|
12
|
+
public class CallReceiver extends BroadcastReceiver {
|
13
|
+
@Override
|
14
|
+
public void onReceive(Context context, Intent intent) {
|
15
|
+
TelephonyManager telephonyManager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
|
16
|
+
TelecomManager telecomManager = (TelecomManager)context.getSystemService(Context.TELECOM_SERVICE);
|
17
|
+
|
18
|
+
if(KioskManager.getKioskModeStatus() && telephonyManager.getCallState() == TelephonyManager.CALL_STATE_RINGING){
|
19
|
+
telecomManager.endCall();
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
package com.rhomobile.rhodes.kioskservices;
|
2
|
+
|
3
|
+
public interface IKioskMode {
|
4
|
+
public void startKioskMode(boolean use_overlay);
|
5
|
+
public void stopKioskMode();
|
6
|
+
public boolean isKioskMode();
|
7
|
+
public void startOverlay();
|
8
|
+
public void stopOverlay();
|
9
|
+
public boolean isAllPermissions();
|
10
|
+
public void showPermissionsList();
|
11
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
package com.rhomobile.rhodes.kioskservices;
|
2
|
+
|
3
|
+
import android.util.Log;
|
4
|
+
|
5
|
+
|
6
|
+
public class KioskManager {
|
7
|
+
private static boolean isKioskMode = false;
|
8
|
+
|
9
|
+
public static void setKioskMode(Boolean state){
|
10
|
+
Log.d("myLog", "Kiosk status: "+(state?"true":"false"));
|
11
|
+
isKioskMode = state;
|
12
|
+
}
|
13
|
+
|
14
|
+
public static Boolean getKioskModeStatus(){
|
15
|
+
Log.d("myLog", "Kiosk status: "+(isKioskMode?"true":"false"));
|
16
|
+
return isKioskMode;
|
17
|
+
}
|
18
|
+
}
|