Skip to content

Commit

Permalink
Release 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement authored and Clement committed Oct 5, 2016
1 parent 1b02959 commit dd2be79
Show file tree
Hide file tree
Showing 1,874 changed files with 73,613 additions and 93,455 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#Wed Oct 05 17:39:23 MYT 2016
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions MOLPayXDKExample/platforms/android/CordovaLib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.android.tools.build:gradle:2.1.0'
}

}

apply plugin: 'android-library'
apply plugin: 'com.android.library'

ext {
apply from: 'cordova.gradle'
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
incremental task execution
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main"><source path="/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/assets"/></dataSet><dataSet config="debug"><source path="/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/debug/assets"/></dataSet></merger>
<merger version="3"><dataSet config="main"><source path="/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/assets"/><source path="/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/build/generated/assets/shaders/debug"/></dataSet><dataSet config="debug"><source path="/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/debug/assets"/></dataSet></merger>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main"><source path="/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/main/shaders"/></dataSet><dataSet config="debug"><source path="/Volumes/DATA/Dev/molpay-mobile-xdk/public/molpay-mobile-xdk-cordova/MOLPayXDKExample/platforms/android/CordovaLib/src/debug/shaders"/></dataSet></merger>
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ String doFindLatestInstalledBuildTools(String minBuildToolsVersion) {
highestBuildToolsVersion
} else {
throw new RuntimeException(
"No installed build tools found. Please install the Android build tools version " +
"No installed build tools found. Install the Android build tools version " +
minBuildToolsVersion + " or higher.")
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
package org.apache.cordova;

import android.util.Pair;
import android.util.SparseArray;

/**
* Provides a collection that maps unique request codes to CordovaPlugins and Integers.
* Used to ensure that when plugins make requests for runtime permissions, those requests do not
* collide with requests from other plugins that use the same request code value.
*/
public class CallbackMap {
private int currentCallbackId = 0;
private SparseArray<Pair<CordovaPlugin, Integer>> callbacks;

public CallbackMap() {
this.callbacks = new SparseArray<Pair<CordovaPlugin, Integer>>();
}

/**
* Stores a CordovaPlugin and request code and returns a new unique request code to use
* in a permission request.
*
* @param receiver The plugin that is making the request
* @param requestCode The original request code used by the plugin
* @return A unique request code that can be used to retrieve this callback
* with getAndRemoveCallback()
*/
public synchronized int registerCallback(CordovaPlugin receiver, int requestCode) {
int mappedId = this.currentCallbackId++;
callbacks.put(mappedId, new Pair<CordovaPlugin, Integer>(receiver, requestCode));
return mappedId;
}

/**
* Retrieves and removes a callback stored in the map using the mapped request code
* obtained from registerCallback()
*
* @param mappedId The request code obtained from registerCallback()
* @return The CordovaPlugin and orignal request code that correspond to the
* given mappedCode
*/
public synchronized Pair<CordovaPlugin, Integer> getAndRemoveCallback(int mappedId) {
Pair<CordovaPlugin, Integer> callback = callbacks.get(mappedId);
callbacks.remove(mappedId);
return callback;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Licensed to the Apache Software Foundation (ASF) under one
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.util.Pair;

import org.json.JSONException;
import org.json.JSONObject;
Expand All @@ -42,8 +43,8 @@ public class CordovaInterfaceImpl implements CordovaInterface {
protected PluginManager pluginManager;

protected ActivityResultHolder savedResult;
protected CallbackMap permissionResultCallbacks;
protected CordovaPlugin activityResultCallback;
protected CordovaPlugin permissionResultCallback;
protected String initCallbackService;
protected int activityResultRequestCode;
protected boolean activityWasDestroyed = false;
Expand All @@ -56,6 +57,7 @@ public CordovaInterfaceImpl(Activity activity) {
public CordovaInterfaceImpl(Activity activity, ExecutorService threadPool) {
this.activity = activity;
this.threadPool = threadPool;
this.permissionResultCallbacks = new CallbackMap();
}

@Override
Expand Down Expand Up @@ -208,24 +210,21 @@ public ActivityResultHolder(int requestCode, int resultCode, Intent intent) {
*/
public void onRequestPermissionResult(int requestCode, String[] permissions,
int[] grantResults) throws JSONException {
if(permissionResultCallback != null)
{
permissionResultCallback.onRequestPermissionResult(requestCode, permissions, grantResults);
permissionResultCallback = null;
Pair<CordovaPlugin, Integer> callback = permissionResultCallbacks.getAndRemoveCallback(requestCode);
if(callback != null) {
callback.first.onRequestPermissionResult(callback.second, permissions, grantResults);
}
}

public void requestPermission(CordovaPlugin plugin, int requestCode, String permission) {
permissionResultCallback = plugin;
String[] permissions = new String [1];
permissions[0] = permission;
getActivity().requestPermissions(permissions, requestCode);
requestPermissions(plugin, requestCode, permissions);
}

public void requestPermissions(CordovaPlugin plugin, int requestCode, String [] permissions)
{
permissionResultCallback = plugin;
getActivity().requestPermissions(permissions, requestCode);
public void requestPermissions(CordovaPlugin plugin, int requestCode, String [] permissions) {
int mappedRequestCode = permissionResultCallbacks.registerCallback(plugin, requestCode);
getActivity().requestPermissions(permissions, mappedRequestCode);
}

public boolean hasPermission(String permission)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Licensed to the Apache Software Foundation (ASF) under one
* are not expected to implement it.
*/
public interface CordovaWebView {
public static final String CORDOVA_VERSION = "5.1.1";
public static final String CORDOVA_VERSION = "5.2.2";

void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public void loadUrlIntoView(final String url, boolean recreatePlugins) {
if (recreatePlugins) {
// Don't re-initialize on first load.
if (loadedUrl != null) {
appPlugin = null;
pluginManager.init();
}
loadedUrl = url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public SystemCookieManager(WebView webview) {
webView = webview;
cookieManager = CookieManager.getInstance();

//REALLY? Nobody has seen this UNTIL NOW?
cookieManager.setAcceptFileSchemeCookies(true);

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
cookieManager.setAcceptThirdPartyCookies(webView, true);
}
Expand Down
27 changes: 14 additions & 13 deletions MOLPayXDKExample/platforms/android/android.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,58 +77,59 @@
"dependent_plugins": {},
"modules": [
{
"file": "plugins/cordova-plugin-whitelist/whitelist.js",
"id": "cordova-plugin-whitelist.whitelist",
"runs": true
},
{
"file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js",
"id": "cordova-plugin-inappbrowser.inappbrowser",
"file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js",
"pluginId": "cordova-plugin-inappbrowser",
"clobbers": [
"cordova.InAppBrowser.open",
"window.open"
]
},
{
"file": "plugins/cordova-save-image-gallery/www/saveImageGallery.js",
"id": "cordova-save-image-gallery.saveImageGallery",
"file": "plugins/cordova-save-image-gallery/www/saveImageGallery.js",
"pluginId": "cordova-save-image-gallery",
"clobbers": [
"cordova.saveImageGallery"
]
},
{
"file": "plugins/cordova-plugin-x-toast/www/Toast.js",
"id": "cordova-plugin-x-toast.Toast",
"file": "plugins/cordova-plugin-x-toast/www/Toast.js",
"pluginId": "cordova-plugin-x-toast",
"clobbers": [
"window.plugins.toast"
]
},
{
"id": "cordova-plugin-x-toast.tests",
"file": "plugins/cordova-plugin-x-toast/test/tests.js",
"id": "cordova-plugin-x-toast.tests"
"pluginId": "cordova-plugin-x-toast"
},
{
"file": "plugins/cordova-plugin-android-permissions/www/permissions.js",
"id": "cordova-plugin-android-permissions.Permissions",
"file": "plugins/cordova-plugin-android-permissions/www/permissions.js",
"pluginId": "cordova-plugin-android-permissions",
"clobbers": [
"cordova.plugins.permissions"
]
},
{
"file": "plugins/molpay-mobile-xdk-cordova/molpay.js",
"id": "molpay-mobile-xdk-cordova.MOLPay",
"file": "plugins/molpay-mobile-xdk-cordova/molpay.js",
"pluginId": "molpay-mobile-xdk-cordova",
"clobbers": [
"molpay"
]
}
],
"plugin_metadata": {
"cordova-plugin-whitelist": "1.2.1",
"cordova-plugin-whitelist": "1.3.0",
"cordova-plugin-inappbrowser": "1.5.0",
"cordova-plugin-privacyscreen": "0.3.1",
"cordova-save-image-gallery": "0.0.26",
"cordova-plugin-x-toast": "2.5.2",
"cordova-plugin-android-permissions": "0.10.0",
"molpay-mobile-xdk-cordova": "3.1.0"
"molpay-mobile-xdk-cordova": "3.2.0"
}
}
6 changes: 3 additions & 3 deletions MOLPayXDKExample/platforms/android/assets/www/cordova.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Platform: android
// c517ca811b4948b630e0b74dbae6c9637939da24
// d403ce434788ffe1937711d6ebcbcc837fcbcb14
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
Expand All @@ -19,7 +19,7 @@
under the License.
*/
;(function() {
var PLATFORM_VERSION_BUILD_LABEL = '5.1.1';
var PLATFORM_VERSION_BUILD_LABEL = '5.2.2';
// file: src/scripts/require.js

/*jshint -W079 */
Expand Down Expand Up @@ -2083,7 +2083,7 @@ utils.clone = function(obj) {

retVal = {};
for(i in obj){
if(!(i in retVal) || retVal[i] != obj[i]) {
if((!(i in retVal) || retVal[i] != obj[i]) && typeof obj[i] != 'undefined') {
retVal[i] = utils.clone(obj[i]);
}
}
Expand Down
27 changes: 14 additions & 13 deletions MOLPayXDKExample/platforms/android/assets/www/cordova_plugins.js
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
cordova.define('cordova/plugin_list', function(require, exports, module) {
module.exports = [
{
"file": "plugins/cordova-plugin-whitelist/whitelist.js",
"id": "cordova-plugin-whitelist.whitelist",
"runs": true
},
{
"file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js",
"id": "cordova-plugin-inappbrowser.inappbrowser",
"file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js",
"pluginId": "cordova-plugin-inappbrowser",
"clobbers": [
"cordova.InAppBrowser.open",
"window.open"
]
},
{
"file": "plugins/cordova-save-image-gallery/www/saveImageGallery.js",
"id": "cordova-save-image-gallery.saveImageGallery",
"file": "plugins/cordova-save-image-gallery/www/saveImageGallery.js",
"pluginId": "cordova-save-image-gallery",
"clobbers": [
"cordova.saveImageGallery"
]
},
{
"file": "plugins/cordova-plugin-x-toast/www/Toast.js",
"id": "cordova-plugin-x-toast.Toast",
"file": "plugins/cordova-plugin-x-toast/www/Toast.js",
"pluginId": "cordova-plugin-x-toast",
"clobbers": [
"window.plugins.toast"
]
},
{
"id": "cordova-plugin-x-toast.tests",
"file": "plugins/cordova-plugin-x-toast/test/tests.js",
"id": "cordova-plugin-x-toast.tests"
"pluginId": "cordova-plugin-x-toast"
},
{
"file": "plugins/cordova-plugin-android-permissions/www/permissions.js",
"id": "cordova-plugin-android-permissions.Permissions",
"file": "plugins/cordova-plugin-android-permissions/www/permissions.js",
"pluginId": "cordova-plugin-android-permissions",
"clobbers": [
"cordova.plugins.permissions"
]
},
{
"file": "plugins/molpay-mobile-xdk-cordova/molpay.js",
"id": "molpay-mobile-xdk-cordova.MOLPay",
"file": "plugins/molpay-mobile-xdk-cordova/molpay.js",
"pluginId": "molpay-mobile-xdk-cordova",
"clobbers": [
"molpay"
]
Expand All @@ -49,13 +50,13 @@ module.exports = [
module.exports.metadata =
// TOP OF METADATA
{
"cordova-plugin-whitelist": "1.2.1",
"cordova-plugin-whitelist": "1.3.0",
"cordova-plugin-inappbrowser": "1.5.0",
"cordova-plugin-privacyscreen": "0.3.1",
"cordova-save-image-gallery": "0.0.26",
"cordova-plugin-x-toast": "2.5.2",
"cordova-plugin-android-permissions": "0.10.0",
"molpay-mobile-xdk-cordova": "3.1.0"
"molpay-mobile-xdk-cordova": "3.2.0"
};
// BOTTOM OF METADATA
});
2 changes: 1 addition & 1 deletion MOLPayXDKExample/platforms/android/assets/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>
<div class="app">
<div style="background-color: #72529b; text-align: right; position: fixed; float: left; width: 100%; height: 44px">
<div style="background-color: #72529b; text-align: right; position: fixed; float: left; width: 100%; height: 44px; z-index: 10">
<button style="border: 0px; color: #FFFFFF; background-color: transparent; margin: 15px" onclick="window.molpay.closeMolpay()">Close</button>
</div>
<div id="molpay" class="molpay" style="position: absolute; top: 44px; bottom: 0px"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <meta name="description" content=""> <!-- <meta name="viewport" content="width=device-width"> --> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> <meta name="format-detection" content="telephone=no"> <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <link rel="stylesheet" href="styles/vendor.34eb91d2.css"> <link rel="stylesheet" href="styles/main.d7e0b867.css"> </head> <body ng-app="molpayXsdkApp"> <div class="header"> </div> <div id="app-body" class="app-body container-fluid"> <div class="row"> <div class="hidden-xs col-sm-2 col-md-3 col-lg-4"></div> <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4" ng-view=""></div> <div class="hidden-xs col-sm-2 col-md-3 col-lg-4"></div> </div> </div> <div ng-show="isStarting || isLoading" class="loading text-center vertical-center"> <p>Loading.</p> <p>Please wait.</p> </div> <div class="footer"> </div> <div ng-show="isLoading" class="loading text-center vertical-center"> <div class="loadingbackground"></div> <i class="fa fa-spinner fa-spin fa-3x"></i> <div class="loading-text">Loading...</div> </div> <script src="scripts/vendor.8ef18f5b.js"></script> <script src="scripts/scripts.bece1f14.js"></script> </body> </html>
<!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <meta name="description" content=""> <!-- <meta name="viewport" content="width=device-width"> --> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> <meta name="format-detection" content="telephone=no"> <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <link rel="stylesheet" href="styles/vendor.34eb91d2.css"> <link rel="stylesheet" href="styles/main.d7e0b867.css"> </head> <body ng-app="molpayXsdkApp"> <div class="header"> </div> <div id="app-body" class="app-body container-fluid"> <div class="row"> <div class="hidden-xs col-sm-2 col-md-3 col-lg-4"></div> <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4" ng-view=""></div> <div class="hidden-xs col-sm-2 col-md-3 col-lg-4"></div> </div> </div> <div ng-show="isStarting || isLoading" class="text-center"> <br> <p>Preparing...</p> <p>Please wait.</p> </div> <div class="footer"> </div> <div ng-show="isLoading" class="loading text-center vertical-center"> <div class="loadingbackground"></div> <i class="fa fa-spinner fa-spin fa-3x"></i> <div class="loading-text">Loading...</div> </div> <script src="scripts/vendor.8ef18f5b.js"></script> <script src="scripts/scripts.4f7e4095.js"></script> </body> </html>

Large diffs are not rendered by default.

This file was deleted.

Loading

0 comments on commit dd2be79

Please sign in to comment.