-
Notifications
You must be signed in to change notification settings - Fork 393
@W-19368426: [MSDK] Rewrite Android Screen Lock (a.k.a Passcode) for RTL UI #2835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
41112d7
fbbe8a0
167493a
e05e802
dcc23cd
063d8ec
33fc0b1
bfefa75
cc2203a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -22,6 +22,7 @@ dependencies { | |||
| api("androidx.browser:browser:1.8.0") // Update requires API 36 compileSdk | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
| api("androidx.work:work-runtime-ktx:2.10.3") | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
|
|
||||
| implementation("com.google.accompanist:accompanist-drawablepainter:0.37.3") | ||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's some Google code that lets us "remember" the programmatically-derived Drawable for the app icon.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need a 3PP for this? If it is from Google maybe not?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should check. Can you direct message any instructions you have on how I can review or request that?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That 3PP is approved ✅ |
||||
| implementation("com.google.android.material:material:1.13.0") // remove this when all xml is gone | ||||
| implementation("androidx.appcompat:appcompat:1.7.1") | ||||
| implementation("androidx.biometric:biometric:1.2.0-alpha05") | ||||
|
|
||||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,6 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
|
|
||
| <resources> | ||
| <!-- Dimensions used in sf__screen_lock.xml --> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe these were the only orphaned dimensions after removing the XML layout. |
||
| <dimen name="sf__screenlock_error_margin_top">10dp</dimen> | ||
| <dimen name="sf__screenlock_error_margin_left">20dp</dimen> | ||
| <dimen name="sf__screenlock_error_margin_right">20dp</dimen> | ||
|
|
||
| <!-- Biometric Enrollment Prompt --> | ||
| <dimen name="sf__dialog_layout_padding">0dp</dimen> | ||
| </resources> | ||
| </resources> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -206,16 +206,6 @@ | |
| <item name="android:windowLightStatusBar">false</item> | ||
| </style> | ||
|
|
||
| <style name="SalesforceSDK.ScreenLock.ErrorMessage"> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This style was also orphaned when the XML layout for screen lock was removed. |
||
| <item name="android:layout_height">wrap_content</item> | ||
| <item name="android:gravity">center</item> | ||
| <item name="android:layout_gravity">center_horizontal</item> | ||
| <item name="android:layout_width">wrap_content</item> | ||
| <item name="android:layout_marginTop">@dimen/sf__screenlock_error_margin_top</item> | ||
| <item name="android:layout_marginLeft">@dimen/sf__screenlock_error_margin_left</item> | ||
| <item name="android:layout_marginRight">@dimen/sf__screenlock_error_margin_right</item> | ||
| </style> | ||
|
|
||
| <style name="SalesforceSDK_Fullscreen" parent="@style/Theme.AppCompat.DayNight.NoActionBar"> | ||
| <item name="android:windowNoTitle">true</item> | ||
| <item name="android:windowActionBar">false</item> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,29 @@ | ||
| /* | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added the copyright header here since it was missing. We do want those everywhere, correct? |
||
| * Copyright (c) 2021-present, salesforce.com, inc. | ||
| * All rights reserved. | ||
| * Redistribution and use of this software in source and binary forms, with or | ||
| * without modification, are permitted provided that the following conditions | ||
| * are met: | ||
| * - Redistributions of source code must retain the above copyright notice, this | ||
| * list of conditions and the following disclaimer. | ||
| * - Redistributions in binary form must reproduce the above copyright notice, | ||
| * this list of conditions and the following disclaimer in the documentation | ||
| * and/or other materials provided with the distribution. | ||
| * - Neither the name of salesforce.com, inc. nor the names of its contributors | ||
| * may be used to endorse or promote products derived from this software without | ||
| * specific prior written permission of salesforce.com, inc. | ||
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
| * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| * POSSIBILITY OF SUCH DAMAGE. | ||
| */ | ||
| package com.salesforce.androidsdk.ui | ||
|
|
||
| import android.os.Bundle | ||
|
|
@@ -55,8 +81,6 @@ import com.salesforce.androidsdk.R.string.sf__server_url_save | |
| import com.salesforce.androidsdk.app.SalesforceSDKManager | ||
| import com.salesforce.androidsdk.config.BootConfig | ||
| import com.salesforce.androidsdk.config.OAuthConfig | ||
| import com.salesforce.androidsdk.ui.components.CORNER_RADIUS | ||
| import com.salesforce.androidsdk.ui.components.PADDING_SIZE | ||
| import com.salesforce.androidsdk.ui.components.TEXT_SIZE | ||
| import com.salesforce.androidsdk.ui.theme.hintTextColor | ||
| import com.salesforce.androidsdk.util.test.ExcludeFromJacocoGeneratedReport | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, so after the Jetpack Compose migration this was actually the only task left. Note, without this the app gets into a strange state where it will use the RTL text but used the LTR layout. It looks really odd.
I reckon this will resource-merge through to the applications and in this case that means all application modules that depend on SalesforceSDK. Is that acceptable? Would we want to leave this off here and let the app modules take responsibility for adding it? Is there a case where an app module could be negatively affected? They could override as needed. I always consider that when updating a library module such as this.