Compare commits

..

157 Commits

Author SHA1 Message Date
Amy Galles
5dedc37b07 Merge branch 'main' into agalles/automate-android-fastlane-patch 2025-06-04 20:54:16 -07:00
Amy Galles
34354b11e5 restore changelog changes 2025-06-04 20:48:52 -07:00
David Perez
a59eaf5d40 PM-22362: AddSendScreen should include 'Required.' when describing the max file size (#5310) 2025-06-04 13:43:10 +00:00
Amy Galles
3ad1121d01 revert changelog changes 2025-06-03 21:43:19 -07:00
David Perez
d2129cf507 PM-22357: Delete Send button should use a capital S (#5309) 2025-06-03 21:03:17 +00:00
Patrick Honkonen
903c260ad1 [PM-21891] Migrate filled and outlined button components to ui module (#5302) 2025-06-03 20:09:13 +00:00
Patrick Honkonen
09a8c01824 [deps] Update Google guava library (#5305) 2025-06-03 20:03:37 +00:00
David Perez
a1a4c217de PM-22346: Remove the period from the generic error title (#5308) 2025-06-03 18:40:45 +00:00
David Perez
7fbe3510b5 PM-22345: Flight recorder banner should not dismiss when navigating to settings (#5306) 2025-06-03 16:58:48 +00:00
Patrick Honkonen
0892e0ff1f [PM-21782] Pass encryptedFor to cipher functions (#5297) 2025-06-03 16:34:46 +00:00
Patrick Honkonen
0934d47159 [deps] Update protobuf (#5304) 2025-06-03 16:33:43 +00:00
David Perez
caf1c2eed5 PM-22265: Add Copy Notes button to ViewSendScreen (#5303) 2025-06-03 16:32:34 +00:00
David Perez
803d519c24 Update AGP to 8.10.1 (#5301) 2025-06-03 15:00:36 +00:00
David Perez
a3d2e51c8e PM-22310: Replace Ok with Okay (#5298) 2025-06-02 22:54:47 +00:00
Álison Fernandes
1ac697e84a Remove unused retrieveBuildFromGithub lane 2025-06-02 23:03:16 +01:00
Amy Galles
27e45a0646 add text for debugging 2025-06-02 14:22:02 -07:00
Amy Galles
814e3d3cb9 fix default track name 2025-06-02 14:16:15 -07:00
David Perez
891def5e32 PM-22302: Remove unused string resources (#5296) 2025-06-02 19:56:16 +00:00
Álison Fernandes
fc4ec405da Support \n \t \r in changlogs 2025-06-02 15:20:08 +01:00
Álison Fernandes
45ee744ace Add fastlane patch 2025-06-02 14:12:49 +01:00
Álison Fernandes
99dfd53747 Passing track inputs to fastlane 2025-06-02 14:10:20 +01:00
Álison Fernandes
12afc04e92 Update run-as 2025-06-02 14:06:49 +01:00
Álison Fernandes
f73014f39e Add track inputs for testing 2025-06-02 14:04:51 +01:00
Álison Fernandes
0cce938248 Fix track_promote_release_status 2025-06-02 13:53:04 +01:00
Álison Fernandes
e7e94e9a81 Update tracks for testing 2025-06-02 13:52:06 +01:00
Álison Fernandes
00ded69a84 [QA-1126] Add placeholder workflow for device farm testing (#5292) 2025-06-02 12:39:16 +00:00
ifernandezdiaz
c5f597aedb [QA-1164] Adding missing testTags for View Send page (#5290) 2025-05-30 21:12:09 +00:00
David Perez
f43367ebfa PM-10286: View Master Password Prompt (#5280) 2025-05-30 21:04:59 +00:00
Amy Galles
21d8b24522 resolve merge conflict 2025-05-30 11:50:41 -07:00
Amy Galles
1128680ff2 Missing comma 2025-05-30 11:47:46 -07:00
Amy Galles
21a810303c Fix track name 2025-05-30 11:45:29 -07:00
Amy Galles
a08210414c Merge branch 'main' into agalles/automate-android 2025-05-30 11:40:05 -07:00
Amy Galles
90fcb747e5 add newline 2025-05-30 11:35:23 -07:00
Patrick Honkonen
997769bb1c [PM-21475] Remove deprecated SSO details endpoint feature flag (#5286) 2025-05-30 16:08:04 +00:00
David Perez
65d1a4f12a BWA-159: Update the ManualCodeEntryScreen to allow scrolling (#5287) 2025-05-30 13:58:23 +00:00
bw-ghapp[bot]
f7c1278805 Crowdin Pull - Authenticator (#5288)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2025-05-30 13:32:48 +00:00
bw-ghapp[bot]
aa3602a5ce Crowdin Pull - Password Manager (#5289)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2025-05-30 13:30:29 +00:00
André Bispo
af18848159 [PM-20146] Remove native-create-account-flow feature flag (#5283) 2025-05-29 21:42:16 +00:00
David Perez
f3b7d0f732 PM-21631: Check for Search Screen when navigating after deleting a Send (#5284) 2025-05-29 21:29:56 +00:00
David Perez
e250a8dc1e BWA-158: Authenticator Edit Item should use a single LazyColum to allow for scrolling (#5285) 2025-05-29 21:12:15 +00:00
Amy Galles
bbade469c1 remove optional release notes 2025-05-29 13:49:15 -07:00
Amy Galles
738f502a36 remove optional release notes 2025-05-29 13:48:55 -07:00
Amy Galles
3f33f03459 update percentage leaving notes intact 2025-05-29 13:44:15 -07:00
Amy Galles
f954e1637d fix string with to_f 2025-05-29 13:29:23 -07:00
Amy Galles
64fb2ab341 digit not a string 2025-05-29 13:21:02 -07:00
Amy Galles
08a04cf419 missing comma 2025-05-29 13:18:21 -07:00
Amy Galles
d770f43b82 redoing percentage to decimal 2025-05-29 13:16:26 -07:00
Amy Galles
ef18b502b8 switching to test mode 2025-05-29 13:00:32 -07:00
David Perez
ab2ac60957 PM-15229: Update logic for handling edge-to-edge (#5282) 2025-05-29 18:25:23 +00:00
Amy Galles
aefee591e1 streamline rollout percentage options 2025-05-29 09:24:36 -07:00
Amy Galles
4d2f130f0a updating locales for pw manager vs auth 2025-05-29 09:06:35 -07:00
Amy Galles
669fcc3448 temporarily removing languages 2025-05-29 08:58:18 -07:00
Amy Galles
47aaa79dc3 changing track name for Production 2025-05-29 08:41:55 -07:00
Amy Galles
9249bed287 staging to production 2025-05-29 08:32:52 -07:00
Patrick Honkonen
b877487ce1 [PM-22169] Migrate app bar components to ui module (#5279) 2025-05-29 14:54:49 +00:00
David Perez
ef68879778 Clean up lint errors and suppressions (#5281) 2025-05-29 14:52:15 +00:00
André Bispo
a4e4d1488b [PM-21577] Fix delete button not showing bug (#5276) 2025-05-29 14:16:05 +00:00
Amy Galles
441da4e3f2 trying to format release notes again 2025-05-28 17:26:01 -07:00
Amy Galles
ffee7d6c8e move back to changelog directories 2025-05-28 17:12:44 -07:00
Amy Galles
b9e000e2ae try release notes directly 2025-05-28 17:09:06 -07:00
Amy Galles
f4bfeb5220 test change metadata directory 2025-05-28 16:56:51 -07:00
Amy Galles
3dcacee3f4 rename test track 2025-05-28 16:46:13 -07:00
Amy Galles
0156309b79 include metadata 2025-05-28 16:31:13 -07:00
Amy Galles
9210d63775 implementing suggestions from Álison 2025-05-28 16:25:53 -07:00
Amy Galles
7b385bb178 renamed track 2025-05-28 12:47:42 -07:00
Amy Galles
03b83b6e68 trying with a different release 2025-05-28 12:46:06 -07:00
Amy Galles
934d32d6ec typo in release_status? 2025-05-28 12:43:35 -07:00
Amy Galles
6fd9fa9d23 first deploy can't be staged 2025-05-28 12:41:40 -07:00
Amy Galles
b8a3d078f3 reenable publish 2025-05-28 12:38:31 -07:00
David Perez
cf8578f3ef PM-21135: Fix view send field order (#5277) 2025-05-28 18:14:26 +00:00
Amy Galles
3e3743f77e fix version names 2025-05-28 10:12:43 -07:00
Amy Galles
af15eca966 just get version codes again 2025-05-28 10:10:29 -07:00
Amy Galles
592c548fcb add back publish lanes 2025-05-28 10:01:43 -07:00
Amy Galles
fd647d88c8 adding version code 2025-05-28 10:00:32 -07:00
Amy Galles
c6be79d909 fix syntax error 2025-05-28 09:53:02 -07:00
Amy Galles
5717d5fe15 comment out other supply lanes 2025-05-28 09:50:34 -07:00
Amy Galles
3420efc3c3 run [09:44:46]: Could not find service account json file at path '/Users/amygalles/code/android/secrets/play_creds.json' to setup supply 2025-05-28 09:44:46 -07:00
Amy Galles
d2ce39b42e add product from input 2025-05-28 09:41:49 -07:00
Amy Galles
80f74e9aa3 fix syntax error 2025-05-28 09:37:13 -07:00
Amy Galles
a66c996143 just get package names 2025-05-28 09:34:11 -07:00
Amy Galles
b08b7c0b84 pointing at closed testing track 2025-05-28 08:53:02 -07:00
David Perez
bdd0660e2b PM-21134: Fix send link title (#5275) 2025-05-28 15:27:28 +00:00
Amy Galles
26fb8ebf6e update track name 2025-05-27 18:23:11 -07:00
Amy Galles
b541599248 update fastfile 2025-05-27 18:18:27 -07:00
Amy Galles
03907f8e36 remove space 2025-05-27 18:15:55 -07:00
Amy Galles
563cd732b8 enabling promotion 2025-05-27 18:12:45 -07:00
Amy Galles
0823bfecc6 try fix parenthesis 2025-05-27 15:51:39 -07:00
Amy Galles
042e59fa5b try formatting release notes 2025-05-27 15:49:54 -07:00
Amy Galles
b45d03ac22 try formatting release notes 2025-05-27 15:46:27 -07:00
Amy Galles
28f4eb854f removing space 2025-05-27 15:31:03 -07:00
Amy Galles
3a0744a047 remove example text 2025-05-27 15:27:35 -07:00
Amy Galles
3f54e1180b trying changelog with example text 2025-05-27 15:25:16 -07:00
Amy Galles
10299848c6 trying changelog with interpolation 2025-05-27 15:21:29 -07:00
Amy Galles
d005f98008 add in release notes and version code 2025-05-27 15:12:32 -07:00
Amy Galles
4acfb56df7 Remove promote to production lane 2025-05-27 14:57:41 -07:00
Amy Galles
246c3e1768 test entry of release notes 2025-05-27 14:55:16 -07:00
David Perez
294ef674bc PM-13040: Add known username field for the Disney Plus App (#5271) 2025-05-27 21:49:57 +00:00
David Perez
b9a897a9fc Update Firebase BOM to v33.14.0 (#5272) 2025-05-27 21:49:17 +00:00
Patrick Honkonen
6b12b9757f [PM-17686] Correct body text for "Replace existing certificate" dialog (#5270) 2025-05-27 21:28:12 +00:00
David Perez
61411ca73c Update Compose BOM to 2025.05.01 (#5269) 2025-05-27 16:16:50 +00:00
David Perez
3908827a14 PM-17660: Improve the way we remember the annotated string (#5257) 2025-05-27 15:21:19 +00:00
renovate[bot]
e553d7a015 [deps]: Lock file maintenance (#5267)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-27 14:54:55 +00:00
renovate[bot]
3015b768c6 [deps]: Update org.jetbrains.kotlinx:kotlinx-collections-immutable to v0.4.0 (#5265)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-27 14:40:24 +00:00
David Perez
21b8ef92ba PM-21952: Move navigation package to UI module (#5260) 2025-05-27 13:48:07 +00:00
David Perez
0e3e6069fa Update Retrofit BOM to 3.0.0 (#5258) 2025-05-27 13:46:55 +00:00
David Perez
8d8dee5171 PM-21916: Move the FAB to the UI module (#5251) 2025-05-27 13:46:38 +00:00
Michał Chęciński
97b6bccd72 Add stub for publishing releases workflow (#5268) 2025-05-27 13:26:01 +00:00
Álison Fernandes
2a6813e4a2 [PM-21336] CI restructuring #1 - Consolidate Crowdin pull and push workflows (#5253) 2025-05-26 14:21:16 +00:00
Amy Galles
d400b4fcc2 remove reference to beta directory 2025-05-23 15:19:03 -07:00
Amy Galles
7434114d09 adding debugging text 2025-05-23 15:15:12 -07:00
Amy Galles
25cfc6d06f add trigger for updateReleaseNotes lane 2025-05-23 15:06:30 -07:00
Amy Galles
9de23fa205 adding back default credentials 2025-05-23 15:00:19 -07:00
Amy Galles
0c077cb3fb removing redundant check 2025-05-23 14:56:03 -07:00
Amy Galles
3702dcad42 add checkout repo 2025-05-23 13:33:32 -07:00
Amy Galles
3e4c227b13 adding release notes 2025-05-23 13:29:50 -07:00
Amy Galles
f9e822b03d testing a random change 2025-05-23 13:20:11 -07:00
aj-rosado
29e7899525 [PM-21537] Fix remove individual vault collection selection (#5262) 2025-05-23 19:41:00 +00:00
Amy Galles
4cd603006f [BRE-768] Creating stub workflow for testing (#5259) 2025-05-23 18:37:25 +00:00
Amy Galles
ba3b7f7135 removing run from fastlane command 2025-05-23 11:03:32 -07:00
bw-ghapp[bot]
1a091e198c Autosync Crowdin Translations (#5252)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2025-05-23 16:05:23 +00:00
Amy Galles
9fd6578083 refactoring redundant code 2025-05-23 08:51:17 -07:00
Amy Galles
f04bc7e2c3 fix formatting 2025-05-23 08:45:49 -07:00
Amy Galles
8f7c98574f removing unnecessary brackets 2025-05-23 08:41:21 -07:00
Amy Galles
ad6b0bb560 clarify some option text 2025-05-23 08:38:28 -07:00
Amy Galles
7fe29198a2 remove whitespace 2025-05-23 08:35:09 -07:00
Amy Galles
b1ce52596f move original release notes lane back 2025-05-23 08:34:31 -07:00
Amy Galles
9e7cddd24f add workflow for publishing to production 2025-05-23 08:32:04 -07:00
Amy Galles
c05f6219a9 add lane for updating notes and promoting to prod 2025-05-23 08:31:51 -07:00
David Perez
3551e75596 PM-16705: Improve the node validation logic (#5250) 2025-05-22 22:10:46 +00:00
André Bispo
6d976bea4c [PM-21577] Handle organization limitItemDeletion from sync response. (#5244) 2025-05-22 22:09:17 +00:00
Amy Galles
9deb39d745 adding release notes to Fastlane 2025-05-22 14:12:04 -07:00
Patrick Honkonen
d5c04123d9 [PM-21888] Migrate icon buttons to ui module (#5241) 2025-05-22 20:31:12 +00:00
David Perez
000a7d141e PM-17660: Add additional context for the sync feature (#5243) 2025-05-22 17:55:50 +00:00
Patrick Honkonen
c9d4d35f07 [PM-21851] Use rememberVectorPainter from platform UI in Authenticator (#5240) 2025-05-21 20:58:08 +00:00
Patrick Honkonen
4216f3f5a0 Rename all java source dirs to kotlin (#5239) 2025-05-21 19:14:53 +00:00
David Perez
c14545107d PM-21879: Move SpanStyleUtil and StringResExtensions to UI module (#5238) 2025-05-21 17:23:04 +00:00
Patrick Honkonen
d1a8cbf59f Bump authenticatorbridge to 1.0.1 (#5230) 2025-05-21 16:37:41 +00:00
Patrick Honkonen
1acc1a87a6 [PM-21851] Migrate RememberVectorPainter to ui module (#5233) 2025-05-21 16:17:44 +00:00
André Bispo
fd73360539 [PM-21405] Delete account error message (#5237) 2025-05-21 15:34:42 +00:00
Patrick Honkonen
178625222a Update target and compile SDK to 36 (#5229) 2025-05-21 15:01:59 +00:00
Patrick Honkonen
3ea17eb71c [PM-21849] Rename ui module source dir to kotlin (#5232) 2025-05-21 14:18:11 +00:00
Álison Fernandes
6ccb035ffd [PM-21825] Set missing workflow permissions (#5235) 2025-05-21 13:17:01 +00:00
Patrick Honkonen
5c3008d080 [PM-21385] Use flatMapLatest for accountSyncStateFlow (#5231) 2025-05-20 20:37:36 +00:00
Patrick Honkonen
54efc74907 [PM-21385] Defer feature flag check for Bitwarden account sync (#5222) 2025-05-20 18:09:15 +00:00
David Perez
34aed2ac65 Update authenticator compose tests to allow for easier use of local compositions (#5228) 2025-05-20 17:01:23 +00:00
Patrick Honkonen
3d152f5c36 Bump Kotlin to 2.1.21 (#5227) 2025-05-20 15:42:10 +00:00
Patrick Honkonen
4c8e5602dd [PM-21354] Migrate ColorExtensions and its tests to ui module (#5216) 2025-05-20 14:59:13 +00:00
Vince Grassia
6e44ee2eb0 [BRE-552] Fix Actionlint findings (#5223) 2025-05-20 14:02:52 +00:00
David Perez
4895f2a18a Update test fixtures to allow for easier customization (#5224) 2025-05-19 21:27:21 +00:00
David Perez
fc4f02c4d5 Rename AddSend UI to AddEditSend (#5221) 2025-05-19 21:26:31 +00:00
Patrick Honkonen
6719534494 [PM-21357] Migrate ModifierExtensions to ui module (#5215) 2025-05-19 20:02:52 +00:00
Patrick Honkonen
183584f678 [PM-21386] Fix typo in sync with Bitwarden message (#5220) 2025-05-19 17:26:09 +00:00
David Perez
046bb0fa39 PM-21080: Remove the isRemotelyConfigured flag (#5193) 2025-05-19 15:56:19 +00:00
David Perez
9508b4ba90 PM-21701: Remove segmented control from Add Send Screen and update the screen title (#5217) 2025-05-19 14:48:26 +00:00
Patrick Honkonen
07e4e6a806 [PM-21726] Move OmitFromCoverage to annotation module (#5214) 2025-05-19 13:19:16 +00:00
David Perez
4d142a6a5c PM-21133: Add View Send navigation (#5187) 2025-05-16 18:48:22 +00:00
Patrick Honkonen
f02a3a249b [PM-21703] Consolidate Robolectric and Compose test base classes (#5210) 2025-05-16 17:48:23 +00:00
1748 changed files with 9562 additions and 9895 deletions

View File

@@ -29,6 +29,10 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVA_VERSION: 17
permissions:
contents: read
packages: read
jobs:
build:
name: Build Authenticator

View File

@@ -30,6 +30,10 @@ env:
JAVA_VERSION: 17
GITHUB_ACTION_RUN_URL: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
permissions:
contents: read
packages: read
jobs:
build:
name: Build
@@ -195,7 +199,7 @@ jobs:
- name: Increment version
run: |
DEFAULT_VERSION_CODE=$((11000+$GITHUB_RUN_NUMBER))
DEFAULT_VERSION_CODE=$((11000+GITHUB_RUN_NUMBER))
bundle exec fastlane setBuildVersionInfo \
versionCode:${{ inputs.version-code || '$DEFAULT_VERSION_CODE' }} \
versionName:${{ inputs.version-name }}
@@ -481,7 +485,7 @@ jobs:
# Start from 11000 to prevent collisions with mobile build version codes
- name: Increment version
run: |
DEFAULT_VERSION_CODE=$((11000+$GITHUB_RUN_NUMBER))
DEFAULT_VERSION_CODE=$((11000+GITHUB_RUN_NUMBER))
VERSION_CODE="${{ inputs.version-code || '$DEFAULT_VERSION_CODE' }}"
bundle exec fastlane setBuildVersionInfo \
versionCode:$VERSION_CODE \

View File

@@ -1,56 +0,0 @@
name: Crowdin Sync - Authenticator
on:
workflow_dispatch:
inputs: {}
schedule:
- cron: '0 0 * * 5'
jobs:
crowdin-sync:
name: Autosync
runs-on: ubuntu-24.04
env:
_CROWDIN_PROJECT_ID: "673718"
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Log in to Azure - CI Subscription
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
with:
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
- name: Retrieve secrets
id: retrieve-secrets
uses: bitwarden/gh-actions/get-keyvault-secrets@main
with:
keyvault: "bitwarden-ci"
secrets: "github-gpg-private-key, github-gpg-private-key-passphrase"
- name: Generate GH App token
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
id: app-token
with:
app-id: ${{ secrets.BW_GHAPP_ID }}
private-key: ${{ secrets.BW_GHAPP_KEY }}
- name: Download translations
uses: crowdin/github-action@b8012bd5491b8aa8578b73ab5b5f5e7c94aaa6e2 # v2.7.0
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
with:
config: crowdin-bwa.yml
upload_sources: false
upload_translations: false
download_translations: true
github_user_name: "bitwarden-devops-bot"
github_user_email: "106330231+bitwarden-devops-bot@users.noreply.github.com"
commit_message: "Autosync the updated translations"
localization_branch_name: crowdin-auto-sync
create_pull_request: true
pull_request_title: "Autosync Crowdin Translations"
pull_request_body: "Autosync the updated translations"
gpg_private_key: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key }}
gpg_passphrase: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key-passphrase }}

View File

@@ -1,17 +1,29 @@
name: Crowdin Sync
name: Cron / Crowdin Pull
run-name: Crowdin Pull - ${{ github.event_name == 'workflow_dispatch' && 'Manual' || 'Scheduled' }}
on:
workflow_dispatch:
inputs: {}
schedule:
- cron: '0 0 * * 5'
jobs:
crowdin-sync:
name: Autosync
name: Crowdin Pull - ${{ matrix.name }} - ${{ github.event_name }}
runs-on: ubuntu-24.04
env:
_CROWDIN_PROJECT_ID: "269690"
permissions:
contents: write
pull-requests: write
strategy:
matrix:
include:
- name: Password Manager
project_id: 269690
config: crowdin-bwpm.yml
branch: crowdin-pull-bwpm
- name: Authenticator
project_id: 673718
config: crowdin-bwa.yml
branch: crowdin-pull-bwa
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -35,22 +47,23 @@ jobs:
app-id: ${{ secrets.BW_GHAPP_ID }}
private-key: ${{ secrets.BW_GHAPP_KEY }}
- name: Download translations
- name: Download translations for ${{ matrix.name }}
uses: crowdin/github-action@b8012bd5491b8aa8578b73ab5b5f5e7c94aaa6e2 # v2.7.0
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
_CROWDIN_PROJECT_ID: ${{ matrix.project_id }}
with:
config: crowdin.yml
config: ${{ matrix.config }}
upload_sources: false
upload_translations: false
download_translations: true
github_user_name: "bitwarden-devops-bot"
github_user_email: "106330231+bitwarden-devops-bot@users.noreply.github.com"
commit_message: "Autosync the updated translations"
localization_branch_name: crowdin-auto-sync
commit_message: "Crowdin Pull - ${{ matrix.name }}"
localization_branch_name: ${{ matrix.branch }}
create_pull_request: true
pull_request_title: "Autosync Crowdin Translations"
pull_request_body: "Autosync the updated translations"
pull_request_title: "Crowdin Pull - ${{ matrix.name }}"
pull_request_body: ":inbox_tray: New translations for ${{ matrix.name }} received!"
gpg_private_key: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key }}
gpg_passphrase: ${{ steps.retrieve-secrets.outputs.github-gpg-private-key-passphrase }}

View File

@@ -1,30 +0,0 @@
name: Crowdin Push - Authenticator
on:
workflow_dispatch:
push:
branches:
- "main"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVA_VERSION: 17
jobs:
crowdin-push:
name: Crowdin Push
runs-on: ubuntu-24.04
env:
_CROWDIN_PROJECT_ID: "673718"
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Upload sources
uses: crowdin/github-action@b8012bd5491b8aa8578b73ab5b5f5e7c94aaa6e2 # v2.7.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
with:
config: crowdin-bwa.yml
upload_sources: true
upload_translations: false

View File

@@ -1,17 +1,18 @@
name: Crowdin Push
name: CI / Crowdin Push
run-name: Crowdin Push - ${{ github.event_name == 'workflow_dispatch' && 'Manual' || 'CI' }}
on:
workflow_dispatch:
push:
branches:
- "main"
- main
jobs:
crowdin-push:
name: Crowdin Push
name: Crowdin Push - ${{ github.event_name }}
runs-on: ubuntu-24.04
env:
_CROWDIN_PROJECT_ID: "269690"
permissions:
contents: read
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -28,12 +29,24 @@ jobs:
keyvault: "bitwarden-ci"
secrets: "crowdin-api-token"
- name: Upload sources
- name: Upload sources for Password Manager
uses: crowdin/github-action@b8012bd5491b8aa8578b73ab5b5f5e7c94aaa6e2 # v2.7.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
_CROWDIN_PROJECT_ID: "269690"
with:
config: crowdin.yml
config: crowdin-bwpm.yml
upload_sources: true
upload_translations: false
- name: Upload sources for Authenticator
uses: crowdin/github-action@b8012bd5491b8aa8578b73ab5b5f5e7c94aaa6e2 # v2.7.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
_CROWDIN_PROJECT_ID: "673718"
with:
config: crowdin-bwa.yml
upload_sources: true
upload_translations: false

View File

@@ -41,7 +41,6 @@ jobs:
runs-on: ubuntu-24.04
permissions:
contents: write
actions: read
steps:
- name: Check out repository

View File

@@ -0,0 +1,12 @@
name: Publish GitHub Release as newest
on:
workflow_dispatch:
jobs:
stub:
runs-on: ubuntu-24.04
name: Stub
steps:
- name: Stub
run: echo "This is a stub job to trigger the workflow."

142
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,142 @@
name: Publish
run-name: "Promoting ${{ inputs.product }} ${{ inputs.version-code }} from ${{ inputs.track-from }} to ${{ inputs.track-target }}"
on:
workflow_dispatch:
inputs:
product:
description: "Which app is being released."
type: choice
options:
- Password Manager
- Authenticator
version-code:
description: "Build number to promote to production."
required: true
type: number
rollout-percentage:
description: "Percentage of users who will receive this version update."
required: true
type: choice
options:
- 10%
- 30%
- 50%
- 100%
release-notes:
description: "Change notes to be included with this release."
type: string
required: true
track-from:
description: "Track to promote from."
type: string
required: true
default: "internal"
track-target:
description: "Track to promote to."
type: string
required: true
default: "Fastlane Automation Testing Source"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTION_RUN_URL: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
permissions:
contents: read
packages: read
jobs:
promote:
runs-on: ubuntu-24.04
name: Promote build to Production in Play Store
steps:
- name: Display Options
run: |
echo "product: ${{ inputs.product }}"
echo "version-code: ${{ inputs.version-code }}"
echo "rollout-percentage: ${{ inputs.rollout-percentage }}"
echo "release-notes: ${{ inputs.release-notes }}"
echo "track-from: ${{ inputs.track-from }}"
echo "track-target: ${{ inputs.track-target }}"
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Configure Ruby
uses: ruby/setup-ruby@ca041f971d66735f3e5ff1e21cc13e2d51e7e535 # v1.233.0
with:
bundler-cache: true
- name: Install Fastlane
run: |
gem install bundler:2.2.27
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Log in to Azure
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
with:
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
- name: Retrieve secrets
env:
ACCOUNT_NAME: bitwardenci
CONTAINER_NAME: mobile
run: |
mkdir -p ${{ github.workspace }}/secrets
mkdir -p ${{ github.workspace }}/app/src/standardRelease
az storage blob download --account-name $ACCOUNT_NAME --container-name $CONTAINER_NAME \
--name app_play-keystore.jks --file ${{ github.workspace }}/keystores/app_play-keystore.jks --output none
az storage blob download --account-name $ACCOUNT_NAME --container-name $CONTAINER_NAME \
--name app_upload-keystore.jks --file ${{ github.workspace }}/keystores/app_upload-keystore.jks --output none
az storage blob download --account-name $ACCOUNT_NAME --container-name $CONTAINER_NAME \
--name play_creds.json --file ${{ github.workspace }}/secrets/play_creds.json --output none
az storage blob download --account-name $ACCOUNT_NAME --container-name $CONTAINER_NAME \
--name app_beta_play-keystore.jks --file ${{ github.workspace }}/keystores/app_beta_play-keystore.jks --output none
az storage blob download --account-name $ACCOUNT_NAME --container-name $CONTAINER_NAME \
--name app_beta_upload-keystore.jks --file ${{ github.workspace }}/keystores/app_beta_upload-keystore.jks --output none
az storage blob download --account-name $ACCOUNT_NAME --container-name $CONTAINER_NAME \
--name google-services.json --file ${{ github.workspace }}/app/src/standardRelease/google-services.json --output none
- name: Format Release Notes
run: |
FORMATTED_MESSAGE="$( "${{ inputs.release-notes }}" | sed 's/ /\n/g')"
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
echo "$FORMATTED_MESSAGE" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Promote Play Store version to production
env:
PLAY_KEYSTORE_PASSWORD: ${{ secrets.PLAY_BETA_KEYSTORE_PASSWORD }}
PLAY_KEY_PASSWORD: ${{ secrets.PLAY_BETA_KEY_PASSWORD }}
VERSION_CODE: ${{ inputs.version-code }}
ROLLOUT_PERCENTAGE: ${{ inputs.rollout-percentage }}
PRODUCT: ${{ inputs.product }}
TRACK_FROM: ${{ inputs.track-from }}
TRACK_TARGET: ${{ inputs.track-target }}
run: |
if [ "$PRODUCT" = "Password Manager" ]; then
PACKAGE_NAME="com.x8bit.bitwarden"
elif [ "$PRODUCT" = "Authenticator" ]; then
PACKAGE_NAME="com.bitwarden.authenticator"
else
echo "Unsupported product: $PRODUCT"
exit 1
fi
decimal=$(echo "scale=2; ${ROLLOUT_PERCENTAGE/\%/} / 100" | bc)
bundle exec fastlane updateReleaseNotes \
releaseNotes:"$RELEASE_NOTES" \
versionCode:"$VERSION_CODE"
bundle exec fastlane promoteToProduction \
versionCode:"$VERSION_CODE" \
rolloutPercentage:$decimal \
packageName:"$PACKAGE_NAME"\
releaseNotes:"$RELEASE_NOTES"\
track:"$TRACK_FROM"\
trackPromoteTo:"$TRACK_TARGET"

View File

@@ -15,6 +15,7 @@ jobs:
check-run:
name: Check PR run
uses: bitwarden/gh-actions/.github/workflows/check-run.yml@main
permissions: read-all
sast:
name: SAST scan

16
.github/workflows/test-device.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
name: Test Device
on:
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Test Device
runs-on: ubuntu-24.04
steps:
- name: Placeholder step
run: echo "Placeholder workflow step"

View File

@@ -9,7 +9,7 @@ on:
pull_request:
types: [opened, synchronize]
merge_group:
type: [checks_requested]
types: [checks_requested]
workflow_dispatch:
env:
@@ -110,7 +110,7 @@ jobs:
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Uploading code coverage report failed. Please check the \"Upload to codecov.io\" step of \"Process Test Reports\" job for more details." >> $GITHUB_STEP_SUMMARY
if [ ! -z "$PR_NUMBER" ]; then
if [ -n "$PR_NUMBER" ]; then
message=$'> [!WARNING]\n> @'$RUN_ACTOR' Uploading code coverage report failed. Please check the "Upload to codecov.io" step of [Process Test Reports job]('$_GITHUB_ACTION_RUN_URL') for more details.'
gh pr comment --repo $GITHUB_REPOSITORY $PR_NUMBER --body "$message"
fi

View File

@@ -10,18 +10,18 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.2)
aws-partitions (1.1102.0)
aws-sdk-core (3.223.0)
aws-partitions (1.1107.0)
aws-sdk-core (3.224.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
base64
jmespath (~> 1, >= 1.6.1)
logger
aws-sdk-kms (1.100.0)
aws-sdk-kms (1.101.0)
aws-sdk-core (~> 3, >= 3.216.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.185.0)
aws-sdk-s3 (1.186.1)
aws-sdk-core (~> 3, >= 3.216.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
@@ -165,7 +165,7 @@ GEM
httpclient (2.9.0)
mutex_m
jmespath (1.6.2)
json (2.11.3)
json (2.12.2)
jwt (2.10.1)
base64
logger (1.7.0)

1
annotation/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

View File

@@ -0,0 +1,42 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}
android {
namespace = "com.bitwarden.annotation"
compileSdk = libs.versions.compileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.minSdkBwa.get().toInt()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}
compileOptions {
sourceCompatibility(libs.versions.jvmTarget.get())
targetCompatibility(libs.versions.jvmTarget.get())
}
@Suppress("UnstableApiUsage")
testFixtures {
enable = true
}
}
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jvmTarget.get()))
}
}

View File

@@ -1,4 +1,4 @@
package com.bitwarden.core.annotation
package com.bitwarden.annotation
/**
* Used to omit the annotated class from test coverage reporting. This should be used sparingly and

View File

@@ -213,6 +213,7 @@ dependencies {
implementation(files("libs/authenticatorbridge-1.0.1-release.aar"))
implementation(project(":annotation"))
implementation(project(":core"))
implementation(project(":data"))
implementation(project(":network"))

View File

@@ -37,15 +37,18 @@
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:intentMatchingFlags="enforceIntentFilter"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/LaunchTheme"
tools:ignore="CredentialDependency"
tools:replace="appComponentFactory"
tools:targetApi="33">
tools:targetApi="36">
<activity
android:name=".MainActivity"
android:configChanges="uiMode"
android:exported="true"
android:launchMode="@integer/launchModeAPIlevel"
android:theme="@style/LaunchTheme"

View File

@@ -1,28 +0,0 @@
package com.x8bit.bitwarden.data.auth.repository.model
import java.time.ZonedDateTime
/**
* Response types when checking for an email's claimed domain organization.
*/
sealed class OrganizationDomainSsoDetailsResult {
/**
* The request was successful.
*
* @property isSsoAvailable Indicates if SSO is available for the email address.
* @property organizationIdentifier The claimed organization identifier for the email address.
* @property verifiedDate The date and time when the domain was verified.
*/
data class Success(
val isSsoAvailable: Boolean,
val organizationIdentifier: String,
val verifiedDate: ZonedDateTime?,
) : OrganizationDomainSsoDetailsResult()
/**
* The request failed.
*/
data class Failure(
val error: Throwable,
) : OrganizationDomainSsoDetailsResult()
}

View File

@@ -1,31 +0,0 @@
package com.x8bit.bitwarden.ui.platform.util
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.TextStyle
/**
* Creates a new [SpanStyle] from the specified [color] and [textStyle].
*/
fun spanStyleOf(
color: Color,
textStyle: TextStyle,
): SpanStyle =
SpanStyle(
color = color,
fontSize = textStyle.fontSize,
fontWeight = textStyle.fontWeight,
fontStyle = textStyle.fontStyle,
fontSynthesis = textStyle.fontSynthesis,
fontFamily = textStyle.fontFamily,
fontFeatureSettings = textStyle.fontFeatureSettings,
letterSpacing = textStyle.letterSpacing,
baselineShift = textStyle.baselineShift,
textGeometricTransform = textStyle.textGeometricTransform,
localeList = textStyle.localeList,
background = textStyle.background,
textDecoration = textStyle.textDecoration,
shadow = textStyle.shadow,
platformStyle = textStyle.platformStyle?.spanStyle,
drawStyle = textStyle.drawStyle,
)

View File

@@ -1,90 +0,0 @@
package com.x8bit.bitwarden.ui.tools.feature.send.addsend
import androidx.lifecycle.SavedStateHandle
import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavOptions
import androidx.navigation.toRoute
import com.bitwarden.ui.platform.base.util.composableWithSlideTransitions
import com.x8bit.bitwarden.ui.tools.feature.send.addsend.model.AddSendType
import kotlinx.serialization.Serializable
/**
* The type-safe route for the add send screen.
*/
@Serializable
data class AddSendRoute(
val type: ModeType,
val editSendId: String?,
)
/**
* Indicates the mode of send to be displayed.
*/
@Serializable
enum class ModeType {
ADD,
EDIT,
}
/**
* Class to retrieve send add & edit arguments from the [SavedStateHandle].
*/
data class AddSendArgs(
val sendAddType: AddSendType,
)
/**
* Constructs a [AddSendArgs] from the [SavedStateHandle] and internal route data.
*/
fun SavedStateHandle.toAddSendArgs(): AddSendArgs {
val route = this.toRoute<AddSendRoute>()
return AddSendArgs(
sendAddType = when (route.type) {
ModeType.ADD -> AddSendType.AddItem
ModeType.EDIT -> AddSendType.EditItem(sendItemId = requireNotNull(route.editSendId))
},
)
}
private fun SavedStateHandle.toAddSendType(): AddSendType {
val route = this.toRoute<AddSendRoute>()
return when (route.type) {
ModeType.ADD -> AddSendType.AddItem
ModeType.EDIT -> AddSendType.EditItem(sendItemId = requireNotNull(route.editSendId))
}
}
/**
* Add the new send screen to the nav graph.
*/
fun NavGraphBuilder.addSendDestination(
onNavigateBack: () -> Unit,
onNavigateUpToRoot: () -> Unit,
) {
composableWithSlideTransitions<AddSendRoute> {
AddSendScreen(
onNavigateBack = onNavigateBack,
onNavigateUpToRoot = onNavigateUpToRoot,
)
}
}
/**
* Navigate to the new send screen.
*/
fun NavController.navigateToAddSend(
sendAddType: AddSendType,
navOptions: NavOptions? = null,
) {
this.navigate(
route = AddSendRoute(
type = when (sendAddType) {
AddSendType.AddItem -> ModeType.ADD
is AddSendType.EditItem -> ModeType.EDIT
},
editSendId = (sendAddType as? AddSendType.EditItem)?.sendItemId,
),
navOptions = navOptions,
)
}

View File

@@ -1,64 +0,0 @@
package com.x8bit.bitwarden.ui.tools.feature.send.addsend.handlers
import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager
import com.x8bit.bitwarden.ui.tools.feature.send.addsend.AddSendAction
import com.x8bit.bitwarden.ui.tools.feature.send.addsend.AddSendViewModel
import java.time.ZonedDateTime
/**
* A collection of handler functions for managing actions within the context of adding
* send items.
*/
data class AddSendHandlers(
val onNameChange: (String) -> Unit,
val onFileTypeSelect: () -> Unit,
val onTextTypeSelect: () -> Unit,
val onChooseFileClick: (hasPermission: Boolean) -> Unit,
val onFileChoose: (IntentManager.FileData) -> Unit,
val onTextChange: (String) -> Unit,
val onIsHideByDefaultToggle: (Boolean) -> Unit,
val onMaxAccessCountChange: (Int) -> Unit,
val onPasswordChange: (String) -> Unit,
val onNoteChange: (String) -> Unit,
val onHideEmailToggle: (Boolean) -> Unit,
val onDeactivateSendToggle: (Boolean) -> Unit,
val onDeletionDateChange: (ZonedDateTime) -> Unit,
val onDeleteClick: () -> Unit,
) {
@Suppress("UndocumentedPublicClass")
companion object {
/**
* Creates an instance of [AddSendHandlers] by binding actions to the provided
* [AddSendViewModel].
*/
fun create(
viewModel: AddSendViewModel,
): AddSendHandlers =
AddSendHandlers(
onNameChange = { viewModel.trySendAction(AddSendAction.NameChange(it)) },
onFileTypeSelect = { viewModel.trySendAction(AddSendAction.FileTypeClick) },
onTextTypeSelect = { viewModel.trySendAction(AddSendAction.TextTypeClick) },
onChooseFileClick = { viewModel.trySendAction(AddSendAction.ChooseFileClick(it)) },
onFileChoose = { viewModel.trySendAction(AddSendAction.FileChoose(it)) },
onTextChange = { viewModel.trySendAction(AddSendAction.TextChange(it)) },
onIsHideByDefaultToggle = {
viewModel.trySendAction(AddSendAction.HideByDefaultToggle(it))
},
onMaxAccessCountChange = {
viewModel.trySendAction(AddSendAction.MaxAccessCountChange(it))
},
onPasswordChange = { viewModel.trySendAction(AddSendAction.PasswordChange(it)) },
onNoteChange = { viewModel.trySendAction(AddSendAction.NoteChange(it)) },
onHideEmailToggle = {
viewModel.trySendAction(AddSendAction.HideMyEmailToggle(it))
},
onDeactivateSendToggle = {
viewModel.trySendAction(AddSendAction.DeactivateThisSendToggle(it))
},
onDeletionDateChange = {
viewModel.trySendAction(AddSendAction.DeletionDateChange(it))
},
onDeleteClick = { viewModel.trySendAction(AddSendAction.DeleteClick) },
)
}
}

View File

@@ -2,7 +2,7 @@ package com.x8bit.bitwarden
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.bitwarden.core.annotation.OmitFromCoverage
import com.bitwarden.annotation.OmitFromCoverage
/**
* An activity to be launched and then immediately closed so that the OS Shade can be collapsed

View File

@@ -4,7 +4,7 @@ import android.content.Intent
import android.os.Bundle
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import com.bitwarden.core.annotation.OmitFromCoverage
import com.bitwarden.annotation.OmitFromCoverage
import dagger.hilt.android.AndroidEntryPoint
/**

View File

@@ -4,7 +4,7 @@ import android.os.Bundle
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import com.bitwarden.core.annotation.OmitFromCoverage
import com.bitwarden.annotation.OmitFromCoverage
import com.x8bit.bitwarden.data.autofill.manager.AutofillCompletionManager
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.flow.launchIn

View File

@@ -5,7 +5,7 @@ import android.content.Intent
import android.os.Build
import androidx.annotation.Keep
import androidx.core.app.AppComponentFactory
import com.bitwarden.core.annotation.OmitFromCoverage
import com.bitwarden.annotation.OmitFromCoverage
import com.x8bit.bitwarden.data.autofill.BitwardenAutofillService
import com.x8bit.bitwarden.data.autofill.accessibility.BitwardenAccessibilityService
import com.x8bit.bitwarden.data.credentials.BitwardenCredentialProviderService

View File

@@ -1,7 +1,7 @@
package com.x8bit.bitwarden
import android.app.Application
import com.bitwarden.core.annotation.OmitFromCoverage
import com.bitwarden.annotation.OmitFromCoverage
import com.x8bit.bitwarden.data.auth.manager.AuthRequestNotificationManager
import com.x8bit.bitwarden.data.platform.manager.LogsManager
import com.x8bit.bitwarden.data.platform.manager.event.OrganizationEventManager

View File

@@ -11,15 +11,18 @@ import androidx.activity.compose.setContent
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.core.os.LocaleListCompat
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.navigation.NavController
import androidx.navigation.compose.NavHost
import com.bitwarden.core.annotation.OmitFromCoverage
import com.bitwarden.annotation.OmitFromCoverage
import com.bitwarden.ui.platform.base.util.EventsEffect
import com.bitwarden.ui.platform.theme.BitwardenTheme
import com.bitwarden.ui.platform.util.setupEdgeToEdge
import com.x8bit.bitwarden.data.autofill.accessibility.manager.AccessibilityCompletionManager
import com.x8bit.bitwarden.data.autofill.manager.AutofillActivityManager
import com.x8bit.bitwarden.data.autofill.manager.AutofillCompletionManager
@@ -35,6 +38,7 @@ import com.x8bit.bitwarden.ui.platform.feature.rootnav.rootNavDestination
import com.x8bit.bitwarden.ui.platform.feature.settings.appearance.model.AppLanguage
import com.x8bit.bitwarden.ui.platform.util.appLanguage
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.flow.map
import javax.inject.Inject
/**
@@ -62,66 +66,29 @@ class MainActivity : AppCompatActivity() {
@Inject
lateinit var debugLaunchManager: DebugMenuLaunchManager
@Suppress("LongMethod")
override fun onCreate(savedInstanceState: Bundle?) {
var shouldShowSplashScreen = true
installSplashScreen().setKeepOnScreenCondition { shouldShowSplashScreen }
super.onCreate(savedInstanceState)
if (savedInstanceState == null) {
mainViewModel.trySendAction(
MainAction.ReceiveFirstIntent(
intent = intent,
),
)
mainViewModel.trySendAction(MainAction.ReceiveFirstIntent(intent = intent))
}
// Within the app the theme will change dynamically and will be managed by the
// OS, but we need to ensure we properly set the values when upgrading from older versions
// that handle this differently or when the activity restarts.
AppCompatDelegate.setDefaultNightMode(settingsRepository.appTheme.osValue)
setupEdgeToEdge(appThemeFlow = mainViewModel.stateFlow.map { it.theme })
setContent {
val state by mainViewModel.stateFlow.collectAsStateWithLifecycle()
val navController = rememberBitwardenNavController(name = "MainActivity")
EventsEffect(viewModel = mainViewModel) { event ->
when (event) {
is MainEvent.CompleteAccessibilityAutofill -> {
handleCompleteAccessibilityAutofill(event)
}
is MainEvent.CompleteAutofill -> handleCompleteAutofill(event)
MainEvent.Recreate -> handleRecreate()
MainEvent.NavigateToDebugMenu -> navController.navigateToDebugMenuScreen()
is MainEvent.ShowToast -> {
Toast
.makeText(
baseContext,
event.message.invoke(resources),
Toast.LENGTH_SHORT,
)
.show()
}
is MainEvent.UpdateAppLocale -> {
AppCompatDelegate.setApplicationLocales(
LocaleListCompat.forLanguageTags(event.localeName),
)
}
is MainEvent.UpdateAppTheme -> {
AppCompatDelegate.setDefaultNightMode(event.osTheme)
}
}
}
SetupEventsEffect(navController = navController)
val state by mainViewModel.stateFlow.collectAsStateWithLifecycle()
updateScreenCapture(isScreenCaptureAllowed = state.isScreenCaptureAllowed)
LocalManagerProvider(featureFlagsState = state.featureFlagsState) {
ObserveScreenDataEffect(
onDataUpdate = remember(mainViewModel) {
{
mainViewModel.trySendAction(
MainAction.ResumeScreenDataReceived(it),
)
}
{ mainViewModel.trySendAction(MainAction.ResumeScreenDataReceived(it)) }
},
)
BitwardenTheme(
@@ -148,11 +115,7 @@ class MainActivity : AppCompatActivity() {
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
mainViewModel.trySendAction(
action = MainAction.ReceiveNewIntent(
intent = intent,
),
)
mainViewModel.trySendAction(action = MainAction.ReceiveNewIntent(intent = intent))
}
override fun onResume() {
@@ -199,6 +162,34 @@ class MainActivity : AppCompatActivity() {
.takeIf { it }
?: super.dispatchKeyEvent(event)
@Composable
private fun SetupEventsEffect(navController: NavController) {
EventsEffect(viewModel = mainViewModel) { event ->
when (event) {
is MainEvent.CompleteAccessibilityAutofill -> {
handleCompleteAccessibilityAutofill(event)
}
is MainEvent.CompleteAutofill -> handleCompleteAutofill(event)
MainEvent.Recreate -> handleRecreate()
MainEvent.NavigateToDebugMenu -> navController.navigateToDebugMenuScreen()
is MainEvent.ShowToast -> {
Toast
.makeText(baseContext, event.message.invoke(resources), Toast.LENGTH_SHORT)
.show()
}
is MainEvent.UpdateAppLocale -> {
AppCompatDelegate.setApplicationLocales(
LocaleListCompat.forLanguageTags(event.localeName),
)
}
is MainEvent.UpdateAppTheme -> AppCompatDelegate.setDefaultNightMode(event.osTheme)
}
}
}
private fun sendOpenDebugMenuEvent() {
mainViewModel.trySendAction(MainAction.OpenDebugMenu)
}

View File

@@ -7,7 +7,7 @@ import androidx.compose.ui.graphics.Color
import androidx.core.app.NotificationChannelCompat
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import com.bitwarden.core.annotation.OmitFromCoverage
import com.bitwarden.annotation.OmitFromCoverage
import com.bitwarden.data.manager.DispatcherManager
import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.data.auth.datasource.disk.AuthDiskSource

View File

@@ -15,7 +15,6 @@ import com.x8bit.bitwarden.data.auth.repository.model.LeaveOrganizationResult
import com.x8bit.bitwarden.data.auth.repository.model.LoginResult
import com.x8bit.bitwarden.data.auth.repository.model.LogoutReason
import com.x8bit.bitwarden.data.auth.repository.model.NewSsoUserResult
import com.x8bit.bitwarden.data.auth.repository.model.OrganizationDomainSsoDetailsResult
import com.x8bit.bitwarden.data.auth.repository.model.PasswordHintResult
import com.x8bit.bitwarden.data.auth.repository.model.PasswordStrengthResult
import com.x8bit.bitwarden.data.auth.repository.model.PolicyInformation
@@ -353,13 +352,6 @@ interface AuthRepository : AuthenticatorProvider, AuthRequestManager {
*/
fun setWebAuthResult(webAuthResult: WebAuthResult)
/**
* Checks for a claimed domain organization for the [email] that can be used for an SSO request.
*/
suspend fun getOrganizationDomainSsoDetails(
email: String,
): OrganizationDomainSsoDetailsResult
/**
* Get the verified organization domain SSO details for the given [email].
*/

View File

@@ -65,7 +65,6 @@ import com.x8bit.bitwarden.data.auth.repository.model.LeaveOrganizationResult
import com.x8bit.bitwarden.data.auth.repository.model.LoginResult
import com.x8bit.bitwarden.data.auth.repository.model.LogoutReason
import com.x8bit.bitwarden.data.auth.repository.model.NewSsoUserResult
import com.x8bit.bitwarden.data.auth.repository.model.OrganizationDomainSsoDetailsResult
import com.x8bit.bitwarden.data.auth.repository.model.PasswordHintResult
import com.x8bit.bitwarden.data.auth.repository.model.PasswordStrengthResult
import com.x8bit.bitwarden.data.auth.repository.model.PolicyInformation
@@ -112,7 +111,6 @@ import com.x8bit.bitwarden.data.auth.util.YubiKeyResult
import com.x8bit.bitwarden.data.auth.util.toSdkParams
import com.x8bit.bitwarden.data.platform.error.MissingPropertyException
import com.x8bit.bitwarden.data.platform.error.NoActiveUserException
import com.x8bit.bitwarden.data.platform.manager.FeatureFlagManager
import com.x8bit.bitwarden.data.platform.manager.FirstTimeActionManager
import com.x8bit.bitwarden.data.platform.manager.LogsManager
import com.x8bit.bitwarden.data.platform.manager.PolicyManager
@@ -173,7 +171,6 @@ class AuthRepositoryImpl(
private val trustedDeviceManager: TrustedDeviceManager,
private val userLogoutManager: UserLogoutManager,
private val policyManager: PolicyManager,
private val featureFlagManager: FeatureFlagManager,
firstTimeActionManager: FirstTimeActionManager,
logsManager: LogsManager,
pushManager: PushManager,
@@ -1201,23 +1198,6 @@ class AuthRepositoryImpl(
webAuthResultChannel.trySend(webAuthResult)
}
override suspend fun getOrganizationDomainSsoDetails(
email: String,
): OrganizationDomainSsoDetailsResult = organizationService
.getOrganizationDomainSsoDetails(
email = email,
)
.fold(
onSuccess = {
OrganizationDomainSsoDetailsResult.Success(
isSsoAvailable = it.isSsoAvailable,
organizationIdentifier = it.organizationIdentifier,
verifiedDate = it.verifiedDate,
)
},
onFailure = { OrganizationDomainSsoDetailsResult.Failure(error = it) },
)
override suspend fun getVerifiedOrganizationDomainSsoDetails(
email: String,
): VerifiedOrganizationDomainSsoDetailsResult = organizationService

View File

@@ -15,7 +15,6 @@ import com.x8bit.bitwarden.data.auth.manager.TrustedDeviceManager
import com.x8bit.bitwarden.data.auth.manager.UserLogoutManager
import com.x8bit.bitwarden.data.auth.repository.AuthRepository
import com.x8bit.bitwarden.data.auth.repository.AuthRepositoryImpl
import com.x8bit.bitwarden.data.platform.manager.FeatureFlagManager
import com.x8bit.bitwarden.data.platform.manager.FirstTimeActionManager
import com.x8bit.bitwarden.data.platform.manager.LogsManager
import com.x8bit.bitwarden.data.platform.manager.PolicyManager
@@ -59,7 +58,6 @@ object AuthRepositoryModule {
userLogoutManager: UserLogoutManager,
pushManager: PushManager,
policyManager: PolicyManager,
featureFlagManager: FeatureFlagManager,
firstTimeActionManager: FirstTimeActionManager,
logsManager: LogsManager,
): AuthRepository = AuthRepositoryImpl(
@@ -82,7 +80,6 @@ object AuthRepositoryModule {
userLogoutManager = userLogoutManager,
pushManager = pushManager,
policyManager = policyManager,
featureFlagManager = featureFlagManager,
firstTimeActionManager = firstTimeActionManager,
logsManager = logsManager,
)

View File

@@ -12,6 +12,8 @@ import com.bitwarden.network.model.OrganizationType
* @property shouldUseKeyConnector Indicates that the organization uses a key connector.
* @property role The user's role in the organization.
* @property keyConnectorUrl The key connector domain (if applicable).
* @property userIsClaimedByOrganization Indicates that the user is claimed by the organization.
* @property limitItemDeletion Indicates that the organization limits item deletion.
*/
data class Organization(
val id: String,
@@ -21,4 +23,5 @@ data class Organization(
val role: OrganizationType,
val keyConnectorUrl: String?,
val userIsClaimedByOrganization: Boolean,
val limitItemDeletion: Boolean = false,
)

Some files were not shown because too many files have changed in this diff Show More