1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-10 21:33:36 +00:00

Compare commits

..

7 Commits

9 changed files with 61 additions and 54 deletions

View File

@@ -65,6 +65,7 @@ jobs:
description: 'Deployment ${{ steps.version.outputs.version }} from branch ${{ steps.branch.outputs.branch-name }}' description: 'Deployment ${{ steps.version.outputs.version }} from branch ${{ steps.branch.outputs.branch-name }}'
task: release task: release
- name: Download all artifacts - name: Download all artifacts
if: ${{ inputs.release_type != 'Dry Run' }} if: ${{ inputs.release_type != 'Dry Run' }}
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4 uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4
@@ -151,7 +152,9 @@ jobs:
node-version: '16.x' node-version: '16.x'
- name: Set up F-Droid server - name: Set up F-Droid server
run: pip install git+https://gitlab.com/fdroid/fdroidserver.git run: |
sudo apt-get -qq update
sudo apt-get -qqy install --no-install-recommends fdroidserver wget
- name: Set up Git credentials - name: Set up Git credentials
env: env:
@@ -164,10 +167,9 @@ jobs:
- name: Print environment - name: Print environment
run: | run: |
echo "Node Version: $(node --version)" node --version
echo "NPM Version: $(npm --version)" npm --version
echo "Git Version: $(git --version)" git --version
echo "F-Droid Server Version: $(fdroid --version)"
echo "GitHub ref: $GITHUB_REF" echo "GitHub ref: $GITHUB_REF"
echo "GitHub event: $GITHUB_EVENT" echo "GitHub event: $GITHUB_EVENT"
@@ -192,30 +194,27 @@ jobs:
env: env:
FDROID_STORE_KEYSTORE_PASSWORD: ${{ secrets.FDROID_STORE_KEYSTORE_PASSWORD }} FDROID_STORE_KEYSTORE_PASSWORD: ${{ secrets.FDROID_STORE_KEYSTORE_PASSWORD }}
run: | run: |
# Create required directories. cd $GITHUB_WORKSPACE
mkdir dist mkdir dist
mkdir -p store/temp/fdroid cp CNAME ./dist
mkdir -p store/fdroid/repo cd store
chmod 600 fdroid/config.py fdroid/keystore.jks
# Configure F-Droid server. mkdir -p temp/fdroid
cp CNAME dist/
chmod 600 store/fdroid/config.yml store/fdroid/keystore.jks
TEMP_DIR="$GITHUB_WORKSPACE/store/temp/fdroid" TEMP_DIR="$GITHUB_WORKSPACE/store/temp/fdroid"
echo "keypass: $FDROID_STORE_KEYSTORE_PASSWORD" >> store/fdroid/config.yml cd fdroid
echo "keystorepass: $FDROID_STORE_KEYSTORE_PASSWORD" >> store/fdroid/config.yml echo "keypass=\"$FDROID_STORE_KEYSTORE_PASSWORD\"" >>config.py
echo "local_copy_dir: $TEMP_DIR" >> store/fdroid/config.yml echo "keystorepass=\"$FDROID_STORE_KEYSTORE_PASSWORD\"" >>config.py
mv $GITHUB_WORKSPACE/com.x8bit.bitwarden-fdroid.apk store/fdroid/repo/ echo "local_copy_dir=\"$TEMP_DIR\"" >>config.py
mkdir -p repo
# Run update and deploy. mv $GITHUB_WORKSPACE/com.x8bit.bitwarden-fdroid.apk ./repo/
cd store/fdroid
fdroid update fdroid update
fdroid deploy fdroid server update
cd ../.. cd ..
rm -rf temp/fdroid/archive
# Move files for distribution. mv -v temp/fdroid ../dist
rm -rf store/temp/fdroid/archive cd fdroid
mv -v store/temp/fdroid dist cp index.html btn.png qr.png ../../dist/fdroid
cp store/fdroid/index.html store/fdroid/btn.png store/fdroid/qr.png dist/fdroid cd $GITHUB_WORKSPACE
- name: Deploy to gh-pages - name: Deploy to gh-pages
if: ${{ inputs.release_type != 'Dry Run' }} if: ${{ inputs.release_type != 'Dry Run' }}

View File

@@ -24,7 +24,7 @@
<meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" /> <meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable" android:value="true" />
<!-- Support for LG "Dual Window" mode (for Android < 7.0 users) --> <!-- Support for LG "Dual Window" mode (for Android < 7.0 users) -->
<meta-data android:name="com.lge.support.SPLIT_WINDOW" android:value="true" /> <meta-data android:name="com.lge.support.SPLIT_WINDOW" android:value="true" />
<!-- Declare MainActivity manually so we can set LaunchMode using API dependant resource --> <!-- Declare exported activities manually so we can set LaunchMode using API dependant resource -->
<activity android:name="com.x8bit.bitwarden.MainActivity" android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenSize|uiMode" android:exported="true" android:icon="@mipmap/ic_launcher" android:label="Bitwarden" android:launchMode="@integer/launchModeAPIlevel" android:theme="@style/LaunchTheme"> <activity android:name="com.x8bit.bitwarden.MainActivity" android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenSize|uiMode" android:exported="true" android:icon="@mipmap/ic_launcher" android:label="Bitwarden" android:launchMode="@integer/launchModeAPIlevel" android:theme="@style/LaunchTheme">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -39,6 +39,14 @@
<data android:mimeType="text/*" /> <data android:mimeType="text/*" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name="com.x8bit.bitwarden.WebAuthCallbackActivity" android:launchMode="@integer/webAuthCallbackLaunchMode" android:noHistory="true" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="bitwarden" />
</intent-filter>
</activity>
</application> </application>
<!-- Support for Xamarin.Essentials.Browser.OpenAsync (for Android > 11) --> <!-- Support for Xamarin.Essentials.Browser.OpenAsync (for Android > 11) -->
<!-- Related docs: https://learn.microsoft.com/en-us/xamarin/essentials/open-browser?tabs=android --> <!-- Related docs: https://learn.microsoft.com/en-us/xamarin/essentials/open-browser?tabs=android -->

View File

@@ -10,7 +10,8 @@ namespace Bit.Droid.Autofill
{ {
[Activity( [Activity(
NoHistory = true, NoHistory = true,
LaunchMode = LaunchMode.SingleTop)] LaunchMode = LaunchMode.SingleTop,
Exported = false)]
public class AutofillExternalSelectionActivity : MauiAppCompatActivity public class AutofillExternalSelectionActivity : MauiAppCompatActivity
{ {
protected override void OnCreate(Bundle bundle) protected override void OnCreate(Bundle bundle)

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<resources> <resources>
<integer name="launchModeAPIlevel">0</integer> <integer name="launchModeAPIlevel">0</integer>
<integer name="webAuthCallbackLaunchMode">1</integer>
</resources> </resources>

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<resources> <resources>
<integer name="launchModeAPIlevel">2</integer> <integer name="launchModeAPIlevel">2</integer>
<integer name="webAuthCallbackLaunchMode">3</integer>
</resources> </resources>

View File

@@ -1,17 +1,12 @@
using Android.App; using Android.App;
using Android.Content.PM; using Android.Content.PM;
using Android.OS; using Android.OS;
using Android.Runtime;
using Bit.App.Droid.Utilities; using Bit.App.Droid.Utilities;
namespace Bit.Droid namespace Bit.Droid
{ {
[Activity( [Register("com.x8bit.bitwarden.WebAuthCallbackActivity")]
NoHistory = true,
LaunchMode = LaunchMode.SingleTop,
Exported = true)]
[IntentFilter(new[] { Android.Content.Intent.ActionView },
Categories = new[] { Android.Content.Intent.CategoryDefault, Android.Content.Intent.CategoryBrowsable },
DataScheme = "bitwarden")]
public class WebAuthCallbackActivity : WebAuthenticatorCallbackActivity public class WebAuthCallbackActivity : WebAuthenticatorCallbackActivity
{ {
protected override void OnCreate(Bundle savedInstanceState) protected override void OnCreate(Bundle savedInstanceState)

View File

@@ -699,7 +699,7 @@ namespace Bit.iOS.Autofill
{ {
var appOptions = new AppOptions { IosExtension = true }; var appOptions = new AppOptions { IosExtension = true };
var twoFactorPage = new TwoFactorPage(authingWithSso, appOptions); var twoFactorPage = new TwoFactorPage(authingWithSso, appOptions);
var app = new App.App(appOptions); var app = new App.App();
ThemeManager.SetTheme(app.Resources); ThemeManager.SetTheme(app.Resources);
ThemeManager.ApplyResourcesTo(twoFactorPage); ThemeManager.ApplyResourcesTo(twoFactorPage);
if (twoFactorPage.BindingContext is TwoFactorPageViewModel vm) if (twoFactorPage.BindingContext is TwoFactorPageViewModel vm)

20
store/fdroid/config.py Normal file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env python3
repo_url = "https://mobileapp.bitwarden.com/fdroid/repo"
repo_name = "Bitwarden F-Droid Repo"
repo_icon = "fdroid-icon.png"
repo_description = """
F-Droid repo for Bitwarden.
"""
archive_older = 2
archive_url = "https://does.not.exist"
archive_name = "Bitwarden Archive Repo"
archive_icon = "fdroid-icon.png"
archive_description = """
F-Droid archive repo for Bitwarden.
"""
repo_keyalias = "bitwarden-Virtual-Machine"
keystore = "keystore.jks"
keydname = "CN=bitwarden-Virtual-Machine, OU=F-Droid"

View File

@@ -1,18 +0,0 @@
---
repo_url: https://mobileapp.bitwarden.com/fdroid/repo
repo_name: Bitwarden F-Droid Repo
repo_icon: fdroid-icon.png
repo_description: >-
F-Droid repo for Bitwarden.
archive_older: 2
archive_url: https://does.not.exist/archive
archive_name: Bitwarden Archive Repo
archive_icon: fdroid-icon.png
archive_description: >-
F-Droid archive repo for Bitwarden.
repo_keyalias: bitwarden-Virtual-Machine
keystore: keystore.jks
keydname: CN=bitwarden-Virtual-Machine, OU=F-Droid