TF-1205: remove android:hardwareAccelerated

This commit is contained in:
ManhNTX
2022-11-23 08:45:42 +07:00
committed by Dat H. Pham
parent d2da7f23b1
commit 82b2e30031
11 changed files with 34 additions and 22 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ android {
defaultConfig { defaultConfig {
applicationId "com.linagora.android.teammail" applicationId "com.linagora.android.teammail"
minSdkVersion 19 minSdkVersion 19
targetSdkVersion 32 targetSdkVersion 33
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
// The number of method references in a .dex file cannot exceed 64K // The number of method references in a .dex file cannot exceed 64K
+2 -5
View File
@@ -32,7 +32,6 @@
</queries> </queries>
<application <application
android:hardwareAccelerated="true"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">
@@ -52,8 +51,7 @@
to determine the Window background behind the Flutter UI. --> to determine the Window background behind the Flutter UI. -->
<meta-data <meta-data
android:name="io.flutter.embedding.android.NormalTheme" android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" android:resource="@style/NormalTheme" />
/>
<!-- Displays an Android View that continues showing the launch screen <!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash Drawable until Flutter paints its first frame, then this splash
@@ -62,8 +60,7 @@
Flutter's first frame. --> Flutter's first frame. -->
<meta-data <meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable" android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" android:resource="@drawable/launch_background" />
/>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
+5 -2
View File
@@ -1,11 +1,10 @@
## Configuration for App Grid ## Configuration for FCM
### Context ### Context
- Team Mail using FCM service - Team Mail using FCM service
- User need config env for FCM service - User need config env for FCM service
- Now only support to Android - Now only support to Android
### How to config ### How to config
1.Add environment of FCM service in [env.fcm](https://github.com/linagora/tmail-flutter/blob/master/configurations/env.fcm) 1.Add environment of FCM service in [env.fcm](https://github.com/linagora/tmail-flutter/blob/master/configurations/env.fcm)
``` ```
FIREBASE_ANDROID_API_KEY=abc FIREBASE_ANDROID_API_KEY=abc
@@ -15,3 +14,7 @@ FIREBASE_ANDROID_PROJECT_ID=abc
FIREBASE_ANDROID_DATABASE_URL=https://abc.app FIREBASE_ANDROID_DATABASE_URL=https://abc.app
FIREBASE_ANDROID_STORAGE_BUCKET=abc.com FIREBASE_ANDROID_STORAGE_BUCKET=abc.com
``` ```
2. Active field FCM_AVAILABLE in [env.file](https://github.com/linagora/tmail-flutter/blob/master/env.file)
```
FCM_AVAILABLE=supported
```
+1 -1
View File
@@ -1,4 +1,4 @@
SERVER_URL=http://localhost SERVER_URL=http://localhost/
DOMAIN_REDIRECT_URL=http://localhost:3000 DOMAIN_REDIRECT_URL=http://localhost:3000
WEB_OIDC_CLIENT_ID=teammail-web WEB_OIDC_CLIENT_ID=teammail-web
APP_GRID_AVAILABLE=supported APP_GRID_AVAILABLE=supported
+1 -1
View File
@@ -151,7 +151,7 @@ abstract class BaseController extends GetxController
Future<void> injectFCMBindings(Session? session, AccountId? accountId) async { Future<void> injectFCMBindings(Session? session, AccountId? accountId) async {
try { try {
requireCapability(session!, accountId!, [capabilityPushNotification]); requireCapability(session!, accountId!, [capabilityPushNotification]);
if(AppConfig.appFCMAvailable) { if(AppConfig.fcmAvailable) {
await dotenv.load(fileName: AppConfig.appFCMConfigurationPath); await dotenv.load(fileName: AppConfig.appFCMConfigurationPath);
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
FCMBindings().dependencies(); FCMBindings().dependencies();
@@ -1,8 +1,11 @@
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:hive/hive.dart';
import 'package:tmail_ui_user/features/base/base_bindings.dart'; import 'package:tmail_ui_user/features/base/base_bindings.dart';
import 'package:tmail_ui_user/features/caching/fcm_token_cache_client.dart';
import 'package:tmail_ui_user/features/push_notification/data/datasource/fcm_datasource.dart'; import 'package:tmail_ui_user/features/push_notification/data/datasource/fcm_datasource.dart';
import 'package:tmail_ui_user/features/push_notification/data/datasource_impl/hive_fcm_datasource_impl.dart'; import 'package:tmail_ui_user/features/push_notification/data/datasource_impl/hive_fcm_datasource_impl.dart';
import 'package:tmail_ui_user/features/push_notification/data/local/fcm_cache_manager.dart'; import 'package:tmail_ui_user/features/push_notification/data/local/fcm_cache_manager.dart';
import 'package:tmail_ui_user/features/push_notification/data/model/fcm_token_cache.dart';
import 'package:tmail_ui_user/features/push_notification/data/repository/fcm_repository_impl.dart'; import 'package:tmail_ui_user/features/push_notification/data/repository/fcm_repository_impl.dart';
import 'package:tmail_ui_user/features/push_notification/domain/repository/fcm_repository.dart'; import 'package:tmail_ui_user/features/push_notification/domain/repository/fcm_repository.dart';
import 'package:tmail_ui_user/features/push_notification/domain/usecases/delete_fcm_token_cache_interactor.dart'; import 'package:tmail_ui_user/features/push_notification/domain/usecases/delete_fcm_token_cache_interactor.dart';
@@ -11,6 +14,12 @@ import 'package:tmail_ui_user/features/push_notification/domain/usecases/save_fc
import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart'; import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart';
class FCMBindings extends BaseBindings { class FCMBindings extends BaseBindings {
@override
void dependencies() {
_bindingsLocal();
super.dependencies();
}
@override @override
void bindingsController() {} void bindingsController() {}
@@ -43,4 +52,9 @@ class FCMBindings extends BaseBindings {
void bindingsRepositoryImpl() { void bindingsRepositoryImpl() {
Get.put(FCMRepositoryImpl(Get.find<FCMDatasource>())); Get.put(FCMRepositoryImpl(Get.find<FCMDatasource>()));
} }
void _bindingsLocal() {
Get.put(FCMCacheManager(Get.find<FcmTokenCacheClient>()));
Hive.registerAdapter(FCMTokenCacheAdapter());
}
} }
@@ -23,7 +23,6 @@ import 'package:tmail_ui_user/features/login/data/local/oidc_configuration_cache
import 'package:tmail_ui_user/features/login/data/local/token_oidc_cache_manager.dart'; import 'package:tmail_ui_user/features/login/data/local/token_oidc_cache_manager.dart';
import 'package:tmail_ui_user/features/mailbox/data/local/mailbox_cache_manager.dart'; import 'package:tmail_ui_user/features/mailbox/data/local/mailbox_cache_manager.dart';
import 'package:tmail_ui_user/features/manage_account/data/local/language_cache_manager.dart'; import 'package:tmail_ui_user/features/manage_account/data/local/language_cache_manager.dart';
import 'package:tmail_ui_user/features/push_notification/data/local/fcm_cache_manager.dart';
import 'package:tmail_ui_user/features/thread/data/local/email_cache_manager.dart'; import 'package:tmail_ui_user/features/thread/data/local/email_cache_manager.dart';
import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart'; import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart';
@@ -58,7 +57,6 @@ class LocalBindings extends Bindings {
Get.put(RecentLoginUsernameCacheClient()); Get.put(RecentLoginUsernameCacheClient());
Get.put(RecentLoginUsernameCacheManager(Get.find<RecentLoginUsernameCacheClient>())); Get.put(RecentLoginUsernameCacheManager(Get.find<RecentLoginUsernameCacheClient>()));
Get.put(FcmTokenCacheClient()); Get.put(FcmTokenCacheClient());
Get.put(FCMCacheManager(Get.find<FcmTokenCacheClient>()));
Get.put(CachingManager( Get.put(CachingManager(
Get.find<MailboxCacheClient>(), Get.find<MailboxCacheClient>(),
Get.find<StateCacheClient>(), Get.find<StateCacheClient>(),
+1 -1
View File
@@ -12,7 +12,7 @@ class AppConfig {
return false; return false;
} }
static String appDashboardConfigurationPath = "configurations/app_dashboard.json"; static String appDashboardConfigurationPath = "configurations/app_dashboard.json";
static bool get appFCMAvailable { static bool get fcmAvailable {
final supported = dotenv.get('FCM_AVAILABLE', fallback: 'unsupported'); final supported = dotenv.get('FCM_AVAILABLE', fallback: 'unsupported');
if (supported == 'supported') { if (supported == 'supported') {
return true; return true;
+8 -8
View File
@@ -28,7 +28,7 @@ packages:
name: archive name: archive
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.3.4" version: "3.3.5"
args: args:
dependency: transitive dependency: transitive
description: description:
@@ -385,9 +385,9 @@ packages:
dependency: transitive dependency: transitive
description: description:
path: "." path: "."
ref: "feature/update_inapp_webview" ref: firebase_integration
resolved-ref: a805acd03aae48997b4e9625412a02aff975747e resolved-ref: "45560a2d06dd8fac93d6936b9cb835c84f0617a3"
url: "https://github.com/ManhNTX/enough_html_editor.git" url: "https://github.com/linagora/enough_html_editor.git"
source: git source: git
version: "0.0.5" version: "0.0.5"
enough_platform_widgets: enough_platform_widgets:
@@ -1173,8 +1173,8 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
path: "." path: "."
ref: demo ref: firebase_integration
resolved-ref: "70cea1832b0e93bce515d4641f96cd1b12366725" resolved-ref: "0250e2d4bbd5bd79c5b5fdca840f0a573f645ac4"
url: "https://github.com/linagora/rich-text-composer.git" url: "https://github.com/linagora/rich-text-composer.git"
source: git source: git
version: "0.0.1" version: "0.0.1"
@@ -1343,7 +1343,7 @@ packages:
name: syncfusion_flutter_core name: syncfusion_flutter_core
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "20.3.57" version: "20.3.58"
syncfusion_flutter_datepicker: syncfusion_flutter_datepicker:
dependency: transitive dependency: transitive
description: description:
@@ -1434,7 +1434,7 @@ packages:
name: url_launcher_android name: url_launcher_android
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.0.21" version: "6.0.22"
url_launcher_ios: url_launcher_ios:
dependency: transitive dependency: transitive
description: description:
+1 -1
View File
@@ -48,7 +48,7 @@ dependencies:
rich_text_composer: rich_text_composer:
git: git:
url: https://github.com/linagora/rich-text-composer.git url: https://github.com/linagora/rich-text-composer.git
ref: demo ref: firebase_integration
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2 cupertino_icons: ^1.0.2