Skip to content

Commit b3ff9b7

Browse files
Remove high-risk permissions from Android
1 parent c30eecb commit b3ff9b7

File tree

8 files changed

+15
-30
lines changed

8 files changed

+15
-30
lines changed

android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
<uses-permission android:name="android.permission.VIBRATE" />
77
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
88
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9-
<uses-permission android:name="android.permission.READ_MEDIA_VIDEOS" />
10-
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
11-
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
12-
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
139
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
1410
<uses-permission android:name="android.permission.INTERNET" />
1511

lib/Screens/main_screen.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ class MainScreenState extends State<MainScreen>
177177
});
178178
fetchReleases();
179179
WidgetsBinding.instance.addPostFrameCallback((_) async {
180-
IToast.showTop("Initialized");
181180
if (ChewieHiveUtil.getBool(CloudOTPHiveUtil.autoFocusSearchBarKey,
182181
defaultValue: false)) {
183182
ShortcutsUtil.focusSearch();

pubspec.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,14 +1063,6 @@ packages:
10631063
url: "https://pub.flutter-io.cn"
10641064
source: hosted
10651065
version: "2.0.3"
1066-
install_plugin:
1067-
dependency: "direct main"
1068-
description:
1069-
name: install_plugin
1070-
sha256: "6fb67ba0781e75de4f2f2266ed25e835bfd277c5bfc2ed034af52774355857c6"
1071-
url: "https://pub.flutter-io.cn"
1072-
source: hosted
1073-
version: "2.1.0"
10741066
intl:
10751067
dependency: transitive
10761068
description:

pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: cloudotp
2-
version: 3.0.0+300
2+
version: 3.1.0+310
33
description: An awesome two-factor authenticator which supports cloud storage and multiple platforms.
44
publish_to: none
55

@@ -92,7 +92,6 @@ dependencies:
9292
restart_app: ^1.2.1 # 重启APP
9393
tray_manager: ^0.2.3 # 托盘图标
9494
hotkey_manager: ^0.2.3 # 热键
95-
install_plugin: ^2.1.0 # 安装APP
9695
responsive_builder: ^0.7.1 # 响应式布局
9796
flutter_displaymode: ^0.6.0 # 设置刷新率
9897
flutter_local_notifications: ^17.2.1+2 # 本地通知

third-party/chewie/lib/src/Utils/System/notification_util.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'package:awesome_chewie/src/Utils/General/responsive_util.dart';
22
import 'package:awesome_chewie/src/Utils/General/string_util.dart';
33
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
4-
import 'package:install_plugin/install_plugin.dart';
54

65
class NotificationUtil {
76
static final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
@@ -18,9 +17,9 @@ class NotificationUtil {
1817
await flutterLocalNotificationsPlugin.initialize(
1918
InitializationSettings(android: android),
2019
onDidReceiveNotificationResponse: (respose) async {
21-
if (respose.id == 1 && respose.payload.notNullOrEmpty) {
22-
await InstallPlugin.install(respose.payload!);
23-
}
20+
// if (respose.id == 1 && respose.payload.notNullOrEmpty) {
21+
// await InstallPlugin.install(respose.payload!);
22+
// }
2423
},
2524
);
2625
flutterLocalNotificationsPlugin

third-party/chewie/lib/src/Utils/System/uri_util.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import 'package:flutter/services.dart';
88
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
99
import 'package:html/parser.dart';
1010
import 'package:http/http.dart' as http;
11+
import 'package:package_info_plus/package_info_plus.dart';
1112
import 'package:share_plus/share_plus.dart';
1213
import 'package:url_launcher/url_launcher.dart';
1314

@@ -164,6 +165,15 @@ class UriUtil {
164165
await launchUrl(uri, mode: LaunchMode.externalApplication);
165166
}
166167

168+
static Future<void> openGooglePlayStore() async {
169+
String packageName = (await PackageInfo.fromPlatform()).packageName;
170+
final Uri playStoreUri =
171+
Uri.parse("https://play.google.com/store/apps/details?id=$packageName");
172+
if (await canLaunchUrl(playStoreUri)) {
173+
await launchUrl(playStoreUri, mode: LaunchMode.externalApplication);
174+
}
175+
}
176+
167177
static Future<dynamic> getRedirectUrl(String url) async {
168178
Response res = await Dio().get(
169179
url,

third-party/chewie/lib/src/Utils/utils.dart

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,7 @@ class ChewieUtils {
227227
cancelButtonText: ChewieS.current.updateLater,
228228
onTapConfirm: () async {
229229
if (ResponsiveUtil.isAndroid()) {
230-
ReleaseAsset androidAssset = await FileUtil.getAndroidAsset(
231-
latestVersion, latestReleaseItem!);
232-
ILogger.info(ResponsiveUtil.appName,
233-
"Get android asset: $androidAssset");
234-
FileUtil.downloadAndUpdate(
235-
context,
236-
androidAssset.pkgsDownloadUrl,
237-
latestReleaseItem.htmlUrl,
238-
version: latestVersion,
239-
);
230+
UriUtil.openGooglePlayStore();
240231
} else {
241232
UriUtil.openExternal(latestReleaseItem!.htmlUrl);
242233
return;

third-party/chewie/pubspec.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ dependencies:
5757
flutter_displaymode: ^0.6.0
5858
image_gallery_saver: ^2.0.3
5959
permission_handler: ^11.3.1
60-
install_plugin: ^2.1.0
6160
hotkey_manager: ^0.2.3
6261
flutter_inappwebview: 6.0.0
6362
# 工具

0 commit comments

Comments
 (0)