Merge remote-tracking branch 'github/master' into tizen
authorTizenAPI-Bot <tizenapi@samsung.com>
Wed, 12 Dec 2018 15:05:57 +0000 (15:05 +0000)
committerTizenAPI-Bot <tizenapi@samsung.com>
Wed, 12 Dec 2018 15:05:57 +0000 (15:05 +0000)
build.sh
src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcManager.cs
src/Tizen.Sensor/Tizen.Sensor/SensorEnumerations.cs
src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/InputMethodEditor.cs

index e7129d0..609f150 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -16,6 +16,7 @@ usage() {
   echo "    full               Build all modules in src/ directory"
   echo "    dummy              Generate dummy assemblies of all modules"
   echo "    pack [version]     Make a NuGet package with build artifacts"
+  echo "    install [target]   Install assemblies to the target device"
   echo "    clean              Clean all artifacts"
 }
 
@@ -54,6 +55,43 @@ cmd_pack() {
   $RUN_BUILD /t:pack /p:Version=$VERSION
 }
 
+cmd_install() {
+  DEVICE_ID=$1
+
+  RUNTIME_ASSEMBLIES="$OUTDIR/bin/public/*.dll $OUTDIR/bin/internal/*.dll"
+  TARGET_ASSEMBLY_PATH="/usr/share/dotnet.tizen/framework"
+
+  device_cnt=$(sdb devices | grep -v "List" | wc -l)
+  if [ $device_cnt -eq 0 ]; then
+    echo "No connected devices"
+    exit 1
+  fi
+
+  if [ $device_cnt -gt 1 ] && [ -z "$DEVICE_ID" ]; then
+    echo "Multiple devices are connected. Specify the device. (ex: ./build.sh install [device-id])"
+    sdb devices
+    exit 1
+  fi
+
+  SDB_OPTIONS=""
+  if [ -n "$DEVICE_ID" ]; then
+    SDB_OPTIONS="-s $DEVICE_ID"
+  fi
+
+  sdb $SDB_OPTIONS root on
+  sdb $SDB_OPTIONS shell mount -o remount,rw /
+  sdb $SDB_OPTIONS push $RUNTIME_ASSEMBLIES $TARGET_ASSEMBLY_PATH
+
+  nifile_cnt=$(sdb $SDB_OPTIONS shell find $TARGET_ASSEMBLY_PATH -name '*.ni.dll' | wc -l)
+  if [ $nifile_cnt -gt 0 ]; then
+    sdb $SDB_OPTIONS shell "rm -f $TARGET_ASSEMBLY_PATH/*.ni.dll"
+    sdb $SDB_OPTIONS shell nitool --system
+    sdb $SDB_OPTIONS shell nitool --regen-all-app
+  fi
+
+  sdb $SDB_OPTIONS shell chsmack -a '_' $TARGET_ASSEMBLY_PATH/*
+}
+
 cmd_clean() {
   $RUN_BUILD /t:clean
 }
@@ -64,6 +102,7 @@ case "$cmd" in
   full |--full |-f) cmd_full_build $@ ;;
   dummy|--dummy|-d) cmd_dummy_build $@ ;;
   pack |--pack |-p) cmd_pack $@ ;;
+  install |--install |-i) cmd_install $@ ;;
   clean|--clean|-c) cmd_clean $@ ;;
   *) usage ;;
 esac
index 41fe3cf..2331ac6 100755 (executable)
@@ -149,7 +149,7 @@ namespace Tizen.Network.Nfc
                 bool isCeSupported = false;
 
                 Information.TryGetValue("http://tizen.org/feature/network.nfc", out isNfcSupported);
-                Information.TryGetValue("http://tizen.org/feature/network.nfc.cardemulation", out isCeSupported);
+                Information.TryGetValue("http://tizen.org/feature/network.nfc.card_emulation", out isCeSupported);
 
                 if (!isNfcSupported || !isCeSupported)
                 {
@@ -171,7 +171,7 @@ namespace Tizen.Network.Nfc
                 bool isCeSupported = false;
 
                 Information.TryGetValue("http://tizen.org/feature/network.nfc", out isNfcSupported);
-                Information.TryGetValue("http://tizen.org/feature/network.nfc.cardemulation", out isCeSupported);
+                Information.TryGetValue("http://tizen.org/feature/network.nfc.card_emulation", out isCeSupported);
 
                 if (!isNfcSupported || !isCeSupported)
                 {
@@ -330,7 +330,7 @@ namespace Tizen.Network.Nfc
             bool isCeSupported = false;
 
             Information.TryGetValue("http://tizen.org/feature/network.nfc", out isNfcSupported);
-            Information.TryGetValue("http://tizen.org/feature/network.nfc.cardemulation", out isCeSupported);
+            Information.TryGetValue("http://tizen.org/feature/network.nfc.card_emulation", out isCeSupported);
 
             if (!isNfcSupported || !isCeSupported)
             {
index de65873..37e0b24 100755 (executable)
@@ -145,7 +145,7 @@ namespace Tizen.Sensor
         /// <summary>
         /// The axis orientation.
         /// </summary>
-        AxisOrientation,
+        AxisOrientation = 1,
 
         /// <summary>
         /// The pause policy.
@@ -187,28 +187,28 @@ namespace Tizen.Sensor
     }
 
     /// <summary>
-    /// The Sensor Option Enum definition for sensor option values.
+    /// The Sensor Option Enum definition for pause policies of sensor.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public enum SensorPausePolicy
     {
         /// <summary>
-        /// Does not receive data when the LCD is off and in the power save mode.
+        /// Receives data when the LCD is off and in the power save mode.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         None,
         /// <summary>
-        /// Receives data when the LCD is off.
+        /// Does not receive data when the LCD is off.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         DisplayOff,
         /// <summary>
-        /// Receives data in the power save mode.
+        /// Does not receive data in the power save mode.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         PowerSaveMode,
         /// <summary>
-        /// Receives data when the LCD is off and in the power save mode.
+        /// Does not receive data when the LCD is off and in the power save mode.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         All
index 4e967ac..39708ec 100755 (executable)
@@ -1583,9 +1583,7 @@ namespace Tizen.Uix.InputMethod
             {
                 string langauage;
                 _languageRequestedDelegate(out langauage);
-                char[] languageArray = langauage.ToCharArray();
-                langCode = new IntPtr();
-                Marshal.Copy(languageArray, 0, langCode, languageArray.Length);
+                langCode = (IntPtr)Marshal.StringToHGlobalAnsi(langauage);
             };
             ErrorCode error = ImeEventSetLanguageRequestedCallbackCb(_imeLanguageRequestedDelegate, IntPtr.Zero);
             if (error != ErrorCode.None)
@@ -1631,7 +1629,7 @@ namespace Tizen.Uix.InputMethod
             {
                 byte[] dataArr;
                 _imDataRequestedDelegate(out dataArr);
-                data = new IntPtr();
+                data = Marshal.AllocHGlobal(dataArr.Length);
                 Marshal.Copy(dataArr, 0, data, dataArr.Length);
                 dataLength = (uint)dataArr.Length;
             };