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
@@ -259,6 +259,7 @@ public class RhodesApplication extends Application{
|
|
259
259
|
private native static void startRhodesApp();
|
260
260
|
private native static void stopRhodesApp();
|
261
261
|
private native static boolean canStartApp(String strCmdLine, String strSeparators);
|
262
|
+
private native static void setStartParameters(String startParam);
|
262
263
|
|
263
264
|
public static void create()
|
264
265
|
{
|
@@ -282,6 +283,10 @@ public class RhodesApplication extends Application{
|
|
282
283
|
{
|
283
284
|
return canStartApp(strCmdLine, "&#");
|
284
285
|
}
|
286
|
+
public static void setStartParametersApp(String startParam)
|
287
|
+
{
|
288
|
+
setStartParameters(startParam);
|
289
|
+
}
|
285
290
|
|
286
291
|
public static void stop() {
|
287
292
|
Logger.T(TAG, "Stopping application");
|
@@ -304,17 +309,17 @@ public class RhodesApplication extends Application{
|
|
304
309
|
Logger.T(TAG, "send kill signal");
|
305
310
|
Process.killProcess(Process.myPid());
|
306
311
|
}
|
307
|
-
},
|
312
|
+
}, 200);
|
308
313
|
}
|
309
|
-
},
|
314
|
+
}, 200);
|
310
315
|
}
|
311
316
|
|
312
|
-
|
317
|
+
|
313
318
|
public static abstract class StateHandler implements Runnable
|
314
319
|
{
|
315
320
|
private Exception error;
|
316
321
|
private boolean runOnce;
|
317
|
-
|
322
|
+
|
318
323
|
public StateHandler(boolean once) { runOnce = once; }
|
319
324
|
|
320
325
|
protected void setError(Exception err) { error = err; }
|
@@ -323,6 +328,23 @@ public class RhodesApplication extends Application{
|
|
323
328
|
public abstract void run();
|
324
329
|
}
|
325
330
|
|
331
|
+
public static abstract class StateHandlerInUIThread extends StateHandler
|
332
|
+
{
|
333
|
+
public StateHandlerInUIThread(boolean once) { super(once); }
|
334
|
+
|
335
|
+
public abstract void runInUI();
|
336
|
+
|
337
|
+
final public void run()
|
338
|
+
{
|
339
|
+
PerformOnUiThread.exec(new Runnable() {
|
340
|
+
@Override
|
341
|
+
public void run() {
|
342
|
+
StateHandlerInUIThread.this.runInUI();
|
343
|
+
} }
|
344
|
+
);
|
345
|
+
}
|
346
|
+
}
|
347
|
+
|
326
348
|
/**
|
327
349
|
*
|
328
350
|
* @author lexis_tikh
|
@@ -63,6 +63,7 @@ import com.rhomobile.rhodes.mainview.MainView;
|
|
63
63
|
import com.rhomobile.rhodes.mainview.SplashScreen;
|
64
64
|
import com.rhomobile.rhodes.osfunctionality.AndroidFunctionalityManager;
|
65
65
|
import com.rhomobile.rhodes.ui.AboutDialog;
|
66
|
+
import com.rhomobile.rhodes.ui.FileList;
|
66
67
|
import com.rhomobile.rhodes.ui.LogOptionsDialog;
|
67
68
|
import com.rhomobile.rhodes.ui.LogViewDialog;
|
68
69
|
import com.rhomobile.rhodes.uri.ExternalHttpHandler;
|
@@ -78,6 +79,7 @@ import com.rhomobile.rhodes.util.PerformOnUiThread;
|
|
78
79
|
import com.rhomobile.rhodes.util.PhoneId;
|
79
80
|
import com.rhomobile.rhodes.util.Utils;
|
80
81
|
//import com.rhomobile.rhodes.camera.Camera;
|
82
|
+
import android.app.DownloadManager;
|
81
83
|
|
82
84
|
import android.app.Activity;
|
83
85
|
import android.app.ActivityManager;
|
@@ -128,7 +130,7 @@ import android.widget.EditText;
|
|
128
130
|
import android.os.Environment;
|
129
131
|
import android.content.pm.ApplicationInfo;
|
130
132
|
import android.content.pm.PackageManager.NameNotFoundException;
|
131
|
-
|
133
|
+
import androidx.core.content.FileProvider;
|
132
134
|
|
133
135
|
import java.util.Enumeration;
|
134
136
|
import java.net.NetworkInterface;
|
@@ -384,14 +386,14 @@ public class RhodesService extends Service {
|
|
384
386
|
.getResourcesForApplication(getApplicationContext().getPackageName());
|
385
387
|
int id_icon = res.getIdentifier("icon", "mipmap", getApplicationContext().getPackageName());
|
386
388
|
if(android.os.Build.VERSION.SDK_INT < 28)
|
387
|
-
{
|
389
|
+
{
|
388
390
|
builder.setSmallIcon(id_icon);
|
389
391
|
}
|
390
392
|
|
391
393
|
} catch (Exception e) {
|
392
|
-
|
394
|
+
|
393
395
|
if(android.os.Build.VERSION.SDK_INT < 28)
|
394
|
-
{
|
396
|
+
{
|
395
397
|
builder.setSmallIcon(R.mipmap.icon);
|
396
398
|
}
|
397
399
|
Logger.E(TAG, "Resources of icon not found!!!");
|
@@ -454,21 +456,33 @@ public class RhodesService extends Service {
|
|
454
456
|
mUriHandlers.addElement(new SmsUriHandler(context));
|
455
457
|
mUriHandlers.addElement(new VideoUriHandler(context));
|
456
458
|
|
457
|
-
mConnectionChangeReceiver = new ConnectionChangeReceiver();
|
458
|
-
IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
|
459
|
-
registerReceiver(mConnectionChangeReceiver,filter);
|
460
|
-
|
461
459
|
RhodesApplication.start();
|
462
460
|
|
463
461
|
if (BaseActivity.getActivitiesCount() > 0)
|
464
462
|
handleAppActivation();
|
465
463
|
}
|
466
464
|
|
465
|
+
public void startConnectionChangeReciver(){
|
466
|
+
mConnectionChangeReceiver = new ConnectionChangeReceiver();
|
467
|
+
IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
|
468
|
+
registerReceiver(mConnectionChangeReceiver,filter);
|
469
|
+
}
|
470
|
+
|
467
471
|
public static void handleAppStarted()
|
468
472
|
{
|
469
473
|
RhodesApplication.handleAppStarted();
|
470
|
-
if(rhoMain != null)
|
474
|
+
if(rhoMain != null) {
|
471
475
|
rhoMain.onAppStart();
|
476
|
+
}
|
477
|
+
|
478
|
+
PerformOnUiThread.exec(new Runnable(){
|
479
|
+
|
480
|
+
@Override
|
481
|
+
public void run() {
|
482
|
+
RhodesService.getInstance().startConnectionChangeReciver();
|
483
|
+
}
|
484
|
+
});
|
485
|
+
|
472
486
|
}
|
473
487
|
|
474
488
|
private void initForegroundServiceApi() {
|
@@ -489,8 +503,21 @@ public class RhodesService extends Service {
|
|
489
503
|
Logger.D(TAG, "initForegroundServiceApi() FINISH");
|
490
504
|
}
|
491
505
|
|
506
|
+
|
507
|
+
private Runnable mOnDestroyListener = null;
|
508
|
+
|
509
|
+
public void setOnDestroyListener(Runnable listener) {
|
510
|
+
mOnDestroyListener = listener;
|
511
|
+
}
|
512
|
+
|
492
513
|
@Override
|
493
514
|
public void onDestroy() {
|
515
|
+
unregisterReceiver(mConnectionChangeReceiver);
|
516
|
+
|
517
|
+
if (mOnDestroyListener != null) {
|
518
|
+
mOnDestroyListener.run();
|
519
|
+
mOnDestroyListener = null;
|
520
|
+
}
|
494
521
|
|
495
522
|
if(DEBUG)
|
496
523
|
Log.d(TAG, "+++ onDestroy");
|
@@ -677,12 +704,9 @@ public class RhodesService extends Service {
|
|
677
704
|
}
|
678
705
|
});
|
679
706
|
}
|
680
|
-
|
681
|
-
{
|
682
|
-
|
683
|
-
@Override
|
684
|
-
public void run() {
|
685
|
-
Logger.I(TAG, "Exit application");
|
707
|
+
|
708
|
+
public static void PerformRealExitInUiThread(){
|
709
|
+
Logger.I(TAG, "Exit application");
|
686
710
|
try {
|
687
711
|
// Do this fake state change in order to make processing before server is stopped
|
688
712
|
RhodesApplication.stateChanged(RhodesApplication.UiState.MainActivityPaused);
|
@@ -701,6 +725,14 @@ public class RhodesService extends Service {
|
|
701
725
|
catch (Exception e) {
|
702
726
|
Logger.E(TAG, e);
|
703
727
|
}
|
728
|
+
}
|
729
|
+
|
730
|
+
public static void PerformRealExit()
|
731
|
+
{
|
732
|
+
PerformOnUiThread.exec(new Runnable() {
|
733
|
+
@Override
|
734
|
+
public void run() {
|
735
|
+
PerformRealExitInUiThread();
|
704
736
|
}
|
705
737
|
});
|
706
738
|
}
|
@@ -716,6 +748,8 @@ public class RhodesService extends Service {
|
|
716
748
|
PerformRealExit();
|
717
749
|
}
|
718
750
|
|
751
|
+
|
752
|
+
|
719
753
|
public static void showAboutDialog() {
|
720
754
|
PerformOnUiThread.exec(new Runnable() {
|
721
755
|
public void run() {
|
@@ -1162,7 +1196,7 @@ public class RhodesService extends Service {
|
|
1162
1196
|
}
|
1163
1197
|
}
|
1164
1198
|
|
1165
|
-
private void updateDownloadNotification(String url, int totalBytes, int currentBytes) {
|
1199
|
+
/*private void updateDownloadNotification(String url, int totalBytes, int currentBytes) {
|
1166
1200
|
Context context = RhodesActivity.getContext();
|
1167
1201
|
|
1168
1202
|
RemoteViews expandedView = new RemoteViews(context.getPackageName(),
|
@@ -1205,162 +1239,203 @@ public class RhodesService extends Service {
|
|
1205
1239
|
}
|
1206
1240
|
|
1207
1241
|
private File downloadPackage(String url) throws IOException {
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1242
|
+
File packageFile = new File(url);
|
1243
|
+
if (packageFile.exists()) {
|
1244
|
+
return packageFile;
|
1245
|
+
}else{
|
1246
|
+
final Context ctx = RhodesActivity.getContext();
|
1211
1247
|
|
1212
|
-
|
1213
|
-
public void run() {
|
1214
|
-
thisThread.interrupt();
|
1215
|
-
}
|
1216
|
-
};
|
1248
|
+
final Thread thisThread = Thread.currentThread();
|
1217
1249
|
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
String action = intent.getAction();
|
1222
|
-
if (action.equals(ACTION_ASK_CANCEL_DOWNLOAD)) {
|
1223
|
-
AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
|
1224
|
-
builder.setMessage("Cancel download?");
|
1225
|
-
AlertDialog dialog = builder.create();
|
1226
|
-
dialog.setButton(AlertDialog.BUTTON_POSITIVE, ctx.getText(android.R.string.yes),
|
1227
|
-
new DialogInterface.OnClickListener() {
|
1228
|
-
public void onClick(DialogInterface dialog, int which) {
|
1229
|
-
cancelAction.run();
|
1230
|
-
}
|
1231
|
-
});
|
1232
|
-
dialog.setButton(AlertDialog.BUTTON_NEGATIVE, ctx.getText(android.R.string.no),
|
1233
|
-
new DialogInterface.OnClickListener() {
|
1234
|
-
public void onClick(DialogInterface dialog, int which) {
|
1235
|
-
// Nothing
|
1236
|
-
}
|
1237
|
-
});
|
1238
|
-
dialog.show();
|
1250
|
+
final Runnable cancelAction = new Runnable() {
|
1251
|
+
public void run() {
|
1252
|
+
thisThread.interrupt();
|
1239
1253
|
}
|
1240
|
-
|
1241
|
-
|
1254
|
+
};
|
1255
|
+
|
1256
|
+
BroadcastReceiver downloadReceiver = new BroadcastReceiver() {
|
1257
|
+
@Override
|
1258
|
+
public void onReceive(Context context, Intent intent) {
|
1259
|
+
String action = intent.getAction();
|
1260
|
+
if (action.equals(ACTION_ASK_CANCEL_DOWNLOAD)) {
|
1261
|
+
AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
|
1262
|
+
builder.setMessage("Cancel download?");
|
1263
|
+
AlertDialog dialog = builder.create();
|
1264
|
+
dialog.setButton(AlertDialog.BUTTON_POSITIVE, ctx.getText(android.R.string.yes),
|
1265
|
+
new DialogInterface.OnClickListener() {
|
1266
|
+
public void onClick(DialogInterface dialog, int which) {
|
1267
|
+
cancelAction.run();
|
1268
|
+
}
|
1269
|
+
});
|
1270
|
+
dialog.setButton(AlertDialog.BUTTON_NEGATIVE, ctx.getText(android.R.string.no),
|
1271
|
+
new DialogInterface.OnClickListener() {
|
1272
|
+
public void onClick(DialogInterface dialog, int which) {
|
1273
|
+
// Nothing
|
1274
|
+
}
|
1275
|
+
});
|
1276
|
+
dialog.show();
|
1277
|
+
}
|
1278
|
+
else if (action.equals(ACTION_CANCEL_DOWNLOAD)) {
|
1279
|
+
cancelAction.run();
|
1280
|
+
}
|
1242
1281
|
}
|
1243
|
-
}
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
OutputStream os = null;
|
1253
|
-
try {
|
1254
|
-
updateDownloadNotification(url, -1, 0);
|
1255
|
-
|
1256
|
-
/*
|
1257
|
-
List<File> folders = new ArrayList<File>();
|
1258
|
-
folders.add(Environment.getDownloadCacheDirectory());
|
1259
|
-
folders.add(Environment.getDataDirectory());
|
1260
|
-
folders.add(ctx.getCacheDir());
|
1261
|
-
folders.add(ctx.getFilesDir());
|
1282
|
+
};
|
1283
|
+
IntentFilter filter = new IntentFilter();
|
1284
|
+
filter.addAction(ACTION_ASK_CANCEL_DOWNLOAD);
|
1285
|
+
filter.addAction(ACTION_CANCEL_DOWNLOAD);
|
1286
|
+
ctx.registerReceiver(downloadReceiver, filter);
|
1287
|
+
|
1288
|
+
File tmpFile = null;
|
1289
|
+
InputStream is = null;
|
1290
|
+
OutputStream os = null;
|
1262
1291
|
try {
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1292
|
+
updateDownloadNotification(url, -1, 0);
|
1293
|
+
|
1294
|
+
|
1295
|
+
// List<File> folders = new ArrayList<File>();
|
1296
|
+
// folders.add(Environment.getDownloadCacheDirectory());
|
1297
|
+
// folders.add(Environment.getDataDirectory());
|
1298
|
+
// folders.add(ctx.getCacheDir());
|
1299
|
+
// folders.add(ctx.getFilesDir());
|
1300
|
+
// try {
|
1301
|
+
// folders.add(new File(ctx.getPackageManager().getApplicationInfo(ctx.getPackageName(), 0).dataDir));
|
1302
|
+
// } catch (NameNotFoundException e1) {
|
1303
|
+
// // Ignore
|
1304
|
+
// }
|
1305
|
+
// folders.add(Environment.getExternalStorageDirectory());
|
1306
|
+
|
1307
|
+
// for (File folder : folders) {
|
1308
|
+
// File tmpRootFolder = new File(folder, "rhodownload");
|
1309
|
+
// File tmpFolder = new File(tmpRootFolder, ctx.getPackageName());
|
1310
|
+
// if (tmpFolder.exists())
|
1311
|
+
// deleteFilesInFolder(tmpFolder.getAbsolutePath());
|
1312
|
+
// else
|
1313
|
+
// tmpFolder.mkdirs();
|
1314
|
+
|
1315
|
+
// File of = new File(tmpFolder, UUID.randomUUID().toString() + ".apk");
|
1316
|
+
// Logger.D(TAG, "Check path " + of.getAbsolutePath() + "...");
|
1317
|
+
// try {
|
1318
|
+
// os = new FileOutputStream(of);
|
1319
|
+
// }
|
1320
|
+
// catch (FileNotFoundException e) {
|
1321
|
+
// Logger.D(TAG, "Can't open file " + of.getAbsolutePath() + ", check next path");
|
1322
|
+
// continue;
|
1323
|
+
// }
|
1324
|
+
// Logger.D(TAG, "File " + of.getAbsolutePath() + " succesfully opened for write, start download app");
|
1325
|
+
|
1326
|
+
// tmpFile = of;
|
1327
|
+
// break;
|
1328
|
+
// }
|
1329
|
+
|
1330
|
+
|
1331
|
+
tmpFile = new File( Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), UUID.randomUUID().toString() + ".apk" );
|
1332
|
+
os = ctx.openFileOutput(tmpFile.getName(), Context.MODE_PRIVATE);
|
1333
|
+
|
1334
|
+
Logger.D(TAG, "Download " + url + " to " + tmpFile.getAbsolutePath() + "...");
|
1335
|
+
|
1336
|
+
URL u = new URL(url);
|
1337
|
+
URLConnection conn = u.openConnection();
|
1338
|
+
int totalBytes = -1;
|
1339
|
+
if (conn instanceof HttpURLConnection) {
|
1340
|
+
HttpURLConnection httpConn = (HttpURLConnection)conn;
|
1341
|
+
totalBytes = httpConn.getContentLength();
|
1281
1342
|
}
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1343
|
+
is = conn.getInputStream();
|
1344
|
+
|
1345
|
+
int downloaded = 0;
|
1346
|
+
updateDownloadNotification(url, totalBytes, downloaded);
|
1347
|
+
|
1348
|
+
long prevProgress = 0;
|
1349
|
+
byte[] buf = new byte[65536];
|
1350
|
+
for (;;) {
|
1351
|
+
if (thisThread.isInterrupted()) {
|
1352
|
+
tmpFile.delete();
|
1353
|
+
Logger.D(TAG, "Download of " + url + " was canceled");
|
1354
|
+
return null;
|
1355
|
+
}
|
1356
|
+
int nread = is.read(buf);
|
1357
|
+
if (nread == 0)
|
1358
|
+
break;
|
1359
|
+
|
1360
|
+
//Logger.D(TAG, "Downloading " + url + ": got " + nread + " bytes...");
|
1361
|
+
os.write(buf, 0, nread);
|
1362
|
+
|
1363
|
+
downloaded += nread;
|
1364
|
+
if (totalBytes > 0) {
|
1365
|
+
// Update progress view only if current progress is greater than
|
1366
|
+
// previous by more than 10%. Otherwise, if update it very frequently,
|
1367
|
+
// user will no have chance to click on notification view and cancel if need
|
1368
|
+
long progress = downloaded*10/totalBytes;
|
1369
|
+
if (progress > prevProgress) {
|
1370
|
+
updateDownloadNotification(url, totalBytes, downloaded);
|
1371
|
+
prevProgress = progress;
|
1372
|
+
}
|
1373
|
+
}
|
1285
1374
|
}
|
1286
|
-
Logger.D(TAG, "File " + of.getAbsolutePath() + " succesfully opened for write, start download app");
|
1287
1375
|
|
1288
|
-
|
1289
|
-
|
1290
|
-
}
|
1291
|
-
*/
|
1376
|
+
Logger.D(TAG, "File stored to " + tmpFile.getAbsolutePath());
|
1377
|
+
Log.d(TAG, "File stored to " + tmpFile.getAbsolutePath());
|
1292
1378
|
|
1293
|
-
tmpFile = new File( Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), UUID.randomUUID().toString() + ".apk" );
|
1294
|
-
os = ctx.openFileOutput(tmpFile.getName(), Context.MODE_PRIVATE);
|
1295
1379
|
|
1296
|
-
|
1380
|
+
Logger.D(TAG, "File exist :"+ tmpFile.exists());
|
1381
|
+
Log.d(TAG, "File exist :"+ tmpFile.exists());
|
1297
1382
|
|
1298
|
-
|
1299
|
-
URLConnection conn = u.openConnection();
|
1300
|
-
int totalBytes = -1;
|
1301
|
-
if (conn instanceof HttpURLConnection) {
|
1302
|
-
HttpURLConnection httpConn = (HttpURLConnection)conn;
|
1303
|
-
totalBytes = httpConn.getContentLength();
|
1383
|
+
return tmpFile;
|
1304
1384
|
}
|
1305
|
-
|
1385
|
+
catch (IOException e) {
|
1306
1386
|
|
1307
|
-
|
1308
|
-
|
1387
|
+
Logger.D(TAG, e.toString());
|
1388
|
+
e.printStackTrace();
|
1309
1389
|
|
1310
|
-
|
1311
|
-
byte[] buf = new byte[65536];
|
1312
|
-
for (;;) {
|
1313
|
-
if (thisThread.isInterrupted()) {
|
1390
|
+
if (tmpFile != null)
|
1314
1391
|
tmpFile.delete();
|
1315
|
-
|
1316
|
-
return null;
|
1317
|
-
}
|
1318
|
-
int nread = is.read(buf);
|
1319
|
-
if (nread == -1)
|
1320
|
-
break;
|
1321
|
-
|
1322
|
-
//Logger.D(TAG, "Downloading " + url + ": got " + nread + " bytes...");
|
1323
|
-
os.write(buf, 0, nread);
|
1324
|
-
|
1325
|
-
downloaded += nread;
|
1326
|
-
if (totalBytes > 0) {
|
1327
|
-
// Update progress view only if current progress is greater than
|
1328
|
-
// previous by more than 10%. Otherwise, if update it very frequently,
|
1329
|
-
// user will no have chance to click on notification view and cancel if need
|
1330
|
-
long progress = downloaded*10/totalBytes;
|
1331
|
-
if (progress > prevProgress) {
|
1332
|
-
updateDownloadNotification(url, totalBytes, downloaded);
|
1333
|
-
prevProgress = progress;
|
1334
|
-
}
|
1335
|
-
}
|
1392
|
+
throw e;
|
1336
1393
|
}
|
1394
|
+
finally {
|
1395
|
+
try {
|
1396
|
+
if (is != null)
|
1397
|
+
is.close();
|
1398
|
+
} catch (IOException e) {}
|
1399
|
+
try {
|
1400
|
+
if (os != null)
|
1401
|
+
os.close();
|
1402
|
+
} catch (IOException e) {}
|
1337
1403
|
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1404
|
+
mNM.cancel(DOWNLOAD_PACKAGE_ID);
|
1405
|
+
ctx.unregisterReceiver(downloadReceiver);
|
1406
|
+
}
|
1341
1407
|
}
|
1342
|
-
|
1343
|
-
|
1344
|
-
Logger.E(TAG, e.toString());
|
1345
|
-
e.printStackTrace();
|
1408
|
+
} */
|
1346
1409
|
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1410
|
+
private void downloadPackage(String url) throws IOException{
|
1411
|
+
final String packageName = (UUID.randomUUID().toString() + ".apk");
|
1412
|
+
Uri uri = Uri.parse(url);
|
1413
|
+
try {
|
1414
|
+
DownloadManager.Request request = new DownloadManager.Request(uri)
|
1415
|
+
.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_MOBILE | DownloadManager.Request.NETWORK_MOBILE)
|
1416
|
+
.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)
|
1417
|
+
.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, packageName);
|
1418
|
+
final DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
|
1419
|
+
final long downloadID = manager.enqueue(request);
|
1420
|
+
|
1421
|
+
BroadcastReceiver receiver = new BroadcastReceiver() {
|
1422
|
+
@Override
|
1423
|
+
public void onReceive(Context context, Intent intent) {
|
1424
|
+
long id = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1);
|
1425
|
+
if (downloadID == id) {
|
1426
|
+
unregisterReceiver(this);
|
1427
|
+
installApplication(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath() + "/" + packageName);
|
1428
|
+
Logger.D(TAG, "File stored to " + packageName);
|
1429
|
+
Log.d(TAG, "File stored to " + packageName);
|
1430
|
+
}
|
1431
|
+
}
|
1432
|
+
};
|
1360
1433
|
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1434
|
+
registerReceiver(receiver, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
|
1435
|
+
} catch (Exception e){
|
1436
|
+
Logger.D(TAG, e.toString());
|
1437
|
+
e.printStackTrace();
|
1438
|
+
}
|
1364
1439
|
}
|
1365
1440
|
|
1366
1441
|
public static void installApplication(final String url) {
|
@@ -1368,16 +1443,37 @@ public class RhodesService extends Service {
|
|
1368
1443
|
public void run() {
|
1369
1444
|
try {
|
1370
1445
|
final RhodesService r = RhodesService.getInstance();
|
1371
|
-
final File tmpFile =
|
1372
|
-
if
|
1446
|
+
final File tmpFile = new File(url);
|
1447
|
+
if(!tmpFile.exists()) {
|
1448
|
+
r.downloadPackage(url);
|
1449
|
+
}else{
|
1373
1450
|
PerformOnUiThread.exec(new Runnable() {
|
1374
1451
|
public void run() {
|
1375
1452
|
try {
|
1376
1453
|
Logger.D(TAG, "Install package " + tmpFile.getAbsolutePath());
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1454
|
+
|
1455
|
+
Log.e(TAG, "Version android SDK: " + android.os.Build.VERSION.SDK_INT);
|
1456
|
+
if(android.os.Build.VERSION.SDK_INT >= 24)
|
1457
|
+
{
|
1458
|
+
Context context = r.getContext();
|
1459
|
+
Uri uri = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName()+".provider", tmpFile);
|
1460
|
+
Logger.D(TAG, "Path uri for fileProvider: " + uri.toString());
|
1461
|
+
|
1462
|
+
Intent intent = new Intent(Intent.ACTION_VIEW);
|
1463
|
+
intent.setDataAndType(uri, "application/vnd.android.package-archive");
|
1464
|
+
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
1465
|
+
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
1466
|
+
|
1467
|
+
r.startActivity(intent);
|
1468
|
+
|
1469
|
+
} else {
|
1470
|
+
Uri uri = Uri.fromFile(tmpFile);
|
1471
|
+
Logger.D(TAG, "Path uri for old: " + uri.toString());
|
1472
|
+
Intent intent = new Intent(Intent.ACTION_VIEW);
|
1473
|
+
|
1474
|
+
intent.setDataAndType(uri, "application/vnd.android.package-archive");
|
1475
|
+
r.startActivity(intent);
|
1476
|
+
}
|
1381
1477
|
}
|
1382
1478
|
catch (Exception e) {
|
1383
1479
|
Log.e(TAG, "Can't install file from " + tmpFile.getAbsolutePath(), e);
|
@@ -1386,8 +1482,7 @@ public class RhodesService extends Service {
|
|
1386
1482
|
}
|
1387
1483
|
});
|
1388
1484
|
}
|
1389
|
-
}
|
1390
|
-
catch (IOException e) {
|
1485
|
+
}catch (IOException e) {
|
1391
1486
|
Log.e(TAG, "Can't download package from " + url, e);
|
1392
1487
|
Logger.E(TAG, "Can't download package from " + url + ": " + e.getMessage());
|
1393
1488
|
}
|
@@ -1519,6 +1614,7 @@ public class RhodesService extends Service {
|
|
1519
1614
|
uuid = reader.readLine();
|
1520
1615
|
}catch (IOException e) {
|
1521
1616
|
Logger.E(TAG, "Error on reading UUID from file: " + e.getMessage());
|
1617
|
+
uuid = computeUUID();
|
1522
1618
|
}finally{
|
1523
1619
|
reader.close();
|
1524
1620
|
}
|
@@ -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
|
|