Merge branch 'master' of git://codeaurora.org/platform/vendor/qcom-opensource/bluetooth into cm-10.2
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 2452b54..e68210f 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -50,6 +50,7 @@
     <uses-permission android:name="com.android.email.permission.READ_ATTACHMENT"/>
     <application>
         <uses-library android:name="javax.obex" />
+        <!--
         <service
             android:name = ".btcservice.BTCService">
         </service>
@@ -69,7 +70,8 @@
                 <action android:name="android.bluetooth.input.profile.action.CONNECTION_STATE_CHANGED" />
             </intent-filter>
         </receiver>
- <activity android:name=".map.BluetoothMasActivity"
+        -->
+        <activity android:name=".map.BluetoothMasActivity"
             android:process="@string/process"
             android:excludeFromRecents="true"
             android:enabled="@bool/profile_supported_map"
@@ -117,6 +119,7 @@
                 <action android:name="android.bluetooth.device.action.ACL_DISCONNECTED"/>
             </intent-filter>
         </receiver>
+        <!--
         <activity android:name=".sap.BluetoothSapPermissionActivity"
             android:process="@string/process"
             android:excludeFromRecents="true"
@@ -144,5 +147,6 @@
                 <action android:name="android.bluetooth.device.action.ACL_DISCONNECTED"/>
             </intent-filter>
         </receiver>
+        -->
     </application>
 </manifest>
diff --git a/src/org/codeaurora/bluetooth/map/BluetoothMasObexServer.java b/src/org/codeaurora/bluetooth/map/BluetoothMasObexServer.java
index c2accc3..bcc71b1 100644
--- a/src/org/codeaurora/bluetooth/map/BluetoothMasObexServer.java
+++ b/src/org/codeaurora/bluetooth/map/BluetoothMasObexServer.java
@@ -188,15 +188,17 @@
 
         private final int getUint16BigEndian(byte b1, byte b2) {
             int retVal;
-            retVal = (int) ((0x0000FF00 & (int) (b1 << 0x8)) | (0x000000FF & (int) b2));
+            retVal = (((int) b1 & 0xFF) << 8) |
+                      ((int) b2 & 0xFF);
             return retVal;
         }
 
         private final long getUint32BigEndian(byte b1, byte b2, byte b3, byte b4) {
             long retVal;
-            retVal = (long) ((0xFF000000 & (long) (b1 << 0x24))
-                    | (0x00FF0000 & (long) (b2 << 0x16))
-                    | (0x0000FF00 & (long) (b3 << 0x8)) | (0x000000FF & (long) b4));
+            retVal = (((long) b1 & 0xFF) << 24) |
+                     (((long) b2 & 0xFF) << 16) |
+                     (((long) b3 & 0xFF) << 8) |
+                      ((long) b4 & 0xFF);
             return retVal;
         }