Skip to content

Commit

Permalink
Merge pull request #554 from bhariharan/dev
Browse files Browse the repository at this point in the history
Latest from source repo
  • Loading branch information
bhariharan committed Sep 4, 2021
2 parents 78a388b + 7ae1e10 commit 3783cad
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
15 changes: 10 additions & 5 deletions src/android/libs/SalesforceSDK/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
android:theme="@style/SalesforceSDK"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" />
android:windowSoftInputMode="adjustResize"
android:exported="true" />

<!-- Passcode activity -->
<activity android:name="com.salesforce.androidsdk.ui.PasscodeActivity"
Expand All @@ -43,19 +44,22 @@
<!-- Manage space activity -->
<activity android:name="com.salesforce.androidsdk.ui.ManageSpaceActivity"
android:excludeFromRecents="true"
android:theme="@style/SalesforceSDK" />
android:theme="@style/SalesforceSDK"
android:exported="false" />

<!-- Choose server activity -->
<activity android:name="com.salesforce.androidsdk.ui.ServerPickerActivity"
android:excludeFromRecents="true"
android:theme="@style/SalesforceSDK"
android:screenOrientation="portrait" />
android:screenOrientation="portrait"
android:exported="false" />

<!-- Account switcher activity -->
<activity android:name="com.salesforce.androidsdk.ui.AccountSwitcherActivity"
android:excludeFromRecents="true"
android:theme="@style/SalesforceSDK"
android:screenOrientation="portrait" />
android:screenOrientation="portrait"
android:exported="false" />

<!-- IDP webview activity -->
<activity android:name="com.salesforce.androidsdk.auth.idp.IDPCodeGeneratorActivity"
Expand All @@ -78,7 +82,8 @@
</intent-filter>
</receiver>

<service android:name="com.salesforce.androidsdk.push.SFDCFcmListenerService">
<service android:name="com.salesforce.androidsdk.push.SFDCFcmListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ public class HttpAccess {
* Initializes HttpAccess. Should be called from the application.
*/
public static void init(Context app) {
assert DEFAULT == null : "HttpAccess.init should be called once per process";
DEFAULT = new HttpAccess(app, null /* user agent will be calculated at request time */);
if (DEFAULT == null) {
DEFAULT = new HttpAccess(app, null /* user agent will be calculated at request time */);
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/android/libs/SmartStore/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:SalesforceSDK')
api 'net.zetetic:android-database-sqlcipher:4.4.2'
api 'net.zetetic:android-database-sqlcipher:4.4.3'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test:rules:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
Expand Down
4 changes: 2 additions & 2 deletions tools/postinstall-android.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ if (data.indexOf("SalesforceHybrid") < 0)
var newAndroidDepTree = "android {\n\tpackagingOptions {\n\t\texclude 'META-INF/LICENSE'\n\t\texclude 'META-INF/LICENSE.txt'\n\t\texclude 'META-INF/DEPENDENCIES'\n\t\texclude 'META-INF/NOTICE'\n\t}";
replaceTextInFile(path.join(appProjectRoot, 'app', 'build.gradle'), oldAndroidDepTree, newAndroidDepTree);
var oldGradleToolsVersion = "com.android.tools.build:gradle:4.0.0";
var newGradleToolsVersion = "com.android.tools.build:gradle:7.0.1";
var newGradleToolsVersion = "com.android.tools.build:gradle:7.0.2";
replaceTextInFile(path.join(appProjectRoot, 'app', 'build.gradle'), oldGradleToolsVersion, newGradleToolsVersion);
var newLibDep = "api project(':SalesforceHybrid')";
replaceTextInFile(path.join(appProjectRoot, 'app', 'build.gradle'), 'implementation(project(path: \":CordovaLib\"))', newLibDep);
Expand All @@ -106,7 +106,7 @@ if (data.indexOf("SalesforceHybrid") < 0)
// Replacing values in top level build.gradle to avoid conflicts in Gradle builds.
console.log('Fixing project workspace build.gradle');
var oldGradleToolsVersion = "com.android.tools.build:gradle:4.0.0";
var newGradleToolsVersion = "com.android.tools.build:gradle:7.0.1";
var newGradleToolsVersion = "com.android.tools.build:gradle:7.0.2";

replaceTextInFile(path.join(appProjectRoot, 'build.gradle'), oldGradleToolsVersion, newGradleToolsVersion);
replaceTextInFile(path.join(appProjectRoot, 'build.gradle'), /defaultBuildToolsVersion=.*/, '');
Expand Down

0 comments on commit 3783cad

Please sign in to comment.