rhodes 7.5.1 → 7.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +319 -0
- data/README.md +3 -15
- data/Rakefile +3 -0
- data/appveyor.yml +37 -32
- data/azure-pipelines.yml +1 -1
- 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 +1 -1
- 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/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 +1 -0
- 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/src/com/rho/intent/IntentSingleton.java +6 -0
- data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/Notification.java +2 -1
- data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationScheduler.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/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/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 +1 -0
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraObject.java +8 -4
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraRhoListener.java +8 -0
- 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/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/iphone/Podfile +15 -2
- data/lib/extensions/fcm-push/ext/iphone/fcm-push.xcodeproj/project.pbxproj +6 -7
- 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/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 +529 -89
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +26 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +256 -160
- 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 +6 -1
- 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/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/android-repack.rake +8 -1
- data/platform/android/build/android.rake +118 -51
- data/platform/android/build/android_tools.rb +1 -1
- data/platform/android/build/androidcommon.rb +13 -7
- data/platform/android/build/config.yml +4 -1
- data/platform/android/build/manifest_generator.rb +14 -10
- data/platform/android/build/maven_deps_extractor.rb +7 -1
- data/platform/android/build/ndkwrapper.rb +12 -0
- data/platform/android/proguard/proguard-base-rules.pro +5 -0
- data/platform/android/proguard/proguard.jar +0 -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 +32 -4
- data/platform/iphone/Classes/RhoWebView.h +1 -1
- data/platform/iphone/Classes/RhoWebViewFabrique.m +7 -1
- 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/Framework/RhoApplication/RhoApplication.xcodeproj/project.pbxproj +1 -1
- data/platform/iphone/Framework/Rhodes/Rhodes.xcodeproj/project.pbxproj +1 -1
- data/platform/iphone/RhoAppBaseLib/RhoAppBaseLib.xcodeproj/project.pbxproj +46 -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 +9 -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 +33 -9
- data/platform/shared/common/iphone/RhoCryptImpl.mm +130 -54
- 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/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 +3 -0
- data/res/build-tools/iphonesim/build/Release/iphonesim_8 +4 -4
- data/res/generators/templates/application/AndroidManifest.erb +26 -5
- data/res/generators/templates/application/build.yml +14 -10
- data/res/generators/templates/application/resources/android/res/xml/provider_paths.xml +4 -0
- data/res/generators/templates/application/rhoconfig.txt +10 -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 +3 -3
- data/rhodes.gemspec +4 -2
- data/version +1 -1
- metadata +81 -26
- 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
@@ -41,10 +41,12 @@ import android.content.pm.ResolveInfo;
|
|
41
41
|
import android.content.pm.PackageManager;
|
42
42
|
import android.content.res.AssetFileDescriptor;
|
43
43
|
import android.database.Cursor;
|
44
|
+
import android.database.MatrixCursor;
|
44
45
|
import android.net.Uri;
|
45
46
|
import android.net.Uri.Builder;
|
46
47
|
import android.webkit.MimeTypeMap;
|
47
48
|
import android.os.ParcelFileDescriptor;
|
49
|
+
import android.provider.OpenableColumns;
|
48
50
|
import java.io.FileNotFoundException;
|
49
51
|
|
50
52
|
|
@@ -240,14 +242,34 @@ public class LocalFileProvider extends ContentProvider
|
|
240
242
|
"Insert operation is not supported by this provider");
|
241
243
|
}
|
242
244
|
|
245
|
+
private static final String[] COLUMNS = {
|
246
|
+
OpenableColumns.DISPLAY_NAME, OpenableColumns.SIZE };
|
247
|
+
|
243
248
|
@Override
|
244
|
-
public Cursor query(Uri uri, String[]
|
249
|
+
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
|
245
250
|
Logger.T(TAG, "query: " + uri);
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
+
// ContentProvider has already checked granted permissions
|
252
|
+
final File file = fileFromUri(uri);
|
253
|
+
if (projection == null) {
|
254
|
+
projection = COLUMNS;
|
255
|
+
}
|
256
|
+
String[] cols = new String[projection.length];
|
257
|
+
Object[] values = new Object[projection.length];
|
258
|
+
int i = 0;
|
259
|
+
for (String col : projection) {
|
260
|
+
if (OpenableColumns.DISPLAY_NAME.equals(col)) {
|
261
|
+
cols[i] = OpenableColumns.DISPLAY_NAME;
|
262
|
+
values[i++] = file.getName();
|
263
|
+
} else if (OpenableColumns.SIZE.equals(col)) {
|
264
|
+
cols[i] = OpenableColumns.SIZE;
|
265
|
+
values[i++] = file.length();
|
266
|
+
}
|
267
|
+
}
|
268
|
+
cols = copyOf(cols, i);
|
269
|
+
values = copyOf(values, i);
|
270
|
+
final MatrixCursor cursor = new MatrixCursor(cols, 1);
|
271
|
+
cursor.addRow(values);
|
272
|
+
return cursor;
|
251
273
|
}
|
252
274
|
|
253
275
|
@Override
|
@@ -258,4 +280,14 @@ public class LocalFileProvider extends ContentProvider
|
|
258
280
|
"Update operation is not supported by this provider");
|
259
281
|
}
|
260
282
|
|
283
|
+
private static String[] copyOf(String[] original, int newLength) {
|
284
|
+
final String[] result = new String[newLength];
|
285
|
+
System.arraycopy(original, 0, result, 0, newLength);
|
286
|
+
return result;
|
287
|
+
}
|
288
|
+
private static Object[] copyOf(Object[] original, int newLength) {
|
289
|
+
final Object[] result = new Object[newLength];
|
290
|
+
System.arraycopy(original, 0, result, 0, newLength);
|
291
|
+
return result;
|
292
|
+
}
|
261
293
|
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/*------------------------------------------------------------------------
|
2
|
+
* (The MIT License)
|
3
|
+
*
|
4
|
+
* Copyright (c) 2008-2011 Rhomobile, Inc.
|
5
|
+
*
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
11
|
+
* furnished to do so, subject to the following conditions:
|
12
|
+
*
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
14
|
+
* all copies or substantial portions of the Software.
|
15
|
+
*
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
* THE SOFTWARE.
|
23
|
+
*
|
24
|
+
* http://rhomobile.com
|
25
|
+
*------------------------------------------------------------------------*/
|
26
|
+
|
27
|
+
package com.rhomobile.rhodes;
|
28
|
+
|
29
|
+
import androidx.core.content.FileProvider;
|
30
|
+
|
31
|
+
public class RhoFileProvider extends FileProvider {
|
32
|
+
}
|