Skip to content

Commit

Permalink
Merging dev into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wmathurin committed Oct 4, 2022
2 parents 91fd68f + 4f06bbc commit 666092e
Show file tree
Hide file tree
Showing 59 changed files with 1,718 additions and 1,327 deletions.
591 changes: 133 additions & 458 deletions .circleci/config.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This pulls submodule dependencies from github.
Introduction
==

### What's New in 10.1.1
### What's New in 10.2.0
See [release notes](https://github.com/forcedotcom/SalesforceMobileSDK-Android/releases).

### Native Applications
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {

allprojects {
group = 'com.salesforce.mobilesdk'
version = '10.1.1'
version = '10.2.0'
repositories {
mavenLocal()
maven {
Expand Down
23 changes: 22 additions & 1 deletion external/cordova/cordova.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
under the License.
*/
;(function() {
var PLATFORM_VERSION_BUILD_LABEL = '10.1.0';
var PLATFORM_VERSION_BUILD_LABEL = '11.0.0';
// file: src/scripts/require.js
var require;
var define;
Expand Down Expand Up @@ -1426,6 +1426,9 @@ module.exports = {
// TODO: Extract this as a proper plugin.
modulemapper.clobbers('cordova/plugin/android/app', 'navigator.app');

// Core Splash Screen
modulemapper.clobbers('cordova/plugin/android/splashscreen', 'navigator.splashscreen');

var APP_PLUGIN_NAME = Number(cordova.platformVersion.split('.')[0]) >= 4 ? 'CoreAndroid' : 'App';

// Inject a listener for the backbutton on the document.
Expand Down Expand Up @@ -1606,6 +1609,24 @@ module.exports = {

});

// file: ../../cordova-js-src/plugin/android/splashscreen.js
define("cordova/plugin/android/splashscreen", function(require, exports, module) {

var exec = require('cordova/exec');

var splashscreen = {
show: function () {
console.log('"navigator.splashscreen.show()" is unsupported on Android.');
},
hide: function () {
exec(null, null, 'CordovaSplashScreenPlugin', 'hide', []);
}
};

module.exports = splashscreen;

});

// file: src/common/pluginloader.js
define("cordova/pluginloader", function(require, exports, module) {

Expand Down
2 changes: 1 addition & 1 deletion external/shared
Submodule shared updated 35 files
+1 −1 gen/cordova_plugins.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.mobilesync.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.network.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.oauth.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.sdkinfo.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.sfaccountmanager.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.smartstore.client.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.plugin.smartstore.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.util.bootstrap.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.util.event.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.util.exec.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.util.logger.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.util.promiser.js
+1 −1 gen/plugins/com.salesforce/com.salesforce.util.push.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.mobilesync.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.network.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.oauth.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.sdkinfo.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.sfaccountmanager.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.smartstore.client.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.plugin.smartstore.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.util.bootstrap.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.util.event.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.util.exec.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.util.logger.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.util.promiser.js
+1 −1 gen/plugins_with_define/com.salesforce/com.salesforce.util.push.js
+1 −1 libs/cordova.force.js
+1 −1 package.json
+1 −1 test/MockSDKInfo.js
+3 −3 test/SFMobileSyncTestSuite.js
+1 −1 test/SFSDKInfoTestSuite.js
+1 −1 test/SFTestRunnerPlugin.js
+1 −1 tools/bower.json
+1 −1 tools/package.json
2 changes: 1 addition & 1 deletion hybrid/HybridSampleApps/AccountEditor/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<activity android:label="@string/app_name"
android:name="com.salesforce.androidsdk.phonegap.ui.SalesforceDroidGapActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:theme="@style/SalesforceSDK_SplashScreen"
android:exported="true">

<intent-filter >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<activity android:label="@string/app_name"
android:name="com.salesforce.androidsdk.phonegap.ui.SalesforceDroidGapActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:theme="@style/SalesforceSDK_SplashScreen"
android:exported="true">

<intent-filter >
Expand Down
2 changes: 1 addition & 1 deletion hybrid/HybridSampleApps/NoteSync/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<activity android:label="@string/app_name"
android:name="com.salesforce.androidsdk.phonegap.ui.SalesforceDroidGapActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:theme="@style/SalesforceSDK_SplashScreen"
android:exported="true">

<intent-filter >
Expand Down
4 changes: 2 additions & 2 deletions libs/MobileSync/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.salesforce.androidsdk.mobilesync"
android:versionCode="78"
android:versionName="10.1.1">
android:versionCode="79"
android:versionName="10.2.0.dev">

<application />

Expand Down
2 changes: 1 addition & 1 deletion libs/MobileSync/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ android {

ext {
PUBLISH_GROUP_ID = 'com.salesforce.mobilesdk'
PUBLISH_VERSION = '10.1.1'
PUBLISH_VERSION = '10.2.0'
PUBLISH_ARTIFACT_ID = 'MobileSync'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ private static void init(Context context, Class<? extends Activity> mainActivity

// Upgrade to the latest version.
MobileSyncUpgradeManager.getInstance().upgrade();

initInternal(context);
EventsObservable.get().notifyEvent(EventType.AppCreateComplete);
EventsObservable.get().notifyEvent(EventType.AppCreateComplete);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
*/
package com.salesforce.androidsdk.mobilesync.app;

import com.salesforce.androidsdk.app.SdkVersion;
import com.salesforce.androidsdk.mobilesync.util.MobileSyncLogger;
import com.salesforce.androidsdk.smartstore.app.SmartStoreUpgradeManager;

Expand Down Expand Up @@ -66,21 +67,15 @@ public void upgrade() {
* Upgrades mobile sync data from existing client version to the current version.
*/
protected synchronized void upgradeSObject() {
final String installedVersion = getInstalledSobjectVersion();
if (installedVersion.equals(MobileSyncSDKManager.SDK_VERSION)) {
final String installedVersionStr = getInstalledSobjectVersion();
if (installedVersionStr.equals(MobileSyncSDKManager.SDK_VERSION)) {
return;
}

// Update shared preference file to reflect the latest version.
writeCurVersion(MOBILE_SYNC_KEY, MobileSyncSDKManager.SDK_VERSION);

// If the installed version < v8.2.0, we need to delete the old layout SmartStore file.
try {
final String majorVersionNum = installedVersion.substring(0, 3);
double installedVerDouble = Double.parseDouble(majorVersionNum);
} catch (Exception e) {
MobileSyncLogger.e(TAG, "Failed to parse installed version.");
}
// Compare SDK versions using SdkVersion class and add upgrade steps here as needed.
}

/**
Expand Down
4 changes: 2 additions & 2 deletions libs/SalesforceAnalytics/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.salesforce.androidsdk.analytics"
android:versionCode="78"
android:versionName="10.1.1">
android:versionCode="79"
android:versionName="10.2.0.dev">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
2 changes: 1 addition & 1 deletion libs/SalesforceAnalytics/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ android {

ext {
PUBLISH_GROUP_ID = 'com.salesforce.mobilesdk'
PUBLISH_VERSION = '10.1.1'
PUBLISH_VERSION = '10.2.0'
PUBLISH_ARTIFACT_ID = 'SalesforceAnalytics'
}

Expand Down
4 changes: 2 additions & 2 deletions libs/SalesforceHybrid/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.salesforce.androidsdk.hybrid"
android:versionCode="78"
android:versionName="10.1.1">
android:versionCode="79"
android:versionName="10.2.0.dev">

<application />
</manifest>
5 changes: 3 additions & 2 deletions libs/SalesforceHybrid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ apply plugin: 'com.android.library'

dependencies {
api project(':libs:MobileSync')
api 'org.apache.cordova:framework:10.1.0'
api 'org.apache.cordova:framework:11.0.0'
api 'androidx.appcompat:appcompat:1.4.0'
api 'androidx.appcompat:appcompat-resources:1.4.0'
api 'androidx.webkit:webkit:1.4.0'
api 'androidx.core:core-splashscreen:1.0.0-rc01'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test:rules:1.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
Expand Down Expand Up @@ -67,7 +68,7 @@ android {

ext {
PUBLISH_GROUP_ID = 'com.salesforce.mobilesdk'
PUBLISH_VERSION = '10.1.1'
PUBLISH_VERSION = '10.2.0'
PUBLISH_ARTIFACT_ID = 'SalesforceHybrid'
}

Expand Down
6 changes: 6 additions & 0 deletions libs/SalesforceHybrid/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<style name="SalesforceSDK_SplashScreen" parent="Theme.SplashScreen.IconBackground">
<item name="postSplashScreenTheme">@style/Theme.AppCompat.NoActionBar</item>
</style>
</resources>
3 changes: 2 additions & 1 deletion libs/SalesforceHybrid/res/xml/config.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
id = "com.salesforce.androidsdk"
version = "10.1.1">
version = "10.2.0">

<content src="index.html" />

Expand All @@ -24,6 +24,7 @@
<preference name="loglevel" level="DEBUG"/>
<preference name="classicRender" value="true" />
<preference name="AndroidXEnabled" value="true" />
<preference name="AndroidInsecureFileModeEnabled" value="true" />

<feature name="App"><param name="android-package" value="org.apache.cordova.App"/></feature>
<feature name="com.salesforce.oauth"><param name="android-package" value="com.salesforce.androidsdk.phonegap.plugin.SalesforceOAuthPlugin"/></feature>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ private static void init(Context context, Class<? extends Activity> mainActivity

// Upgrade to the latest version.
SalesforceHybridUpgradeManager.getInstance().upgrade();
initInternal(context);
initInternal(context);

EventsObservable.get().notifyEvent(EventType.AppCreateComplete);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ public SalesforceWebViewClient(SalesforceWebViewEngine parentEngine) {
final String extendedUserAgentString = uaStr + " Hybrid " + (origUserAgent == null ? "" : origUserAgent);
webSettings.setUserAgentString(extendedUserAgentString);

// Configure HTML5 cache support.
webSettings.setDomStorageEnabled(true);
final String cachePath = SalesforceSDKManager.getInstance().getAppContext().getCacheDir().getAbsolutePath();
webSettings.setAppCachePath(cachePath);
webSettings.setAppCacheEnabled(true);
webSettings.setAllowFileAccess(true);
webSettings.setCacheMode(WebSettings.LOAD_DEFAULT);
}
Expand Down
4 changes: 2 additions & 2 deletions libs/SalesforceReact/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.salesforce.androidsdk.reactnative"
android:versionCode="78"
android:versionName="10.1.1">
android:versionCode="79"
android:versionName="10.2.0.dev">

<application />
</manifest>
4 changes: 2 additions & 2 deletions libs/SalesforceReact/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ apply plugin: 'com.android.library'

dependencies {
api project(':libs:MobileSync')
api 'com.facebook.react:react-native:0.67.1'
api 'com.facebook.react:react-native:0.70.1'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test:rules:1.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
Expand Down Expand Up @@ -119,7 +119,7 @@ afterEvaluate {

ext {
PUBLISH_GROUP_ID = 'com.salesforce.mobilesdk'
PUBLISH_VERSION = '10.1.1'
PUBLISH_VERSION = '10.2.0'
PUBLISH_ARTIFACT_ID = 'SalesforceReact'
}

Expand Down
20 changes: 10 additions & 10 deletions libs/SalesforceReact/package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"name": "SalesforceReact",
"version": "10.1.1",
"version": "10.2.0",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"create-react-class": "^15.7.0",
"react": "17.0.2",
"react-native": "0.67.1",
"react-native-force": "git+https://github.com/forcedotcom/SalesforceMobileSDK-ReactNative.git#v10.1.1"
"react": "18.1.0",
"react-native": "0.70.1",
"react-native-force": "git+https://github.com/forcedotcom/SalesforceMobileSDK-ReactNative.git#dev"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/preset-env": "^7.1.6",
"@babel/runtime": "^7.12.5",
"@babel/preset-env": "^7.1.6",
"@react-native-community/cli": "^6.0.0",
"@react-native-community/eslint-config": "^2.0.0",
"@types/jest": "^26.0.18",
"@types/react": "^17.0.19",
"@types/react-native": "^0.66.12",
"@types/react": "^18.0.20",
"@types/react-native": "^0.70.1",
"@types/react-test-renderer": "^17.0.1",
"babel-jest": "^26.6.3",
"chai": "4.2.0",
"eslint": "^7.15.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.66.2",
"metro-react-native-babel-preset": "^0.72.1",
"react-native-codegen": "^0.0.7",
"react-test-renderer": "17.0.2",
"typescript": "^4.1.2"
"react-test-renderer": "18.1.0",
"typescript": "^4.8.3"
}
}
4 changes: 2 additions & 2 deletions libs/SalesforceSDK/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.salesforce.androidsdk"
android:versionCode="78"
android:versionName="10.1.1">
android:versionCode="79"
android:versionName="10.2.0.dev">

<application>

Expand Down
4 changes: 2 additions & 2 deletions libs/SalesforceSDK/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ apply plugin: 'com.android.library'

dependencies {
api project(':libs:SalesforceAnalytics')
api 'com.squareup.okhttp3:okhttp:3.12.12'
api 'com.squareup.okhttp3:okhttp:4.10.0'
api 'com.google.firebase:firebase-messaging:20.1.0'
api 'androidx.core:core:1.7.0'
api 'androidx.browser:browser:1.4.0'
Expand Down Expand Up @@ -70,7 +70,7 @@ android {

ext {
PUBLISH_GROUP_ID = 'com.salesforce.mobilesdk'
PUBLISH_VERSION = '10.1.1'
PUBLISH_VERSION = '10.2.0'
PUBLISH_ARTIFACT_ID = 'SalesforceSDK'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
* A service that publishes stored data when an intent is triggered.
*
* @author bhariharan
*
* @deprecated This class will be drastically altered or replaced in Mobile SDK 11.0 when the deprecated
* {@link androidx.core.app.JobIntentService} base is replaced with a WorkManager Worker class.
*/
@Deprecated
public class AnalyticsPublisherService extends JobIntentService {

private static final String ACTION_PUBLISH = "com.salesforce.androidsdk.analytics.action.ANALYTICS_PUBLISH";
Expand Down
Loading

0 comments on commit 666092e

Please sign in to comment.