rhodes 3.2.3 → 3.3.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +10 -0
- data/Rakefile +153 -46
- data/doc/build.txt +261 -102
- data/doc/configuration.txt +5 -2
- data/doc/device-caps.txt +134 -23
- data/doc/extensions.txt +922 -69
- data/doc/generator.txt +96 -39
- data/doc/install.txt +35 -19
- data/doc/jqt-jqm-transition.txt +17 -1
- data/doc/rhom.txt +23 -2
- data/doc/rhostudio-eclipse.txt +49 -0
- data/doc/rhostudio-test-plan.txt +440 -0
- data/doc/simulator.txt +1 -1
- data/doc/synchronization.txt +40 -1
- data/lib/build/jake.rb +108 -7
- data/lib/extensions/barcode/ext/barcode/platform/android/Rakefile +0 -35
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Barcode.xcodeproj/project.pbxproj +8 -2
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeCallbackHelper.mm +195 -195
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/BarcodeViewController.m +6 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Rakefile +5 -0
- data/lib/extensions/barcode/ext/barcode/shared/ruby/barcode_wrap.c +64 -20
- data/lib/extensions/debugger/CHANGELOG +3 -0
- data/lib/extensions/debugger/debugger.rb +26 -21
- data/lib/extensions/digest-md5/ext/Rakefile +5 -5
- data/lib/extensions/digest-md5/ext/build +10 -1
- data/lib/extensions/digest-md5/ext/defs.h +19 -0
- data/lib/extensions/digest-md5/ext/digest-md5.vcproj +317 -9
- data/lib/extensions/digest-md5/ext/iphone/Dmd5.xcodeproj/project.pbxproj +290 -0
- data/lib/extensions/digest-md5/ext/iphone/Dmd5_Prefix.pch +7 -0
- data/lib/extensions/digest-md5/ext/iphone/Rakefile +79 -0
- data/lib/extensions/digest-sha1/ext/Rakefile +5 -5
- data/lib/extensions/digest-sha1/ext/build +10 -1
- data/lib/extensions/digest-sha1/ext/defs.h +19 -0
- data/lib/extensions/digest-sha1/ext/digest-sha1.vcproj +317 -9
- data/lib/extensions/digest-sha1/ext/iphone/Dsha1.xcodeproj/project.pbxproj +278 -0
- data/lib/extensions/digest-sha1/ext/iphone/Dsha1_Prefix.pch +7 -0
- data/lib/extensions/digest-sha1/ext/iphone/Rakefile +79 -0
- data/lib/extensions/digest/ext/Rakefile +5 -5
- data/lib/extensions/digest/ext/build +10 -1
- data/lib/extensions/digest/ext/digest.vcproj +317 -9
- data/lib/extensions/digest/ext/iphone/Digest.xcodeproj/project.pbxproj +270 -0
- data/lib/extensions/digest/ext/iphone/Digest_Prefix.pch +7 -0
- data/lib/extensions/digest/ext/iphone/Rakefile +79 -0
- data/lib/extensions/esri/ext/esri/platform/iphone/ESRI.xcodeproj/project.pbxproj +10 -2
- data/lib/extensions/esri/ext/esri/platform/iphone/Rakefile +6 -0
- data/lib/extensions/fcntl/ext/Rakefile +5 -5
- data/lib/extensions/fcntl/ext/build +9 -1
- data/lib/extensions/fcntl/ext/iphone/Fcntl.xcodeproj/project.pbxproj +262 -0
- data/lib/extensions/fcntl/ext/iphone/Fcntl_Prefix.pch +7 -0
- data/lib/extensions/fcntl/ext/iphone/Rakefile +79 -0
- data/lib/extensions/net-http/net/http.rb +9 -7
- data/lib/extensions/nfc/ext/nfc/shared/ruby/nfc_wrap.c +64 -20
- data/lib/extensions/rhoxml/rexml/document.rb +3 -2
- data/lib/extensions/rhoxml/rexml/instruction.rb +70 -0
- data/lib/framework/builtinME.rb +9 -0
- data/lib/framework/date/format.rb +1 -1
- data/lib/framework/dateME.rb +19 -2
- data/lib/framework/rho/rho.rb +15 -4
- data/lib/framework/rho/rhoapplication.rb +1 -0
- data/lib/framework/rho/rhocontact.rb +10 -27
- data/lib/framework/rho/rhoevent_c.rb +8 -2
- data/lib/framework/rho/rhosupport.rb +25 -0
- data/lib/framework/rhodes.rb +1 -1
- data/lib/framework/rhoframework.rb +15 -0
- data/lib/framework/rholang/localization_simplified.rb +8 -10
- data/lib/framework/rhom/rhom_object_factory.rb +8 -2
- data/lib/framework/version.rb +1 -1
- data/lib/rhodes.rb +1 -1
- data/platform/android/Rhodes/jni/Application.mk +2 -1
- data/platform/android/Rhodes/jni/include/rhodes.h +9 -0
- data/platform/android/Rhodes/jni/src/callbacks.cpp +31 -1
- data/platform/android/Rhodes/jni/src/event.cpp +75 -31
- data/platform/android/Rhodes/jni/src/nativeview.cpp +1 -1
- data/platform/android/Rhodes/jni/src/phonebook.cpp +73 -9
- data/platform/android/Rhodes/jni/src/rhodes.cpp +21 -0
- data/platform/android/Rhodes/jni/src/rhodesapp.cpp +16 -24
- data/platform/android/Rhodes/jni/src/signature.cpp +27 -1
- data/platform/android/Rhodes/{default.properties → project.properties} +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Capabilities.java +14 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/NativeBar.java +14 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +38 -115
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +69 -52
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/Camera.java +9 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraNewService.java +21 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraOldService.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraSemiService.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/CameraService.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCapture.java +38 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/Event.java +212 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/EventStore.java +82 -125
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/MainView.java +2 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +39 -19
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +106 -136
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +26 -25
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/RhoNativeViewManager.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality.java +40 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality01.java +47 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality02.java +33 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality03.java +33 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality04.java +34 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality05.java +75 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality06.java +34 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality07.java +34 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality08.java +44 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality09.java +34 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionality10.java +34 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/osfunctionality/AndroidFunctionalityManager.java +73 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Contact.java +57 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessor.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorNew.java +322 -76
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorOld.java +11 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Phonebook.java +5 -5
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java +2 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +125 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsOld.java +2 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/WebView.java +16 -0
- data/platform/android/build/RhodesSRC_build.files +14 -0
- data/platform/android/build/android.rake +149 -147
- data/platform/android/build/android_tools.rb +58 -0
- data/platform/android/build/librhocommon_build.files +1 -0
- data/platform/android/build/libruby_build.files +3 -0
- data/platform/bb/RubyVM/src/com/rho/RhoConf.java +11 -1
- data/platform/bb/RubyVM/src/com/rho/db/DBAdapter.java +11 -5
- data/platform/bb/RubyVM/src/com/rho/db/DBAttrManager.java +3 -2
- data/platform/bb/RubyVM/src/com/rho/file/RhoFile.java +2 -0
- data/platform/bb/RubyVM/src/com/rho/net/RhoConnection.java +20 -8
- data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +9 -6
- data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +45 -18
- data/platform/bb/RubyVM/src/com/rho/sync/SyncThread.java +1 -2
- data/platform/bb/build/bb.rake +84 -70
- data/platform/bb/rhodes/platform/5.0/com/rho/BrowserAdapter5.java +106 -14
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter.java +1 -1
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter5.java +108 -16
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +10 -5
- data/platform/bb/rhodes/src/rhomobile/camera/CameraScreen.java +21 -4
- data/platform/bb/rhodes/src/rhomobile/mapview/Annotation.java +17 -0
- data/platform/bb/rhodes/src/rhomobile/mapview/MapView.java +8 -5
- data/platform/bb/rhodes/src/rhomobile/mapview/MapViewScreen.java +3 -1
- data/platform/iphone/Classes/AppManager/AppManager.m +15 -3
- data/platform/iphone/Classes/Event/Event.m +45 -2
- data/platform/iphone/Classes/MapView/MapViewController.m +8 -4
- data/platform/iphone/Classes/Phonebook/phonebook.m +30 -7
- data/platform/iphone/Classes/Rhodes.h +11 -1
- data/platform/iphone/Classes/Rhodes.m +141 -9
- data/platform/iphone/Classes/Signature/SignatureDelegate.m +27 -1
- data/platform/iphone/Classes/SimpleMainView.h +1 -0
- data/platform/iphone/Classes/SimpleMainView.m +4 -0
- data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +31 -1
- data/platform/iphone/curl/curl.xcodeproj/project.pbxproj +10 -0
- data/platform/iphone/rbuild/iphone.rake +33 -6
- data/platform/iphone/rhoextlib/rhoextlib.xcodeproj/project.pbxproj +10 -2
- data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +22 -2
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +14 -0
- data/platform/iphone/rhosynclib/rhosynclib.xcodeproj/project.pbxproj +10 -0
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Info.plist +1 -1
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/MacOS/RhoSimulator +0 -0
- data/platform/osx/build/osx.rake +58 -7
- data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +427 -69
- data/platform/shared/RhoConnectClient/RhoConnectClient.h +21 -2
- data/platform/shared/common/Android.mk +2 -1
- data/platform/shared/common/AutoPointer.h +23 -0
- data/platform/shared/common/BundleManager.cpp +333 -0
- data/platform/shared/common/RhoFile.cpp +206 -23
- data/platform/shared/common/RhoFile.h +14 -4
- data/platform/shared/common/RhoFilePath.h +18 -0
- data/platform/shared/common/RhoStd.h +11 -1
- data/platform/shared/common/RhoThread.h +4 -1
- data/platform/shared/common/RhodesApp.cpp +31 -8
- data/platform/shared/common/RhodesApp.h +14 -0
- data/platform/shared/common/RhodesAppBase.cpp +6 -6
- data/platform/shared/common/RhodesAppBase.h +1 -1
- data/platform/shared/common/emml.h +34 -0
- data/platform/shared/common/iphone/RhoFileImpl.m +30 -2
- data/platform/shared/common/map/BaseMapEngine.cpp +3 -3
- data/platform/shared/common/map/GeocodingMapEngine.cpp +205 -14
- data/platform/shared/common/map/GeocodingMapEngine.h +25 -2
- data/platform/shared/common/map/MapEngine.cpp +24 -2
- data/platform/shared/common/map/MapEngine.h +23 -12
- data/platform/shared/common/phonebook/PhonebookParams.cpp +99 -0
- data/platform/shared/common/phonebook/PhonebookParams.h +52 -0
- data/platform/shared/common/rhoparams.cpp +14 -0
- data/platform/shared/common/rhoparams.h +1 -0
- data/platform/shared/db/DBAdapter.cpp +43 -24
- data/platform/shared/db/DBAdapter.h +6 -1
- data/platform/shared/db/DBAttrManager.cpp +50 -1
- data/platform/shared/logging/RhoLog.h +3 -0
- data/platform/shared/logging/RhoLogSink.cpp +5 -1
- data/platform/shared/net/CURLNetRequest.cpp +2 -0
- data/platform/shared/qt/rhodes/QtMainWindow.cpp +14 -1
- data/platform/shared/qt/rhodes/impl/PhonebookImpl.cpp +2 -2
- data/platform/shared/qt/rhodes/impl/RhoFileImpl.cpp +1 -1
- data/platform/shared/qt/rhodes/impl/SignatureImpl.cpp +14 -2
- data/platform/shared/qt/rhodes/impl/SystemImpl.cpp +16 -2
- data/platform/shared/qt/rhodes/main.cpp +28 -0
- data/platform/shared/qt/rhodes/rhodes.pro +3 -0
- data/platform/shared/qt/rholib/rholib.pro +2 -1
- data/platform/shared/qt/rubylib/rubylib.pro +2 -1
- data/platform/shared/ruby/Android.mk +3 -0
- data/platform/shared/ruby/class.c +7 -0
- data/platform/shared/ruby/compile.c +18 -10
- data/platform/shared/ruby/encdb.h +18 -8
- data/platform/shared/ruby/eval.c +108 -2
- data/platform/shared/ruby/ext/alert/alert_wrap.c +64 -20
- data/platform/shared/ruby/ext/asynchttp/asynchttp_wrap.c +64 -20
- data/platform/shared/ruby/ext/bluetooth/bluetooth_wrap.c +67 -23
- data/platform/shared/ruby/ext/calendar/calendar_wrap.c +64 -20
- data/platform/shared/ruby/ext/calendar/event_wrap.c +64 -20
- data/platform/shared/ruby/ext/camera/camera_wrap.c +64 -20
- data/platform/shared/ruby/ext/datetimepicker/datetimepicker_wrap.c +64 -20
- data/platform/shared/ruby/ext/geolocation/geolocation.i +16 -0
- data/platform/shared/ruby/ext/geolocation/geolocation_wrap.c +127 -26
- data/platform/shared/ruby/ext/mapview/mapview_wrap.c +64 -20
- data/platform/shared/ruby/ext/nativebar/nativebar_wrap.c +65 -21
- data/platform/shared/ruby/ext/nativeviewmanager/nativeviewmanager_wrap.c +64 -20
- data/platform/shared/ruby/ext/navbar/navbar_wrap.c +64 -20
- data/platform/shared/ruby/ext/phonebook/phonebook.i +7 -7
- data/platform/shared/ruby/ext/phonebook/phonebook_wrap.c +95 -120
- data/platform/shared/ruby/ext/rho/rhoruby.c +4 -4
- data/platform/shared/ruby/ext/rho/rhoruby.h +2 -0
- data/platform/shared/ruby/ext/rho/rhosupport.c +39 -6
- data/platform/shared/ruby/ext/rhoconf/rhoconf_wrap.c +65 -21
- data/platform/shared/ruby/ext/ringtones/ringtones_wrap.c +64 -20
- data/platform/shared/ruby/ext/signature/signature.i +37 -5
- data/platform/shared/ruby/ext/signature/signature_wrap.c +274 -45
- data/platform/shared/ruby/ext/syncengine/syncengine_wrap.c +65 -21
- data/platform/shared/ruby/ext/system/system.i +14 -2
- data/platform/shared/ruby/ext/system/system_wrap.c +146 -25
- data/platform/shared/ruby/ext/webview/webview_wrap.c +65 -21
- data/platform/shared/ruby/include/ruby/ruby.h +15 -4
- data/platform/shared/ruby/inits.c +1 -0
- data/platform/shared/ruby/io.c +13 -3
- data/platform/shared/ruby/win32/win32.c +3 -3
- data/platform/shared/ruby/wince/io_wce.c +2 -2
- data/platform/shared/rubyext/System.cpp +9 -5
- data/platform/shared/sync/ClientRegister.cpp +18 -8
- data/platform/shared/sync/SyncEngine.cpp +25 -11
- data/platform/shared/sync/SyncEngine.h +2 -0
- data/platform/shared/sync/SyncSource.cpp +40 -15
- data/platform/shared/sync/SyncSource.h +3 -2
- data/platform/shared/sync/SyncThread.cpp +9 -4
- data/platform/shared/sync/SyncThread.h +3 -1
- data/platform/symbian/build/symbian.rake +14 -9
- data/platform/symbian/rhodes/rhodes.pro +11 -8
- data/platform/symbian/rhodes/src/phonebook/ruby_phonebook.cpp +2 -2
- data/platform/symbian/rubylib/rubylib.pro +3 -0
- data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
- data/platform/wm/RhoLib/RhoLib.vcproj +315 -2
- data/platform/wm/build/build_inf.js +235 -187
- data/platform/wm/build/wm.rake +388 -233
- data/platform/wm/rhodes.sln +56 -0
- data/platform/wm/rhodes/MainWindow.cpp +139 -77
- data/platform/wm/rhodes/MainWindow.h +27 -22
- data/platform/wm/rhodes/MapView/{Graphics.cpp → Bitmap.cpp} +15 -253
- data/platform/wm/rhodes/MapView/Bitmap.h +86 -0
- data/platform/wm/rhodes/MapView/MapViewManager.cpp +7 -2
- data/platform/wm/rhodes/MapView/MapViewManager.h +1 -1
- data/platform/wm/rhodes/MapView/Win32Graphics.cpp +263 -0
- data/platform/wm/rhodes/MapView/Win32Graphics.h +133 -0
- data/platform/wm/rhodes/MapView/WmGraphics.cpp +291 -0
- data/platform/wm/rhodes/MapView/{Graphics.h → WmGraphics.h} +14 -56
- data/platform/wm/rhodes/Rhodes.cpp +128 -32
- data/platform/wm/rhodes/Rhodes.rc +6 -2
- data/platform/wm/rhodes/camera/Camera.cpp +1 -0
- data/platform/wm/rhodes/phonebook/phonebook.cpp +2 -2
- data/platform/wm/rhodes/phonebook/phonebook.h +2 -2
- data/platform/wm/rhodes/resource.h +3 -2
- data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +6 -0
- data/platform/wm/rhodes/rho/rubyext/NativeToolbar.cpp +4 -0
- data/platform/wm/rhodes/rho/rubyext/RhoSignature.cpp +675 -0
- data/platform/wm/rhodes/rho/rubyext/RhoSignature.h +123 -0
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +12 -2
- data/platform/wm/rhodes/rhodes.vcproj +2732 -1113
- data/platform/wm/rhodes/simulator/MainWindowQt.h +1 -1
- data/platform/wm/rhodes/stdafx.h +1 -0
- data/platform/wm/rhoelements.sln +118 -62
- data/platform/wm/rubylib/rubylib.vcproj +345 -16
- data/platform/wm/sqlite3/sqlite3.vcproj +305 -0
- data/platform/wm/syncengine/syncengine.vcproj +309 -0
- data/platform/wm/tools/detool/LogServer.cpp +19 -2
- data/platform/wm/tools/detool/detool.cpp +131 -6
- data/platform/wm/tools/detool/detool.vcproj +3 -1
- data/platform/wm/tools/detool/stdafx.h +1 -0
- data/platform/wp7/IronRuby/Languages/Ruby/Libraries/Builtins/RangeOps.cs +589 -0
- data/platform/wp7/IronRuby/Languages/Ruby/Ruby/Builtins/RubyEncoding.cs +678 -0
- data/platform/wp7/IronRuby/Languages/Ruby/Ruby/Runtime/RubyExceptionData.cs +271 -0
- data/platform/wp7/IronRuby/Languages/Ruby/Ruby/Runtime/RubyUtils.cs +31 -1
- data/platform/wp7/IronRuby/bin/Silverlight3Release/IronRuby.Libraries.dll +0 -0
- data/platform/wp7/IronRuby/bin/Silverlight3Release/IronRuby.dll +0 -0
- data/platform/wp7/RhoRubyLib/common/RhoStd.cs +6 -0
- data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +16 -2
- data/platform/wp7/RhoRubyLib/net/NetRequest.cs +2 -0
- data/platform/wp7/RhoRubyLib/rubyext/RhoSyncEngine.cs +1 -2
- data/platform/wp7/RhoRubyLib/sync/SyncEngine.cs +13 -10
- data/platform/wp7/RhoRubyLib/sync/SyncSource.cs +30 -8
- data/platform/wp7/build/wp.rake +5 -0
- data/rakefile.rb +153 -46
- data/res/build-tools/detool.exe +0 -0
- data/res/build-tools/swig_patch/Lib/ruby/rubyerrors.swg +155 -0
- data/res/build-tools/swig_patch/Lib/ruby/rubyhead.swg +158 -0
- data/res/build-tools/swig_patch/Lib/ruby/rubyiterators.swg +932 -0
- data/res/build-tools/swig_patch/Lib/ruby/rubyrun.swg +448 -0
- data/res/build-tools/swig_patch/Lib/ruby/rubystdfunctors.swg +162 -0
- data/res/build-tools/swig_patch/Lib/ruby/rubytracking.swg +159 -0
- data/res/build-tools/swig_patch/Lib/ruby/std_basic_string.i +97 -0
- data/res/build-tools/swig_patch/Lib/ruby/std_map.i +418 -0
- data/res/build-tools/swig_patch/Lib/ruby/std_multimap.i +227 -0
- data/res/build-tools/swig_patch/Lib/swiginit.swg +269 -0
- data/res/build-tools/swig_patch/README +7 -0
- data/res/generators/templates/application/app/Settings/controller.rb +42 -1
- data/res/generators/templates/application/app/Settings/wait.erb +1 -1
- data/res/generators/templates/application/app/application.rb +1 -1
- data/res/generators/templates/application/app/layout.erb +8 -8
- data/res/generators/templates/application/build.yml +0 -1
- data/res/generators/templates/application/public/css/android.css +6 -0
- data/res/generators/templates/application/public/css/blackberry.css +6 -0
- data/res/generators/templates/application/public/css/iphone.css +6 -0
- data/res/generators/templates/application/public/css/jqmobile-patch.css +14 -0
- data/res/generators/templates/application/public/jqmobile/images/ajax-loader.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/icons-18-black.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/icons-18-white.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/icons-36-black.png +0 -0
- data/res/generators/templates/application/public/jqmobile/images/icons-36-white.png +0 -0
- data/res/generators/templates/application/public/jqmobile/{jquery.mobile-1.0rc1.css → jquery.mobile-1.0.css} +452 -354
- data/res/generators/templates/application/public/jqmobile/{jquery.mobile-1.0rc1.js → jquery.mobile-1.0.js} +629 -442
- data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.min.css +2 -0
- data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.min.js +172 -0
- data/res/generators/templates/application/public/jqmobile/jquery.mobile.structure-1.0.css +714 -0
- data/res/generators/templates/application/public/jqmobile/jquery.mobile.structure-1.0.min.css +2 -0
- data/res/generators/templates/application/public/js/jqmobile-patch.js +136 -7
- data/res/generators/templates/extension/app/MontanaTest/controller.rb +20 -20
- data/res/generators/templates/extension/app/MontanaTest/index.erb +17 -17
- data/res/generators/templates/extension/extensions/montana/ext/montana/platform/iphone/Montana.xcodeproj/project.pbxproj +8 -2
- data/res/generators/templates/extension/extensions/montana/ext/montana/platform/iphone/Rakefile +5 -0
- data/res/generators/templates/extension/extensions/montana/ext/montana/shared/ruby/montana_wrap.c +64 -20
- data/rhomobile-debug.gemspec +1 -1
- data/spec/framework_spec/app/layout.erb +1 -1
- data/spec/framework_spec/app/spec/core/rational/Rational_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/stringio/shared/each_char.rb +6 -2
- data/spec/framework_spec/app/spec/shared/rational/{Rational.rb → rational_main.rb} +0 -0
- data/spec/framework_spec/build.yml +0 -3
- data/spec/perfomance_spec/app/Benchmark/controller.rb +1 -1
- data/spec/perfomance_spec/app/layout.erb +1 -1
- data/spec/phone_spec/app/BlobTest_s/blob_test_s.rb +13 -0
- data/spec/phone_spec/app/BlobTest_s/test.png +0 -0
- data/spec/phone_spec/app/BlobTest_s/test2.png +0 -0
- data/spec/phone_spec/app/spec/blobsync_spec.rb +27 -15
- data/spec/phone_spec/app/spec/date_spec.rb +27 -1
- data/spec/phone_spec/app/spec/rho_spec.rb +6 -0
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +64 -26
- data/spec/phone_spec/app/spec/syncengine_spec.rb +28 -7
- data/spec/phone_spec/app/spec/uri_spec.rb +4 -4
- data/spec/phone_spec/app/spec_runner.rb +4 -2
- data/spec/phone_spec/build.yml +7 -9
- data/spec/phone_spec/rhoconfig.txt +1 -0
- data/version +1 -1
- metadata +75 -22
- data/Manifest.txt +0 -7853
- data/platform/wm/rhodes/rhoelements/RhoWKBrowserEngine.cpp +0 -384
- data/platform/wm/rhodes/rhoelements/RhoWKBrowserEngine.h +0 -41
- data/platform/wm/rhodes/signature/Signature.cpp +0 -396
- data/platform/wm/rhodes/signature/Signature.h +0 -84
- data/platform/wm/rubylib/rubylib.vcproj.VLAD.Vladimir.user +0 -429
- data/platform/wm/sqlite3/sqlite3.vcproj.VLAD.Vladimir.user +0 -429
- data/platform/wm/syncengine/syncengine.vcproj.VLAD.Vladimir.user +0 -429
- data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0rc1.min.css +0 -12
- data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0rc1.min.js +0 -170
- data/rhomobile-debug-1.0.5.gem +0 -0
@@ -225,6 +225,7 @@ bool RhoMapConvertor::initConvertor(JNIEnv *env)
|
|
225
225
|
|
226
226
|
return initialized = true;
|
227
227
|
}
|
228
|
+
//----------------------------------------------------------------------------------------------------------------------
|
228
229
|
|
229
230
|
std::auto_ptr<rho::Hashtable<std::string, std::string> >
|
230
231
|
rho_cast_helper<std::auto_ptr<rho::Hashtable<std::string, std::string> >, jobject>::operator()(JNIEnv *env, jobject jObj)
|
@@ -249,6 +250,7 @@ rho_cast_helper<std::auto_ptr<rho::Hashtable<std::string, std::string> >, jobjec
|
|
249
250
|
}
|
250
251
|
return result;
|
251
252
|
}
|
253
|
+
//----------------------------------------------------------------------------------------------------------------------
|
252
254
|
|
253
255
|
std::auto_ptr<rho::Hashtable<std::string,std::string> >
|
254
256
|
rho_cast_helper<std::auto_ptr<rho::Hashtable<std::string,std::string> >, jobjectArray>::operator()(JNIEnv *env,
|
@@ -270,5 +272,24 @@ rho_cast_helper<std::auto_ptr<rho::Hashtable<std::string,std::string> >, jobject
|
|
270
272
|
}
|
271
273
|
return result;
|
272
274
|
}
|
275
|
+
//----------------------------------------------------------------------------------------------------------------------
|
276
|
+
|
277
|
+
std::auto_ptr<rho::Vector<std::string> >
|
278
|
+
rho_cast_helper<std::auto_ptr<rho::Vector<std::string> >, jobjectArray>::operator ()(JNIEnv *env, jobjectArray jArr)
|
279
|
+
{
|
280
|
+
value_type result(new element_type);
|
281
|
+
|
282
|
+
unsigned n = env->GetArrayLength(jArr);
|
283
|
+
result->reserve(n);
|
284
|
+
|
285
|
+
for(unsigned i = 0; i < n; ++i)
|
286
|
+
{
|
287
|
+
jhstring jval = static_cast<jstring>(env->GetObjectArrayElement(jArr, i));
|
288
|
+
std::string val = rho_cast<std::string>(env, jval);
|
289
|
+
result->push_back(val);
|
290
|
+
}
|
291
|
+
return result;
|
292
|
+
}
|
293
|
+
//----------------------------------------------------------------------------------------------------------------------
|
273
294
|
|
274
295
|
} // namespace details
|
@@ -42,7 +42,7 @@
|
|
42
42
|
#include "rhodes/RhoClassFactory.h"
|
43
43
|
|
44
44
|
#undef DEFAULT_LOGCATEGORY
|
45
|
-
#define DEFAULT_LOGCATEGORY "
|
45
|
+
#define DEFAULT_LOGCATEGORY "RhodesAppJNI"
|
46
46
|
|
47
47
|
|
48
48
|
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_RhodesService_makeLink
|
@@ -60,28 +60,21 @@ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_RhodesService_makeLink
|
|
60
60
|
env->ThrowNew(getJNIClass(RHODES_JAVA_CLASS_RUNTIME_EXCEPTION), "Can not create symlink");
|
61
61
|
}
|
62
62
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
#include <rhocaps.inc>
|
73
|
-
#undef RHO_DEFINE_CAP
|
74
|
-
|
75
|
-
jclass cls = getJNIClass(RHODES_JAVA_CLASS_CAPABILITIES);
|
76
|
-
if (!cls) return false;
|
77
|
-
for (size_t i = 0, lim = sizeof(caps)/sizeof(caps[0]); i < lim; ++i)
|
78
|
-
{
|
79
|
-
std::string field_name = std::string(caps[i]) + "_ENABLED";
|
80
|
-
jfieldID fid = getJNIClassStaticField(env, cls, field_name.c_str(), "Z");
|
81
|
-
if (!fid) return false;
|
82
|
-
env->SetStaticBooleanField(cls, fid, actual_caps[caps[i]]);
|
63
|
+
RHO_GLOBAL jstring JNICALL Java_com_rhomobile_rhodes_RhodesService_getInvalidSecurityTokenMessage(JNIEnv* env, jclass) {
|
64
|
+
|
65
|
+
const char* message = "Invalid security token !";
|
66
|
+
|
67
|
+
//rho_conf_Init(rho_native_rhopath());
|
68
|
+
|
69
|
+
if (rho_conf_is_property_exists("invalid_security_token_message")) {
|
70
|
+
const char* conf_message = rho_conf_getString("invalid_security_token_message");
|
71
|
+
message = conf_message;
|
83
72
|
}
|
84
|
-
|
73
|
+
|
74
|
+
jstring objStr = env->NewStringUTF(message);
|
75
|
+
return objStr;
|
76
|
+
|
77
|
+
|
85
78
|
}
|
86
79
|
|
87
80
|
static jobject g_classLoader = NULL;
|
@@ -108,8 +101,6 @@ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_RhodesApplication_createRhodes
|
|
108
101
|
{
|
109
102
|
android_setup(env);
|
110
103
|
|
111
|
-
if (!set_capabilities(env)) return;
|
112
|
-
|
113
104
|
// Start Rhodes application
|
114
105
|
rho_rhodesapp_create(rho_native_rhopath());
|
115
106
|
}
|
@@ -324,3 +315,4 @@ RHO_GLOBAL void rho_conf_show_log()
|
|
324
315
|
|
325
316
|
env->CallStaticVoidMethod(cls, mid);
|
326
317
|
}
|
318
|
+
|
@@ -29,6 +29,7 @@
|
|
29
29
|
#include "rhodes/jni/com_rhomobile_rhodes_signature_Signature.h"
|
30
30
|
|
31
31
|
#include <common/RhodesApp.h>
|
32
|
+
#include "ruby/ext/rho/rhoruby.h"
|
32
33
|
|
33
34
|
#undef DEFAULT_LOGCATEGORY
|
34
35
|
#define DEFAULT_LOGCATEGORY "Signature"
|
@@ -41,7 +42,7 @@ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_signature_Signature_callback
|
|
41
42
|
}
|
42
43
|
|
43
44
|
|
44
|
-
RHO_GLOBAL void
|
45
|
+
RHO_GLOBAL void rho_signature_take(char* callback_url, rho_param* p)
|
45
46
|
{
|
46
47
|
///*
|
47
48
|
JNIEnv *env = jnienv();
|
@@ -50,8 +51,33 @@ RHO_GLOBAL void rho_signature_take_signature(char* callback_url, char* image_for
|
|
50
51
|
jmethodID mid = getJNIClassStaticMethod(env, cls, "takeSignature", "(Ljava/lang/String;Ljava/lang/String;)V");
|
51
52
|
if (!mid) return;
|
52
53
|
jhstring objCallback = rho_cast<jhstring>(callback_url);
|
54
|
+
|
55
|
+
char* image_format = 0;
|
56
|
+
if (p)
|
57
|
+
{
|
58
|
+
rho_param* pFF = rho_param_hash_get(p, "imageFormat");
|
59
|
+
if ( pFF )
|
60
|
+
image_format = pFF->v.string;
|
61
|
+
}
|
62
|
+
if (!image_format)
|
63
|
+
image_format = "";
|
64
|
+
|
53
65
|
jhstring objFormat = rho_cast<jhstring>(image_format);
|
54
66
|
env->CallStaticVoidMethod(cls, mid, objCallback.get(), objFormat.get());
|
55
67
|
//*/
|
56
68
|
}
|
57
69
|
|
70
|
+
RHO_GLOBAL void rho_signature_visible(bool b, rho_param* p)
|
71
|
+
{
|
72
|
+
//TODO: rho_signature_visible
|
73
|
+
}
|
74
|
+
|
75
|
+
RHO_GLOBAL void rho_signature_capture(const char* callback_url)
|
76
|
+
{
|
77
|
+
//TODO: rho_signature_capture
|
78
|
+
}
|
79
|
+
|
80
|
+
RHO_GLOBAL void rho_signature_clear()
|
81
|
+
{
|
82
|
+
//TODO: rho_signature_clear
|
83
|
+
}
|
@@ -4,8 +4,8 @@
|
|
4
4
|
# This file must be checked in Version Control Systems.
|
5
5
|
#
|
6
6
|
# To customize properties used by the Ant build system use,
|
7
|
-
# "
|
7
|
+
# "ant.properties", and override values to adapt the script to your
|
8
8
|
# project structure.
|
9
9
|
|
10
10
|
# Project target.
|
11
|
-
target=Google Inc.:Google APIs:
|
11
|
+
target=Google Inc.:Google APIs:15
|
@@ -1,16 +1,18 @@
|
|
1
1
|
package com.rhomobile.rhodes;
|
2
2
|
|
3
3
|
public class Capabilities {
|
4
|
-
public static boolean AUDIO_ENABLED = true;
|
5
|
-
public static boolean BLUETOOTH_ENABLED = true;
|
6
|
-
public static boolean CALENDAR_ENABLED = true;
|
7
|
-
public static boolean CAMERA_ENABLED = true;
|
8
|
-
public static boolean GPS_ENABLED = true;
|
9
|
-
public static boolean NETWORK_STATE_ENABLED = true;
|
10
|
-
public static boolean PHONE_ENABLED = true;
|
11
|
-
public static boolean PIM_ENABLED = true;
|
12
|
-
public static boolean PUSH_ENABLED = true;
|
13
|
-
public static boolean RECORD_AUDIO_ENABLED = true;
|
14
|
-
public static boolean SDCARD_ENABLED = true;
|
15
|
-
public static boolean VIBRATE_ENABLED = true;
|
4
|
+
public static final boolean AUDIO_ENABLED = true;
|
5
|
+
public static final boolean BLUETOOTH_ENABLED = true;
|
6
|
+
public static final boolean CALENDAR_ENABLED = true;
|
7
|
+
public static final boolean CAMERA_ENABLED = true;
|
8
|
+
public static final boolean GPS_ENABLED = true;
|
9
|
+
public static final boolean NETWORK_STATE_ENABLED = true;
|
10
|
+
public static final boolean PHONE_ENABLED = true;
|
11
|
+
public static final boolean PIM_ENABLED = true;
|
12
|
+
public static final boolean PUSH_ENABLED = true;
|
13
|
+
public static final boolean RECORD_AUDIO_ENABLED = true;
|
14
|
+
public static final boolean SDCARD_ENABLED = true;
|
15
|
+
public static final boolean VIBRATE_ENABLED = true;
|
16
|
+
public static final boolean WEBKIT_BROWSER_ENABLED = false;
|
17
|
+
|
16
18
|
}
|
@@ -30,6 +30,7 @@ import com.rhomobile.rhodes.mainview.MainView;
|
|
30
30
|
import com.rhomobile.rhodes.mainview.SimpleMainView;
|
31
31
|
import com.rhomobile.rhodes.mainview.TabbedMainView;
|
32
32
|
import com.rhomobile.rhodes.util.PerformOnUiThread;
|
33
|
+
import com.rhomobile.rhodes.webview.WebView;
|
33
34
|
|
34
35
|
public class NativeBar {
|
35
36
|
|
@@ -53,9 +54,7 @@ public class NativeBar {
|
|
53
54
|
|
54
55
|
public void run() {
|
55
56
|
try {
|
56
|
-
|
57
|
-
|
58
|
-
MainView mainView = r.getMainView();
|
57
|
+
MainView mainView = RhodesActivity.safeGetInstance().getMainView();
|
59
58
|
MainView v = null;
|
60
59
|
|
61
60
|
SimpleMainView smv = null;
|
@@ -65,15 +64,18 @@ public class NativeBar {
|
|
65
64
|
|
66
65
|
switch (type) {
|
67
66
|
case NOBAR_TYPE:
|
68
|
-
|
69
|
-
|
70
|
-
|
67
|
+
if (smv == null) {
|
68
|
+
WebView webView = mainView.detachWebView();
|
69
|
+
v = new SimpleMainView(webView);
|
70
|
+
} else
|
71
71
|
smv.removeToolbar();
|
72
72
|
started = false;
|
73
73
|
break;
|
74
74
|
case TOOLBAR_TYPE:
|
75
|
-
|
76
|
-
|
75
|
+
if (smv == null) {
|
76
|
+
WebView webView = mainView.detachWebView();
|
77
|
+
v = new SimpleMainView(webView, params);
|
78
|
+
}
|
77
79
|
else
|
78
80
|
smv.setToolbar(params);
|
79
81
|
started = true;
|
@@ -87,7 +89,7 @@ public class NativeBar {
|
|
87
89
|
}
|
88
90
|
|
89
91
|
if (v != null) {
|
90
|
-
|
92
|
+
RhodesActivity.safeGetInstance().setMainView(v);
|
91
93
|
if (v instanceof TabbedMainView) {
|
92
94
|
// loading of default opened tab should be after TabView insert to real Views tree
|
93
95
|
TabbedMainView tmv = (TabbedMainView)v;
|
@@ -121,7 +123,7 @@ public class NativeBar {
|
|
121
123
|
|
122
124
|
public static void create(int type, Object params) {
|
123
125
|
try {
|
124
|
-
PerformOnUiThread.exec(new CreateTask(type, params)
|
126
|
+
PerformOnUiThread.exec(new CreateTask(type, params));
|
125
127
|
}
|
126
128
|
catch (Exception e) {
|
127
129
|
reportFail("create", e);
|
@@ -130,7 +132,7 @@ public class NativeBar {
|
|
130
132
|
|
131
133
|
public static void remove() {
|
132
134
|
try {
|
133
|
-
PerformOnUiThread.exec(new CreateTask(NOBAR_TYPE, null)
|
135
|
+
PerformOnUiThread.exec(new CreateTask(NOBAR_TYPE, null));
|
134
136
|
}
|
135
137
|
catch (Exception e) {
|
136
138
|
reportFail("remove", e);
|
@@ -139,7 +141,7 @@ public class NativeBar {
|
|
139
141
|
|
140
142
|
public static void switchTab(int index) {
|
141
143
|
try {
|
142
|
-
PerformOnUiThread.exec(new SwitchTabTask(index)
|
144
|
+
PerformOnUiThread.exec(new SwitchTabTask(index));
|
143
145
|
}
|
144
146
|
catch (Exception e) {
|
145
147
|
reportFail("switchTab", e);
|
@@ -34,18 +34,15 @@ import java.util.Set;
|
|
34
34
|
import com.rhomobile.rhodes.bluetooth.RhoBluetoothManager;
|
35
35
|
import com.rhomobile.rhodes.camera.Camera;
|
36
36
|
import com.rhomobile.rhodes.mainview.MainView;
|
37
|
+
import com.rhomobile.rhodes.mainview.SimpleMainView;
|
37
38
|
import com.rhomobile.rhodes.mainview.SplashScreen;
|
38
39
|
import com.rhomobile.rhodes.util.PerformOnUiThread;
|
39
40
|
import com.rhomobile.rhodes.util.Utils;
|
40
|
-
import com.rhomobile.rhodes.webview.ChromeClientOld;
|
41
|
-
import com.rhomobile.rhodes.webview.RhoWebSettings;
|
42
|
-
import com.rhomobile.rhodes.webview.RhoWebViewClient;
|
43
41
|
|
44
42
|
import android.content.ComponentName;
|
45
43
|
import android.content.Context;
|
46
44
|
import android.content.Intent;
|
47
45
|
import android.net.Uri;
|
48
|
-
import android.os.Build;
|
49
46
|
import android.os.Bundle;
|
50
47
|
import android.os.Handler;
|
51
48
|
import android.os.IBinder;
|
@@ -55,9 +52,7 @@ import android.view.Menu;
|
|
55
52
|
import android.view.MenuItem;
|
56
53
|
import android.view.Window;
|
57
54
|
import android.view.WindowManager;
|
58
|
-
import android.webkit.WebChromeClient;
|
59
55
|
import android.webkit.WebView;
|
60
|
-
import android.webkit.WebViewClient;
|
61
56
|
|
62
57
|
public class RhodesActivity extends BaseActivity {
|
63
58
|
|
@@ -65,8 +60,6 @@ public class RhodesActivity extends BaseActivity {
|
|
65
60
|
|
66
61
|
private static final boolean DEBUG = false;
|
67
62
|
|
68
|
-
private static final boolean USE_DELAYED_MAINVIEW_DISPLAY = false;
|
69
|
-
|
70
63
|
public static boolean ENABLE_LOADING_INDICATION = true;
|
71
64
|
|
72
65
|
public static int MAX_PROGRESS = 10000;
|
@@ -80,12 +73,7 @@ public class RhodesActivity extends BaseActivity {
|
|
80
73
|
private MainView mMainView;
|
81
74
|
|
82
75
|
private RhoMenu mAppMenu;
|
83
|
-
|
84
|
-
private WebChromeClient mChromeClient;
|
85
|
-
private WebViewClient mWebViewClient;
|
86
|
-
private RhoWebSettings mWebSettings;
|
87
76
|
|
88
|
-
|
89
77
|
private long uiThreadId = 0;
|
90
78
|
|
91
79
|
public long getUiThreadId() {
|
@@ -170,8 +158,6 @@ public class RhodesActivity extends BaseActivity {
|
|
170
158
|
|
171
159
|
mHandler = new Handler();
|
172
160
|
|
173
|
-
initWebStuff();
|
174
|
-
|
175
161
|
mSplashScreen = new SplashScreen(this);
|
176
162
|
setMainView(mSplashScreen);
|
177
163
|
|
@@ -187,12 +173,18 @@ public class RhodesActivity extends BaseActivity {
|
|
187
173
|
|
188
174
|
notifyUiCreated();
|
189
175
|
RhodesApplication.stateChanged(RhodesApplication.UiState.MainActivityCreated);
|
190
|
-
|
176
|
+
}
|
177
|
+
|
178
|
+
public MainView switchToSimpleMainView(MainView currentView) {
|
179
|
+
MainView view = new SimpleMainView(currentView.detachWebView());
|
180
|
+
setMainView(view);
|
181
|
+
return view;
|
182
|
+
}
|
191
183
|
|
192
184
|
private void notifyUiCreated() {
|
193
185
|
RhodesService r = RhodesService.getInstance();
|
194
186
|
if ( r != null ) {
|
195
|
-
|
187
|
+
RhodesService.callUiCreatedCallback();
|
196
188
|
}
|
197
189
|
else {
|
198
190
|
mHandler.post(new Runnable() {
|
@@ -205,7 +197,7 @@ public class RhodesActivity extends BaseActivity {
|
|
205
197
|
return;
|
206
198
|
}
|
207
199
|
|
208
|
-
|
200
|
+
RhodesService.callUiCreatedCallback();
|
209
201
|
}
|
210
202
|
});
|
211
203
|
}
|
@@ -360,105 +352,17 @@ public class RhodesActivity extends BaseActivity {
|
|
360
352
|
public SplashScreen getSplashScreen() {
|
361
353
|
return mSplashScreen;
|
362
354
|
}
|
363
|
-
|
364
|
-
public void setMainView(MainView v) {
|
365
|
-
setMainView(v, true);
|
366
|
-
}
|
367
|
-
|
368
|
-
public void setMainView(final MainView v, boolean waitUntilNavigationDone) {
|
369
|
-
if (DEBUG)
|
370
|
-
Log.d(TAG, "setMainView: v=" + v + "; mMainView=" + mMainView);
|
371
|
-
|
372
|
-
// If there's no previous mMainView, don't wait
|
373
|
-
if (mMainView == null)
|
374
|
-
waitUntilNavigationDone = false;
|
375
|
-
|
376
|
-
// Set mMainView right now but not yet do it visible
|
377
|
-
mMainView = v;
|
378
355
|
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
};
|
387
|
-
|
388
|
-
if (!USE_DELAYED_MAINVIEW_DISPLAY /* || !waitUntilNavigationDone*/) {
|
389
|
-
// Make new MainView visible right now
|
390
|
-
setMainViewVisible.run();
|
391
|
-
}
|
392
|
-
else {
|
393
|
-
// If we're requested to wait until first navigation will be done,
|
394
|
-
// use the trick: keep current main view until first navigate will be
|
395
|
-
// finished in the new MainView.
|
396
|
-
// This will end up in good user experience - user will see
|
397
|
-
// new MainView only when it will have completely load its content
|
398
|
-
// (no blank screens for user).
|
399
|
-
WebView webView = v.getWebView(0);
|
400
|
-
webView.setWebViewClient(new WebViewClient() {
|
401
|
-
@Override
|
402
|
-
public void onPageFinished(WebView view, String url) {
|
403
|
-
mWebViewClient.onPageFinished(view, url);
|
404
|
-
// Restore standard WebViewClient to be sure this callback will not
|
405
|
-
// be called anymore (it should be called only once)
|
406
|
-
view.setWebViewClient(mWebViewClient);
|
407
|
-
|
408
|
-
setMainViewVisible.run();
|
409
|
-
}
|
410
|
-
});
|
411
|
-
}
|
412
|
-
}
|
413
|
-
|
356
|
+
public void setMainView(MainView v) {
|
357
|
+
if (v != null) {
|
358
|
+
mMainView = v;
|
359
|
+
setContentView(v.getView());
|
360
|
+
}
|
361
|
+
}
|
362
|
+
|
414
363
|
public MainView getMainView() {
|
415
364
|
return mMainView;
|
416
|
-
}
|
417
|
-
|
418
|
-
public WebView createWebView() {
|
419
|
-
WebView view = new WebView(this);
|
420
|
-
mWebSettings.setWebSettings(view);
|
421
|
-
view.setWebChromeClient(mChromeClient);
|
422
|
-
view.setWebViewClient(mWebViewClient);
|
423
|
-
view.clearCache(true);
|
424
|
-
|
425
|
-
return view;
|
426
|
-
}
|
427
|
-
|
428
|
-
private void initWebStuff() {
|
429
|
-
String ccName;
|
430
|
-
String wsName;
|
431
|
-
int sdkVersion = Integer.parseInt(Build.VERSION.SDK);
|
432
|
-
if (sdkVersion < Build.VERSION_CODES.ECLAIR_MR1) {
|
433
|
-
ccName = "ChromeClientOld";
|
434
|
-
wsName = "RhoWebSettingsOld";
|
435
|
-
}
|
436
|
-
else {
|
437
|
-
ccName = "ChromeClientNew";
|
438
|
-
wsName = "RhoWebSettingsNew";
|
439
|
-
}
|
440
|
-
|
441
|
-
try {
|
442
|
-
String pkgname = ChromeClientOld.class.getPackage().getName();
|
443
|
-
String fullName = pkgname + "." + ccName;
|
444
|
-
Class<? extends WebChromeClient> ccClass =
|
445
|
-
Class.forName(fullName).asSubclass(WebChromeClient.class);
|
446
|
-
|
447
|
-
Constructor<? extends WebChromeClient> ctor = ccClass.getConstructor(RhodesActivity.class);
|
448
|
-
mChromeClient = ctor.newInstance(this);
|
449
|
-
|
450
|
-
pkgname = RhoWebSettings.class.getPackage().getName();
|
451
|
-
fullName = pkgname + "." + wsName;
|
452
|
-
Class<? extends RhoWebSettings> wsClass =
|
453
|
-
Class.forName(fullName).asSubclass(RhoWebSettings.class);
|
454
|
-
mWebSettings = wsClass.newInstance();
|
455
|
-
|
456
|
-
mWebViewClient = new RhoWebViewClient();
|
457
|
-
}
|
458
|
-
catch (Exception e) {
|
459
|
-
throw new IllegalStateException(e);
|
460
|
-
}
|
461
|
-
}
|
365
|
+
}
|
462
366
|
|
463
367
|
@Override
|
464
368
|
public void onServiceConnected(ComponentName name, IBinder service) {
|
@@ -518,7 +422,26 @@ public class RhodesActivity extends BaseActivity {
|
|
518
422
|
if(!RhodesApplication.canStart(paramString))
|
519
423
|
{
|
520
424
|
Logger.E(TAG, "This is hidden app and can be started only with security key.");
|
521
|
-
|
425
|
+
|
426
|
+
//Toast.makeText(this,"Invalid security token !",Toast.LENGTH_SHORT).show();
|
427
|
+
/*
|
428
|
+
AlertDialog.Builder b = new AlertDialog.Builder(this);
|
429
|
+
b.setCancelable(true);
|
430
|
+
b.setOnCancelListener( new DialogInterface.OnCancelListener() {
|
431
|
+
public void onCancel(DialogInterface dialog) {
|
432
|
+
RhodesService.exit();
|
433
|
+
}
|
434
|
+
});
|
435
|
+
AlertDialog securityAlert = b.create();
|
436
|
+
securityAlert.setMessage(RhodesService.getInvalidSecurityTokenMessage());
|
437
|
+
securityAlert.setButton("OK", new DialogInterface.OnClickListener(){
|
438
|
+
public void onClick(DialogInterface arg0, int arg1) {
|
439
|
+
RhodesService.exit();
|
440
|
+
}
|
441
|
+
|
442
|
+
});
|
443
|
+
securityAlert.show();
|
444
|
+
*/
|
522
445
|
return;
|
523
446
|
}
|
524
447
|
|