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 {
applicationId "com.linagora.android.teammail"
minSdkVersion 19
targetSdkVersion 32
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
// The number of method references in a .dex file cannot exceed 64K
+2 -5
View File
@@ -32,7 +32,6 @@
</queries>
<application
android:hardwareAccelerated="true"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:icon="@mipmap/ic_launcher">
@@ -52,8 +51,7 @@
to determine the Window background behind the Flutter UI. -->
<meta-data
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
Drawable until Flutter paints its first frame, then this splash
@@ -62,8 +60,7 @@
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
android:resource="@drawable/launch_background" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
+5 -2
View File
@@ -1,11 +1,10 @@
## Configuration for App Grid
## Configuration for FCM
### Context
- Team Mail using FCM service
- User need config env for FCM service
- Now only support to Android
### How to config
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
@@ -15,3 +14,7 @@ FIREBASE_ANDROID_PROJECT_ID=abc
FIREBASE_ANDROID_DATABASE_URL=https://abc.app
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
WEB_OIDC_CLIENT_ID=teammail-web
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 {
try {
requireCapability(session!, accountId!, [capabilityPushNotification]);
if(AppConfig.appFCMAvailable) {
if(AppConfig.fcmAvailable) {
await dotenv.load(fileName: AppConfig.appFCMConfigurationPath);
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
FCMBindings().dependencies();
@@ -1,8 +1,11 @@
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/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_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/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/domain/repository/fcm_repository.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';
class FCMBindings extends BaseBindings {
@override
void dependencies() {
_bindingsLocal();
super.dependencies();
}
@override
void bindingsController() {}
@@ -43,4 +52,9 @@ class FCMBindings extends BaseBindings {
void bindingsRepositoryImpl() {
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/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/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/main/exceptions/cache_exception_thrower.dart';
@@ -58,7 +57,6 @@ class LocalBindings extends Bindings {
Get.put(RecentLoginUsernameCacheClient());
Get.put(RecentLoginUsernameCacheManager(Get.find<RecentLoginUsernameCacheClient>()));
Get.put(FcmTokenCacheClient());
Get.put(FCMCacheManager(Get.find<FcmTokenCacheClient>()));
Get.put(CachingManager(
Get.find<MailboxCacheClient>(),
Get.find<StateCacheClient>(),
+1 -1
View File
@@ -12,7 +12,7 @@ class AppConfig {
return false;
}
static String appDashboardConfigurationPath = "configurations/app_dashboard.json";
static bool get appFCMAvailable {
static bool get fcmAvailable {
final supported = dotenv.get('FCM_AVAILABLE', fallback: 'unsupported');
if (supported == 'supported') {
return true;
+8 -8
View File
@@ -28,7 +28,7 @@ packages:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "3.3.4"
version: "3.3.5"
args:
dependency: transitive
description:
@@ -385,9 +385,9 @@ packages:
dependency: transitive
description:
path: "."
ref: "feature/update_inapp_webview"
resolved-ref: a805acd03aae48997b4e9625412a02aff975747e
url: "https://github.com/ManhNTX/enough_html_editor.git"
ref: firebase_integration
resolved-ref: "45560a2d06dd8fac93d6936b9cb835c84f0617a3"
url: "https://github.com/linagora/enough_html_editor.git"
source: git
version: "0.0.5"
enough_platform_widgets:
@@ -1173,8 +1173,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: demo
resolved-ref: "70cea1832b0e93bce515d4641f96cd1b12366725"
ref: firebase_integration
resolved-ref: "0250e2d4bbd5bd79c5b5fdca840f0a573f645ac4"
url: "https://github.com/linagora/rich-text-composer.git"
source: git
version: "0.0.1"
@@ -1343,7 +1343,7 @@ packages:
name: syncfusion_flutter_core
url: "https://pub.dartlang.org"
source: hosted
version: "20.3.57"
version: "20.3.58"
syncfusion_flutter_datepicker:
dependency: transitive
description:
@@ -1434,7 +1434,7 @@ packages:
name: url_launcher_android
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.21"
version: "6.0.22"
url_launcher_ios:
dependency: transitive
description:
+1 -1
View File
@@ -48,7 +48,7 @@ dependencies:
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.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2