Upstream version 10.38.222.0 51/28651/1
authorEurogiciel-BOT <eurogiciel.tizen@gmail.com>
Mon, 13 Oct 2014 08:56:00 +0000 (08:56 +0000)
committerEurogiciel-BOT <eurogiciel.tizen@gmail.com>
Mon, 13 Oct 2014 08:56:00 +0000 (08:56 +0000)
Upstream commit-id 635657483f74a7db29a3f9cee2d1a3af8f018bb6

Change-Id: I4cbb6c26176e24f37285b2904e23fbfe6caefe1f
Signed-off-by: Eurogiciel-BOT <eurogiciel.tizen@gmail.com>
packaging/crosswalk.spec
src/xwalk/VERSION
src/xwalk/application/browser/application_tizen.cc
src/xwalk/application/tools/tizen/xwalk_package_installer.cc
src/xwalk/application/tools/tizen/xwalk_package_installer.h
src/xwalk/packaging/crosswalk.spec
src/xwalk/runtime/android/core_internal/src/org/xwalk/core/internal/XWalkViewInternal.java
src/xwalk/runtime/android/core_internal/src/org/xwalk/core/internal/extension/api/messaging/Messaging.java
src/xwalk/tizen/browser/media/murphy_mainloop.cc

index 53ae812..93d3839 100644 (file)
 %define _disable_nacl 0
 %endif
 
+# adjust compression algorithm to speed up RPMS creation
+# source RPM and debug RPMS are big and take too much time
+# when using standard (lzma) compression
+%define _source_payload w3.gzdio
+%define _binary_payload w3.gzdio
+
 Name:           crosswalk
-Version:        10.38.220.0
+Version:        10.38.222.0
 Release:        0
 Summary:        Chromium-based app runtime
 License:        (BSD-3-Clause and LGPL-2.1+)
@@ -279,10 +285,13 @@ ln -sf %{_libdir}/xwalk/xwalk_backend_wrapper.sh /etc/package-manager/backend/xp
 ln -sf %{_libdir}/xwalk/xwalk_backend_wrapper.sh /etc/package-manager/backend/wgt
 
 %preun
+if [ $1 -eq 0 ] ; then
+ # don't remove if we are upgrade the rpm package
 [ -L /etc/package-manager/backendlib/libxpk.so ] && rm /etc/package-manager/backendlib/libxpk.so
 [ -L /etc/package-manager/backendlib/libwgt.so ] && rm /etc/package-manager/backendlib/libwgt.so
 [ -L /etc/package-manager/backend/xpk ] && rm /etc/package-manager/backend/xpk
 [ -L /etc/package-manager/backend/wgt ] && rm /etc/package-manager/backend/wgt
+fi
 
 %files
 %manifest %{name}.manifest
index 7c09844..7d3477d 100644 (file)
@@ -1,4 +1,4 @@
 MAJOR=10
 MINOR=38
-BUILD=220
+BUILD=222
 PATCH=0
index 0f2ba0b..9297355 100644 (file)
 #include "ui/events/event_constants.h"
 #include "ui/events/keycodes/keyboard_codes_posix.h"
 #include "ui/events/platform/platform_event_source.h"
-#include "xwalk/application/common/manifest_handlers/tizen_setting_handler.h"
 #endif
 
 #include "xwalk/application/common/application_manifest_constants.h"
+#include "xwalk/application/common/manifest_handlers/tizen_setting_handler.h"
 #include "xwalk/application/common/manifest_handlers/tizen_splash_screen_handler.h"
 
 namespace xwalk {
index 0c3f840..ae15b98 100644 (file)
@@ -272,8 +272,7 @@ bool PackageInstaller::PlatformInstall(ApplicationData* app_data) {
   return true;
 }
 
-bool PackageInstaller::PlatformUninstall(ApplicationData* app_data) {
-  std::string app_id(app_data->ID());
+bool PackageInstaller::PlatformUninstall(const std::string& app_id) {
   base::FilePath data_dir;
   CHECK(PathService::Get(xwalk::DIR_DATA_PATH, &data_dir));
 
@@ -640,14 +639,6 @@ bool PackageInstaller::Uninstall(const std::string& id) {
   }
 
   bool result = true;
-  scoped_refptr<ApplicationData> app_data =
-      storage_->GetApplicationData(app_id);
-  if (!app_data) {
-    LOG(ERROR) << "Failed to find application with id " << app_id
-               << " among the installed ones.";
-    result = false;
-  }
-
   if (!storage_->RemoveApplication(app_id)) {
     LOG(ERROR) << "Cannot uninstall application with id " << app_id
                << "; application is not installed.";
@@ -664,7 +655,7 @@ bool PackageInstaller::Uninstall(const std::string& id) {
     result = false;
   }
 
-  if (!PlatformUninstall(app_data))
+  if (!PlatformUninstall(app_id))
     result = false;
 
   return result;
index c9c9ce3..6b61729 100644 (file)
@@ -41,7 +41,7 @@ class PackageInstaller {
   std::string PrepareUninstallationID(const std::string& id);
 
   bool PlatformInstall(xwalk::application::ApplicationData* data);
-  bool PlatformUninstall(xwalk::application::ApplicationData* data);
+  bool PlatformUninstall(const std::string& app_id);
   bool PlatformUpdate(xwalk::application::ApplicationData* updated_data);
   bool PlatformReinstall(const base::FilePath& path);
 
index 53ae812..93d3839 100644 (file)
 %define _disable_nacl 0
 %endif
 
+# adjust compression algorithm to speed up RPMS creation
+# source RPM and debug RPMS are big and take too much time
+# when using standard (lzma) compression
+%define _source_payload w3.gzdio
+%define _binary_payload w3.gzdio
+
 Name:           crosswalk
-Version:        10.38.220.0
+Version:        10.38.222.0
 Release:        0
 Summary:        Chromium-based app runtime
 License:        (BSD-3-Clause and LGPL-2.1+)
@@ -279,10 +285,13 @@ ln -sf %{_libdir}/xwalk/xwalk_backend_wrapper.sh /etc/package-manager/backend/xp
 ln -sf %{_libdir}/xwalk/xwalk_backend_wrapper.sh /etc/package-manager/backend/wgt
 
 %preun
+if [ $1 -eq 0 ] ; then
+ # don't remove if we are upgrade the rpm package
 [ -L /etc/package-manager/backendlib/libxpk.so ] && rm /etc/package-manager/backendlib/libxpk.so
 [ -L /etc/package-manager/backendlib/libwgt.so ] && rm /etc/package-manager/backendlib/libwgt.so
 [ -L /etc/package-manager/backend/xpk ] && rm /etc/package-manager/backend/xpk
 [ -L /etc/package-manager/backend/wgt ] && rm /etc/package-manager/backend/wgt
+fi
 
 %files
 %manifest %{name}.manifest
index 9f9bb02..4a0c8d8 100644 (file)
@@ -767,13 +767,16 @@ public class XWalkViewInternal extends android.widget.FrameLayout {
     }
 
     /**
-     * Enables remote debugging and returns the URL at which the dev tools server is listening
-     * for commands. The allowedUid argument can be used to specify the uid of the process that is
-     * permitted to connect.
-     * TODO(yongsheng): how to enable this in XWalkPreferencesInternal?
+     * Enables remote debugging and returns the URL at which the dev tools
+     * server is listening for commands.
+     * The allowedUid argument can be used to specify the uid of the process
+     * that is permitted to connect.
+     * TODO(wang16): Hide or remove this API after new API for getting remote
+     *               debugging url available.
      *
      * @hide
      */
+    @XWalkAPI
     public String enableRemoteDebugging(int allowedUid) {
         if (mContent == null) return null;
         checkThreadSafety();
index 3107be3..65a37e7 100644 (file)
@@ -37,6 +37,7 @@ public class Messaging extends XWalkExtensionWithActivityStateListener {
 
     private MessagingSmsManager mSmsManager;
     private MessagingManager mMessagingManager;
+    private boolean isIntentFiltersRegistered = false;
 
     private void initMethodMap() {
         sMethodMap.put("msg_smsSend", new Command() {
@@ -103,7 +104,10 @@ public class Messaging extends XWalkExtensionWithActivityStateListener {
         super(NAME, jsApiContent, activity);
         mSmsManager = new MessagingSmsManager(activity, this);
         mMessagingManager = new MessagingManager(activity, this);
-        mSmsManager.registerIntentFilters();
+        if (!isIntentFiltersRegistered) {
+            mSmsManager.registerIntentFilters();
+            isIntentFiltersRegistered = true;
+        }
 
         initMethodMap();
     }
@@ -132,7 +136,12 @@ public class Messaging extends XWalkExtensionWithActivityStateListener {
 
     @Override
     public void onActivityStateChange(Activity activity, int newState) {
-        if (newState == ActivityState.STOPPED) mSmsManager.unregisterIntentFilters();
-        else if (newState == ActivityState.STARTED) mSmsManager.registerIntentFilters();
+        if (newState == ActivityState.STOPPED && isIntentFiltersRegistered) {
+            mSmsManager.unregisterIntentFilters();
+            isIntentFiltersRegistered = false;
+        } else if (newState == ActivityState.STARTED && !isIntentFiltersRegistered) {
+            mSmsManager.registerIntentFilters();
+            isIntentFiltersRegistered = true;
+        }
     }
 }
index d84d488..1a1b9b2 100644 (file)
@@ -174,8 +174,6 @@ class IoWatch : public base::MessagePumpLibevent::Watcher {
   void Delete() {
     if (dead_)
       return;
-    else
-      dead_ = true;
 
     content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
         base::Bind(&IoWatch::StopWatch,
@@ -205,6 +203,8 @@ class IoWatch : public base::MessagePumpLibevent::Watcher {
   void StopWatch() {
     if (dead_)
       return;
+    dead_ = true;
+
     w_.StopWatchingFileDescriptor();
 
     content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,