Skip to content

Commit c672dd5

Browse files
@W-19368426: [MSDK] Rewrite Android Screen Lock (a.k.a Passcode) for RTL UI (#2835)
1 parent cf5704e commit c672dd5

19 files changed

Lines changed: 2067 additions & 385 deletions

libs/SalesforceSDK/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
1111
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
1212

13-
<application>
13+
<application android:supportsRtl="true">
1414

1515
<!-- Metadata for supported app restrictions -->
1616
<meta-data android:name="android.content.APP_RESTRICTIONS"

libs/SalesforceSDK/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies {
2323
api("androidx.browser:browser:1.8.0") // Update requires API 36 compileSdk
2424
api("androidx.work:work-runtime-ktx:2.10.3")
2525

26+
implementation("com.google.accompanist:accompanist-drawablepainter:0.37.3")
2627
implementation("com.google.android.material:material:1.13.0") // remove this when all xml is gone
2728
implementation("androidx.appcompat:appcompat:1.7.1")
2829
implementation("androidx.biometric:biometric:1.2.0-alpha05")

libs/SalesforceSDK/res/layout/sf__screen_lock.xml

Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

33
<resources>
4-
<!-- Dimensions used in sf__screen_lock.xml -->
5-
<dimen name="sf__screenlock_error_margin_top">10dp</dimen>
6-
<dimen name="sf__screenlock_error_margin_left">20dp</dimen>
7-
<dimen name="sf__screenlock_error_margin_right">20dp</dimen>
8-
94
<!-- Biometric Enrollment Prompt -->
105
<dimen name="sf__dialog_layout_padding">0dp</dimen>
11-
</resources>
6+
</resources>

libs/SalesforceSDK/res/values/sf__styles.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,6 @@
206206
<item name="android:windowLightStatusBar">false</item>
207207
</style>
208208

209-
<style name="SalesforceSDK.ScreenLock.ErrorMessage">
210-
<item name="android:layout_height">wrap_content</item>
211-
<item name="android:gravity">center</item>
212-
<item name="android:layout_gravity">center_horizontal</item>
213-
<item name="android:layout_width">wrap_content</item>
214-
<item name="android:layout_marginTop">@dimen/sf__screenlock_error_margin_top</item>
215-
<item name="android:layout_marginLeft">@dimen/sf__screenlock_error_margin_left</item>
216-
<item name="android:layout_marginRight">@dimen/sf__screenlock_error_margin_right</item>
217-
</style>
218-
219209
<style name="SalesforceSDK_Fullscreen" parent="@style/Theme.AppCompat.DayNight.NoActionBar">
220210
<item name="android:windowNoTitle">true</item>
221211
<item name="android:windowActionBar">false</item>

libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/DevInfoActivity.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ import com.salesforce.androidsdk.R
8282
import com.salesforce.androidsdk.app.SalesforceSDKManager
8383
import com.salesforce.androidsdk.developer.support.DevSupportInfo
8484
import com.salesforce.androidsdk.ui.components.ICON_SIZE
85-
import com.salesforce.androidsdk.ui.components.PADDING_SIZE
8685
import com.salesforce.androidsdk.ui.components.TEXT_SIZE
8786
import com.salesforce.androidsdk.ui.theme.sfDarkColors
8887
import com.salesforce.androidsdk.ui.theme.sfLightColors

libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/LoginOptionsActivity.kt

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
/*
2+
* Copyright (c) 2021-present, salesforce.com, inc.
3+
* All rights reserved.
4+
* Redistribution and use of this software in source and binary forms, with or
5+
* without modification, are permitted provided that the following conditions
6+
* are met:
7+
* - Redistributions of source code must retain the above copyright notice, this
8+
* list of conditions and the following disclaimer.
9+
* - Redistributions in binary form must reproduce the above copyright notice,
10+
* this list of conditions and the following disclaimer in the documentation
11+
* and/or other materials provided with the distribution.
12+
* - Neither the name of salesforce.com, inc. nor the names of its contributors
13+
* may be used to endorse or promote products derived from this software without
14+
* specific prior written permission of salesforce.com, inc.
15+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25+
* POSSIBILITY OF SUCH DAMAGE.
26+
*/
127
package com.salesforce.androidsdk.ui
228

329
import android.os.Bundle
@@ -55,8 +81,6 @@ import com.salesforce.androidsdk.R.string.sf__server_url_save
5581
import com.salesforce.androidsdk.app.SalesforceSDKManager
5682
import com.salesforce.androidsdk.config.BootConfig
5783
import com.salesforce.androidsdk.config.OAuthConfig
58-
import com.salesforce.androidsdk.ui.components.CORNER_RADIUS
59-
import com.salesforce.androidsdk.ui.components.PADDING_SIZE
6084
import com.salesforce.androidsdk.ui.components.TEXT_SIZE
6185
import com.salesforce.androidsdk.ui.theme.hintTextColor
6286
import com.salesforce.androidsdk.util.test.ExcludeFromJacocoGeneratedReport

0 commit comments

Comments
 (0)