GATT: Add facade for opportunistic client API
am: 8b1e36767d

Change-Id: If70f54b9ed1c32f61de94b580fc3ccff67dddc1a
diff --git a/Common/src/com/googlecode/android_scripting/facade/SettingsFacade.java b/Common/src/com/googlecode/android_scripting/facade/SettingsFacade.java
index 5f42cc5..6f152ba 100644
--- a/Common/src/com/googlecode/android_scripting/facade/SettingsFacade.java
+++ b/Common/src/com/googlecode/android_scripting/facade/SettingsFacade.java
@@ -259,7 +259,7 @@
         mLockPatternUtils.setLockScreenDisabled(true, UserHandle.myUserId());
         mLockPatternUtils.setCredentialRequiredToDecrypt(false);
         mLockPatternUtils.clearEncryptionPassword();
-        mLockPatternUtils.clearLock(UserHandle.myUserId());
+        mLockPatternUtils.clearLock(null, UserHandle.myUserId());
         mLockPatternUtils.setLockScreenDisabled(true, UserHandle.myUserId());
     }
 
diff --git a/Common/src/com/googlecode/android_scripting/facade/wifi/WifiAwareManagerFacade.java b/Common/src/com/googlecode/android_scripting/facade/wifi/WifiAwareManagerFacade.java
index a76159a..ff60bd5 100644
--- a/Common/src/com/googlecode/android_scripting/facade/wifi/WifiAwareManagerFacade.java
+++ b/Common/src/com/googlecode/android_scripting/facade/wifi/WifiAwareManagerFacade.java
@@ -298,9 +298,6 @@
         if (j.has("TtlSec")) {
             builder.setTtlSec(j.getInt("TtlSec"));
         }
-        if (j.has("MatchStyle")) {
-            builder.setMatchStyle(j.getInt("MatchStyle"));
-        }
         if (j.has("EnableTerminateNotification")) {
             builder.setTerminateNotificationEnabled(j.getBoolean("TerminateNotificationEnabled"));
         }
@@ -338,7 +335,7 @@
     public void wifiAwareDestroyAll() {
         synchronized (mLock) {
             for (int i = 0; i < mSessions.size(); ++i) {
-                mSessions.valueAt(i).destroy();
+                mSessions.valueAt(i).close();
             }
             mSessions.clear();
 
@@ -376,7 +373,7 @@
                     "Calling WifiAwareDisconnect before session (client ID " + clientId
                             + ") is ready/or already disconnected");
         }
-        session.destroy();
+        session.close();
     }
 
     @Rpc(description = "Publish.")
@@ -430,7 +427,7 @@
                         "Calling WifiAwareTerminateSession before session (session ID "
                                 + sessionId + ") is ready");
             }
-            session.destroy();
+            session.close();
             mDiscoverySessions.remove(sessionId);
         }
     }
diff --git a/Common/src/com/googlecode/android_scripting/facade/wifi/WifiManagerFacade.java b/Common/src/com/googlecode/android_scripting/facade/wifi/WifiManagerFacade.java
index 9120df2..66c1742 100755
--- a/Common/src/com/googlecode/android_scripting/facade/wifi/WifiManagerFacade.java
+++ b/Common/src/com/googlecode/android_scripting/facade/wifi/WifiManagerFacade.java
@@ -860,8 +860,7 @@
         if (ssid != null) {
             config.SSID = ssid.substring(1, ssid.length() - 1);
         }
-        String pwd = config.preSharedKey;
-        if (pwd != null) {
+        String pwd = config.preSharedKey;                                                                      if (pwd != null) {
             config.preSharedKey = pwd.substring(1, pwd.length() - 1);
         }
         return config;