Skip to content

Commit

Permalink
Merge pull request #185 from lambiengcode/fix/e2ee
Browse files Browse the repository at this point in the history
fix(e2ee): allow enable/disable e2ee, fix wrong state of video/audio/e2ee
  • Loading branch information
lambiengcode committed Nov 5, 2023
2 parents e7b6b41 + a240cbf commit b601232
Show file tree
Hide file tree
Showing 16 changed files with 230 additions and 90 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
test:
name: Analyze
name: 🛠 Analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand All @@ -25,6 +25,7 @@ jobs:
with:
flutter-version: "3.13.9"
cache: true
- run: flutter clean
- run: flutter pub get
- run: flutter analyze
- run: dart pub global activate very_good_cli
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![codecov](https://codecov.io/gh/lambiengcode/waterbus/branch/main/graph/badge.svg?token=7KEMH26LHZ)](https://codecov.io/gh/lambiengcode/waterbus)[![libwebrtc](https://img.shields.io/badge/libwebrtc-119.6045.03-blue.svg)](https://chromium.googlesource.com/external/webrtc/+/branch-heads/6045)
[![codecov](https://codecov.io/gh/lambiengcode/waterbus/branch/main/graph/badge.svg?token=7KEMH26LHZ)](https://codecov.io/gh/lambiengcode/waterbus)[![libwebrtc](https://img.shields.io/badge/libwebrtc-120.6099.01-blue.svg)](https://chromium.googlesource.com/external/webrtc/+/branch-heads/6099)![Cocoapods Version](https://img.shields.io/cocoapods/v/KaiRTC)
[![Twitter Follow](https://img.shields.io/twitter/follow/waterbus.tech?style=social)](https://twitter.com/lambiengcode)[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat&logo=github)](https://github.com/lambiengcode)

<img src="./screenshots/banner.png" width="100%"/>
Expand Down
24 changes: 19 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ android {
compileSdkVersion 33

compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true

sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand All @@ -63,6 +60,12 @@ android {
vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']

multiDexEnabled true

javaCompileOptions {
annotationProcessorOptions {
arguments = ["android.largeMemoryClass": "512"]
}
}
}

signingConfigs {
Expand All @@ -75,6 +78,18 @@ android {
}

buildTypes {
debug {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
debuggable true // make app non-debuggable
crunchPngs true // shrink images
minifyEnabled true // obfuscate code and remove unused code
shrinkResources true
multiDexEnabled true
}

release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
Expand Down Expand Up @@ -104,8 +119,7 @@ dependencies {
implementation platform('com.google.firebase:firebase-bom:32.4.1')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-messaging-directboot:23.3.1'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
implementation 'com.android.support:multidex:1.0.3'
implementation "androidx.multidex:multidex:2.0.1"
}

apply plugin: 'com.google.gms.google-services'
8 changes: 8 additions & 0 deletions android/app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
}
},
"oauth_client": [
{
"client_id": "727554668212-0atr2d89gbvglssrglqvnlfcesj4gp96.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.waterbus.wanted",
"certificate_hash": "4746a170a0a1820f23c88f49b353db39cb435fa7"
}
},
{
"client_id": "727554668212-0sgec37ism3qdfocks8q0k24ruh3gh4d.apps.googleusercontent.com",
"client_type": 1,
Expand Down
2 changes: 2 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-keep class com.waterbus.** { *; }

## Flutter wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
Expand Down
47 changes: 46 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,57 @@
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />

<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>

<queries>
<provider android:authorities="com.facebook.katana.provider.PlatformProvider"
android:exported="false" />

<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>

<package android:name="com.facebook.katana" />
</queries>

<application
android:largeHeap="true"
android:label="Waterbus"
android:name="${applicationName}"
android:icon="@mipmap/launcher_icon"
android:usesCleartextTraffic="true"
android:hardwareAccelerated="true">
android:hardwareAccelerated="true"
android:allowBackup="true"
tools:replace="android:label">
<meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled"
android:value="false"/>
<meta-data android:name="com.facebook.sdk.AdvertiserIDCollectionEnabled"
android:value="false"/>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
<meta-data
android:name="com.facebook.sdk.ClientToken"
android:value="@string/facebook_client_token" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:exported="true"
android:label="@string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
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="@string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
7 changes: 7 additions & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Waterbus</string>
<string name="facebook_app_id">989363838888620</string>
<string name="fb_login_protocol_scheme">fb989363838888620</string>
<string name="facebook_client_token">31eb9fca6bd344110ad109ca6d8af68f</string>
</resources>
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8.fullMode=false
76 changes: 40 additions & 36 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ PODS:
- Firebase/Performance (= 10.16.0)
- firebase_core
- Flutter
- FirebaseABTesting (10.16.0):
- FirebaseABTesting (10.17.0):
- FirebaseCore (~> 10.0)
- FirebaseAppCheckInterop (10.16.0)
- FirebaseAppCheckInterop (10.17.0)
- FirebaseAuth (10.16.0):
- FirebaseAppCheckInterop (~> 10.0)
- FirebaseCore (~> 10.0)
Expand All @@ -65,9 +65,9 @@ PODS:
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Logger (~> 7.8)
- FirebaseCoreExtension (10.16.0):
- FirebaseCoreExtension (10.17.0):
- FirebaseCore (~> 10.0)
- FirebaseCoreInternal (10.16.0):
- FirebaseCoreInternal (10.17.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseCrashlytics (10.16.0):
- FirebaseCore (~> 10.5)
Expand All @@ -77,7 +77,7 @@ PODS:
- GoogleUtilities/Environment (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (~> 2.1)
- FirebaseInstallations (10.16.0):
- FirebaseInstallations (10.17.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
Expand All @@ -101,20 +101,22 @@ PODS:
- GoogleUtilities/ISASwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseRemoteConfig (10.16.0):
- FirebaseRemoteConfig (10.17.0):
- FirebaseABTesting (~> 10.0)
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- FirebaseSharedSwift (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseSessions (10.16.0):
- FirebaseSessions (10.17.0):
- FirebaseCore (~> 10.5)
- FirebaseCoreExtension (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleDataTransport (~> 9.2)
- GoogleUtilities/Environment (~> 7.10)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesSwift (~> 2.1)
- FirebaseSharedSwift (10.17.0)
- Flutter (1.0.0)
- flutter_facebook_auth (6.0.1):
- FBSDKLoginKit (~> 16.1.3)
Expand All @@ -130,7 +132,7 @@ PODS:
- Flutter
- flutter_webrtc (0.9.36):
- Flutter
- KaiRTC (= 119.6045.03)
- KaiRTC (= 120.6099.01)
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
Expand All @@ -145,33 +147,33 @@ PODS:
- AppAuth (~> 1.5)
- GTMAppAuth (~> 1.3)
- GTMSessionFetcher/Core (< 3.0, >= 1.1)
- GoogleUtilities/AppDelegateSwizzler (7.11.5):
- GoogleUtilities/AppDelegateSwizzler (7.11.6):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.11.5):
- GoogleUtilities/Environment (7.11.6):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/ISASwizzler (7.11.5)
- GoogleUtilities/Logger (7.11.5):
- GoogleUtilities/ISASwizzler (7.11.6)
- GoogleUtilities/Logger (7.11.6):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (7.11.5):
- GoogleUtilities/MethodSwizzler (7.11.6):
- GoogleUtilities/Logger
- GoogleUtilities/Network (7.11.5):
- GoogleUtilities/Network (7.11.6):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.11.5)"
- GoogleUtilities/Reachability (7.11.5):
- "GoogleUtilities/NSData+zlib (7.11.6)"
- GoogleUtilities/Reachability (7.11.6):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.11.5):
- GoogleUtilities/UserDefaults (7.11.6):
- GoogleUtilities/Logger
- GTMAppAuth (1.3.1):
- AppAuth/Core (~> 1.6)
- GTMSessionFetcher/Core (< 3.0, >= 1.5)
- GTMSessionFetcher/Core (2.3.0)
- image_picker_ios (0.0.1):
- Flutter
- KaiRTC (119.6045.03)
- KaiRTC (120.6099.01)
- libwebp (1.3.2):
- libwebp/demux (= 1.3.2)
- libwebp/mux (= 1.3.2)
Expand All @@ -187,11 +189,11 @@ PODS:
- Mantle (2.2.0):
- Mantle/extobjc (= 2.2.0)
- Mantle/extobjc (2.2.0)
- nanopb (2.30909.0):
- nanopb/decode (= 2.30909.0)
- nanopb/encode (= 2.30909.0)
- nanopb/decode (2.30909.0)
- nanopb/encode (2.30909.0)
- nanopb (2.30909.1):
- nanopb/decode (= 2.30909.1)
- nanopb/encode (= 2.30909.1)
- nanopb/decode (2.30909.1)
- nanopb/encode (2.30909.1)
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
Expand All @@ -207,7 +209,7 @@ PODS:
- SDWebImage (5.18.3):
- SDWebImage/Core (= 5.18.3)
- SDWebImage/Core (5.18.3)
- SDWebImageWebPCoder (0.14.0):
- SDWebImageWebPCoder (0.14.1):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.17)
- share_plus (0.0.1):
Expand Down Expand Up @@ -264,6 +266,7 @@ SPEC REPOS:
- FirebasePerformance
- FirebaseRemoteConfig
- FirebaseSessions
- FirebaseSharedSwift
- FMDB
- GoogleDataTransport
- GoogleSignIn
Expand Down Expand Up @@ -341,36 +344,37 @@ SPEC CHECKSUMS:
firebase_crashlytics: 8ca79ecf4713767f49730568dfc2f02ceaab52fd
firebase_messaging: e11ea61b449e6e39741b8a309ddab803ef1eb5cd
firebase_performance: 656ae9aff006cacc8fd88bc7af20447267d0742d
FirebaseABTesting: 03f0a8b88cf618350527f2c6a2234e29b9c65064
FirebaseAppCheckInterop: 82358cff9f33452dd44259e88eea5e562500b1cb
FirebaseABTesting: 609e15b57b5f1096c8feb984e8995d9e769858fe
FirebaseAppCheckInterop: 534d033d8d0436b4ab066a8205013d271e18a2b9
FirebaseAuth: 3862d87d4d58deff08f705d471896a2f66e8bbf0
FirebaseCore: 65a801af84cca84361ef9eac3fd868656968a53b
FirebaseCoreExtension: 2dbc745b337eb99d2026a7a309ae037bd873f45e
FirebaseCoreInternal: 26233f705cc4531236818a07ac84d20c333e505a
FirebaseCoreExtension: 47720bb330d7041047c0935a34a3a4b92f818074
FirebaseCoreInternal: 2cf9202e226e3f78d2bf6d56c472686b935bfb7f
FirebaseCrashlytics: d7fe23c5796f21104c753446b7a51d1737a88fb9
FirebaseInstallations: b822f91a61f7d1ba763e5ccc9d4f2e6f2ed3b3ee
FirebaseInstallations: 9387bf15abfc69a714f54e54f74a251264fdb79b
FirebaseMessaging: 80b4a086d20ed4fd385a702f4bfa920e14f5064d
FirebasePerformance: b005249b1c917a2699a3e25acaed1d6edbbf261f
FirebaseRemoteConfig: 17ec974c6cac5cdc6cf8297062c2219851857f06
FirebaseSessions: 96e7781e545929cde06dd91088ddbb0841391b43
FirebaseRemoteConfig: 94ab72cd7aa865b6226ee527b1fa5c4f961a4e7b
FirebaseSessions: 49f39e5c10e3f9fdd38d01b748329bae2a2fa8ed
FirebaseSharedSwift: e8fe8d63d434266a1b2c7f02807d5b64462e1851
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_facebook_auth: 47c7a8594f2d6864618e30b5a6d59dff0d2e59fe
flutter_image_compress_common: ec1d45c362c9d30a3f6a0426c297f47c52007e3e
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
flutter_webrtc: 71eba241ba99bb0511921f18e08b9c0f1e863464
flutter_webrtc: 09c70ea1a37f70b63ef167bba878cd45a5bdff7e
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
google_sign_in_ios: 1256ff9d941db546373826966720b0c24804bcdd
GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2
GoogleSignIn: 5651ce3a61e56ca864160e79b484cd9ed3f49b7a
GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084
GoogleUtilities: 202e7a9f5128accd11160fb9c19612de1911aa19
GTMAppAuth: 0ff230db599948a9ad7470ca667337803b3fc4dd
GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
KaiRTC: a8deb1dcf901d5e9a10a001337484bb08b926d36
KaiRTC: 35df6096a784044ad13691c29129fc864f7e74cb
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
Expand All @@ -379,7 +383,7 @@ SPEC CHECKSUMS:
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
replay_kit_launcher: 828739da18c9785d5e9aafd4f075ea11d6b61499
SDWebImage: 96e0c18ef14010b7485210e92fac888587ebb958
SDWebImageWebPCoder: 3027af94522d94df79c21c070894c8a2128927ff
SDWebImageWebPCoder: eb7970094ac1401eb4c8a1cd077f472dbc66497b
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
Expand Down
2 changes: 1 addition & 1 deletion lib/core/utils/appbar/app_bar_title_back.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ AppBar appBarTitleBack(
BuildContext context,
String title, {
List<Widget>? actions,
Function? onBackPressed,
Function()? onBackPressed,
Color? backgroundColor,
Brightness? brightness,
double? paddingLeft,
Expand Down
4 changes: 4 additions & 0 deletions lib/features/app/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class _AppState extends State<App> {
onGenerateRoute: (settings) {
return AppNavigator().getRoute(settings);
},
builder: (context, child) => MediaQuery(
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
child: child ?? const SizedBox(),
),
);
},
),
Expand Down
Loading

0 comments on commit b601232

Please sign in to comment.