fix:优化和对齐版本
This commit is contained in:
1 parent
364fc837b3
commit
bd6bb0ffce
115 files changed
+155
-3647
No files matched your search
@@ -3,7 +3,7 @@ import 'dart:io' show Platform;
|
||||
import 'package:android_id/android_id.dart';
|
||||
import 'package:android_oaid/android_oaid.dart';
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb;
|
||||
import 'package:flutter_paid/flutter_paid.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
@@ -12,6 +12,7 @@ import 'package:uuid/uuid.dart';
|
||||
|
||||
import '../storage/storage_keys.dart';
|
||||
import '../storage/storage_service.dart';
|
||||
import '../privacy/privacy_gate.dart';
|
||||
|
||||
/// 请求公共 + 平台身份 header 来源(完全对齐研值契约)。
|
||||
/// AuthInterceptor 每个请求注入 commonHeaders() + platformIdentityHeaders(),
|
||||
@@ -52,9 +53,11 @@ class DeviceHeaderService {
|
||||
|
||||
// Align with tradingagents-flutter-app: Android only initializes device
|
||||
// information after the user has accepted the privacy policy.
|
||||
if (!kIsWeb &&
|
||||
Platform.isAndroid &&
|
||||
!StorageService.to.getBool(storagePrivacyAgreed)) {
|
||||
if (requiresAndroidPrivacyConsent(
|
||||
isWeb: kIsWeb,
|
||||
platform: defaultTargetPlatform,
|
||||
privacyAgreed: StorageService.to.getBool(storagePrivacyAgreed),
|
||||
)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -184,10 +187,11 @@ class DeviceHeaderService {
|
||||
|
||||
/// 是否需要首启隐私合规确认。**仅 Android**(合规要求:同意前不得采集设备
|
||||
/// 标识)。由 go_router redirect 调用,未同意则强制跳隐私页。
|
||||
bool get privacyConsentRequired =>
|
||||
!kIsWeb &&
|
||||
Platform.isAndroid &&
|
||||
!StorageService.to.getBool(storagePrivacyAgreed);
|
||||
bool get privacyConsentRequired => requiresAndroidPrivacyConsent(
|
||||
isWeb: kIsWeb,
|
||||
platform: defaultTargetPlatform,
|
||||
privacyAgreed: StorageService.to.getBool(storagePrivacyAgreed),
|
||||
);
|
||||
|
||||
/// iOS 首次启动页:仅在首次安装后展示一次。
|
||||
bool get iosStartupRequired =>
|
||||
|
||||
Reference in new issue
Block a user