fix some stuff
This commit is contained in:
@@ -67,7 +67,29 @@ android {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.release
|
||||
signingConfig = signingConfigs.debug
|
||||
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
bundle {
|
||||
// Profiler issues require us to temporarily package native code compressed to
|
||||
// match the previous APK packaging.
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1865634
|
||||
packagingOptions {
|
||||
jniLibs {
|
||||
it.useLegacyPackaging = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
jniLibs {
|
||||
useLegacyPackaging true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+125
@@ -0,0 +1,125 @@
|
||||
# We do not want to obfuscate - It's just painful to debug without the right mapping file.
|
||||
# If we update this, we'll have to update our Sentry config to upload ProGuard mappings.
|
||||
-dontobfuscate
|
||||
|
||||
|
||||
##### Default proguard settings:
|
||||
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in /Users/sebastian/Library/Android/sdk/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the proguardFiles
|
||||
# directive in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
####################################################################################################
|
||||
# Adjust
|
||||
####################################################################################################
|
||||
|
||||
-keep public class com.adjust.sdk.** { *; }
|
||||
-keep class com.google.android.gms.common.ConnectionResult {
|
||||
int SUCCESS;
|
||||
}
|
||||
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
|
||||
com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
|
||||
}
|
||||
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
|
||||
java.lang.String getId();
|
||||
boolean isLimitAdTrackingEnabled();
|
||||
}
|
||||
-keep class dalvik.system.VMRuntime {
|
||||
java.lang.String getRuntime();
|
||||
}
|
||||
-keep class android.os.Build {
|
||||
java.lang.String[] SUPPORTED_ABIS;
|
||||
java.lang.String CPU_ABI;
|
||||
}
|
||||
-keep class android.content.res.Configuration {
|
||||
android.os.LocaledList getLocales();
|
||||
java.util.Locale locale;
|
||||
}
|
||||
-keep class android.os.LocaledList {
|
||||
java.util.Locale get(int);
|
||||
}
|
||||
|
||||
####################################################################################################
|
||||
# Okhttp
|
||||
####################################################################################################
|
||||
|
||||
# JSR 305 annotations are for embedding nullability information.
|
||||
-dontwarn javax.annotation.**
|
||||
|
||||
# A resource is loaded with a relative path so the package of this class must be preserved.
|
||||
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
|
||||
|
||||
# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
||||
|
||||
# OkHttp platform used only on JVM and when Conscrypt dependency is available.
|
||||
-dontwarn okhttp3.internal.platform.ConscryptPlatform
|
||||
|
||||
####################################################################################################
|
||||
# Android architecture components
|
||||
####################################################################################################
|
||||
|
||||
-dontwarn android.**
|
||||
-dontwarn androidx.**
|
||||
-dontwarn com.google.**
|
||||
-dontwarn org.mozilla.geckoview.**
|
||||
-dontwarn mozilla.components.**
|
||||
|
||||
# https://developer.android.com/topic/libraries/architecture/release-notes.html
|
||||
# According to the docs this won't be needed when 1.0 of the library is released.
|
||||
-keep class * implements android.arch.lifecycle.GeneratedAdapter {<init>(...);}
|
||||
|
||||
# Temporary fix until we can use androidx
|
||||
-dontwarn mozilla.components.service.fretboard.scheduler.workmanager.**
|
||||
|
||||
# Fix for ViewModels
|
||||
-keep class * extends androidx.lifecycle.ViewModel {
|
||||
<init>();
|
||||
}
|
||||
-keep class * extends androidx.lifecycle.AndroidViewModel {
|
||||
<init>(android.app.Application);
|
||||
}
|
||||
|
||||
####################################################################################################
|
||||
# Mozilla Application Services
|
||||
####################################################################################################
|
||||
|
||||
-keep class mozilla.appservices.** { *; }
|
||||
|
||||
####################################################################################################
|
||||
# Kotlinx
|
||||
####################################################################################################
|
||||
|
||||
-dontwarn kotlinx.atomicfu.**
|
||||
|
||||
####################################################################################################
|
||||
# snakeyaml
|
||||
####################################################################################################
|
||||
|
||||
-dontwarn java.beans.PropertyDescriptor
|
||||
-dontwarn java.beans.Introspector
|
||||
-dontwarn java.beans.BeanInfo
|
||||
-dontwarn java.beans.IntrospectionException
|
||||
-dontwarn java.beans.FeatureDescriptor
|
||||
|
||||
####################################################################################################
|
||||
# kotlinx.coroutines: use the fast service loader to init MainDispatcherLoader by including a rule
|
||||
# to rewrite this property to return true:
|
||||
# https://github.com/Kotlin/kotlinx.coroutines/blob/8c98180f177bbe4b26f1ed9685a9280fea648b9c/kotlinx-coroutines-core/jvm/src/internal/MainDispatchers.kt#L19
|
||||
#
|
||||
# R8 is expected to optimize the default implementation to avoid a performance issue but a bug in R8
|
||||
# as bundled with AGP v7.0.0 causes this optimization to fail so we use the fast service loader instead. See:
|
||||
# https://github.com/mozilla-mobile/focus-android/issues/5102#issuecomment-897854121
|
||||
#
|
||||
# The fast service loader appears to be as performant as the R8 optimization so it's not worth the
|
||||
# churn to later remove this workaround. If needed, the upstream fix is being handled in
|
||||
# https://issuetracker.google.com/issues/196302685
|
||||
####################################################################################################
|
||||
-assumenosideeffects class kotlinx.coroutines.internal.MainDispatcherLoader {
|
||||
boolean FAST_SERVICE_LOADER_ENABLED return true;
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
||||
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
@@ -34,6 +36,14 @@
|
||||
|
||||
<!-- Needed for uploading media files on devices with Android 13 and later. -->
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED" />
|
||||
|
||||
<!-- Needed to interact with all apps installed on a device -->
|
||||
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
|
||||
|
||||
<!-- Needed to support Credential Manager with Android 14 and later. -->
|
||||
<uses-permission android:name="android.permission.CREDENTIAL_MANAGER_SET_ORIGIN" />
|
||||
<uses-permission android:name="android.permission.CREDENTIAL_MANAGER_QUERY_CANDIDATE_CREDENTIALS" />
|
||||
|
||||
|
||||
<application
|
||||
android:label="Lensai"
|
||||
@@ -149,6 +159,14 @@
|
||||
android:resource="@xml/search_bar_widget_info"/>
|
||||
</receiver>
|
||||
|
||||
<service
|
||||
android:name="eu.lensai.flutter_mozilla_components.services.CustomTabsService"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.support.customtabs.action.CustomTabsService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<service
|
||||
android:name="eu.lensai.flutter_mozilla_components.services.DownloadService"
|
||||
android:foregroundServiceType="dataSync" />
|
||||
|
||||
+1
-2
@@ -2,5 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
|
||||
distributionSha256Sum=194717442575a6f96e1c1befa2c30e9a4fc90f701d7aee33eb879b79e7ff05c0
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
|
||||
@@ -31,7 +31,7 @@ class WebExtensionsState extends _$WebExtensionsState {
|
||||
|
||||
state = {...state}..[extensionId] = current.copyWith(
|
||||
title: data.title,
|
||||
enabled: data.enabled,
|
||||
enabled: data.enabled ?? current.enabled,
|
||||
badgeText: data.badgeText,
|
||||
badgeTextColor: (data.badgeTextColor != null)
|
||||
? Color(data.badgeTextColor!)
|
||||
|
||||
@@ -7,7 +7,7 @@ part of 'web_extensions_state.dart';
|
||||
// **************************************************************************
|
||||
|
||||
String _$webExtensionsStateHash() =>
|
||||
r'9ac102b1d1740d69f9b0de590f08ff0774064845';
|
||||
r'bbaba8d27980046275858d2707bc66c6e349a537';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
||||
+52
-44
@@ -35,55 +35,63 @@ class ContainerChips extends HookConsumerWidget {
|
||||
ref.watch(filteredContainersWithCountProvider(searchText));
|
||||
|
||||
return containersAsync.when(
|
||||
data: (availableContainers) => SizedBox(
|
||||
height: 48,
|
||||
child: Row(
|
||||
children: [
|
||||
if (selectedContainer != null || availableContainers.isNotEmpty)
|
||||
Expanded(
|
||||
child: SelectableChips(
|
||||
deleteIcon: false,
|
||||
itemId: (container) => container.id,
|
||||
itemAvatar: (container) => Container(
|
||||
width: 20.0,
|
||||
height: 20.0,
|
||||
decoration: BoxDecoration(
|
||||
color: container.color,
|
||||
shape: BoxShape.circle,
|
||||
data: (availableContainers) {
|
||||
if (selectedContainer == null &&
|
||||
availableContainers.isEmpty &&
|
||||
!displayMenu) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return SizedBox(
|
||||
height: 48,
|
||||
child: Row(
|
||||
children: [
|
||||
if (selectedContainer != null || availableContainers.isNotEmpty)
|
||||
Expanded(
|
||||
child: SelectableChips(
|
||||
deleteIcon: false,
|
||||
itemId: (container) => container.id,
|
||||
itemAvatar: (container) => Container(
|
||||
width: 20.0,
|
||||
height: 20.0,
|
||||
decoration: BoxDecoration(
|
||||
color: container.color,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
itemLabel: (container) =>
|
||||
Text(container.name ?? 'New Container'),
|
||||
itemBadgeCount: (container) => container.tabCount,
|
||||
availableItems: availableContainers,
|
||||
selectedItem: selectedContainer,
|
||||
onSelected: onSelected,
|
||||
onDeleted: onDeleted,
|
||||
),
|
||||
itemLabel: (container) =>
|
||||
Text(container.name ?? 'New Container'),
|
||||
itemBadgeCount: (container) => container.tabCount,
|
||||
availableItems: availableContainers,
|
||||
selectedItem: selectedContainer,
|
||||
onSelected: onSelected,
|
||||
onDeleted: onDeleted,
|
||||
),
|
||||
)
|
||||
else
|
||||
Visibility(
|
||||
visible: displayMenu,
|
||||
child: Expanded(
|
||||
child: Text(
|
||||
"Press '>' to manage Containers.",
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).hintColor,
|
||||
fontStyle: FontStyle.italic,
|
||||
)
|
||||
else
|
||||
Visibility(
|
||||
visible: displayMenu,
|
||||
child: Expanded(
|
||||
child: Text(
|
||||
"Press '>' to manage Containers.",
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).hintColor,
|
||||
fontStyle: FontStyle.italic,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (displayMenu)
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await context.push(ContainerListRoute().location);
|
||||
},
|
||||
icon: const Icon(Icons.chevron_right),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (displayMenu)
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await context.push(ContainerListRoute().location);
|
||||
},
|
||||
icon: const Icon(Icons.chevron_right),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
error: (error, stackTrace) => const SizedBox.shrink(),
|
||||
loading: () => const SizedBox(
|
||||
height: 48,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:lensai/data/models/equatable_iterable.dart';
|
||||
import 'package:lensai/features/bangs/data/models/bang_data.dart';
|
||||
@@ -15,9 +16,12 @@ import 'package:lensai/features/search/domain/providers/search_suggestions.dart'
|
||||
import 'package:lensai/features/search/presentation/widgets/bang_chips.dart';
|
||||
import 'package:lensai/features/search/presentation/widgets/search_field.dart';
|
||||
import 'package:lensai/presentation/hooks/listenable_callback.dart';
|
||||
import 'package:lensai/presentation/widgets/failure_widget.dart';
|
||||
import 'package:skeletonizer/skeletonizer.dart';
|
||||
|
||||
class SearchScreen extends HookConsumerWidget {
|
||||
static const _matchPrefix = '***';
|
||||
|
||||
final String? initialSearchText;
|
||||
|
||||
const SearchScreen({required this.initialSearchText});
|
||||
@@ -36,9 +40,13 @@ class SearchScreen extends HookConsumerWidget {
|
||||
.read(searchSuggestionsProvider().notifier)
|
||||
.addQuery(searchTextController.text);
|
||||
|
||||
await ref
|
||||
.read(tabSearchRepositoryProvider.notifier)
|
||||
.addQuery(searchTextController.text);
|
||||
await ref.read(tabSearchRepositoryProvider.notifier).addQuery(
|
||||
searchTextController.text,
|
||||
// ignore: avoid_redundant_argument_values
|
||||
matchPrefix: _matchPrefix,
|
||||
// ignore: avoid_redundant_argument_values
|
||||
matchSuffix: _matchPrefix,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -212,14 +220,50 @@ class SearchScreen extends HookConsumerWidget {
|
||||
enabled: tabs.isLoading,
|
||||
child: tabs.when(
|
||||
data: (data) {
|
||||
return SliverList.builder(itemBuilder: itemBuilder);
|
||||
return SliverList.builder(
|
||||
itemCount: data.length,
|
||||
itemBuilder: (context, index) {
|
||||
final result = data[index];
|
||||
|
||||
final headHasMatch =
|
||||
result.title.contains(_matchPrefix);
|
||||
final bodyResult =
|
||||
result.extractedContent ?? result.fullContent;
|
||||
|
||||
return ListTile(
|
||||
title: Markdown(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
data: result.title,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
),
|
||||
subtitle: (!headHasMatch && bodyResult != null)
|
||||
? Markdown(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
data: bodyResult,
|
||||
physics:
|
||||
const NeverScrollableScrollPhysics(),
|
||||
)
|
||||
: null,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
error: (error, stackTrace) {
|
||||
return FailureWidget(
|
||||
title: 'Could not load tabs',
|
||||
exception: error,
|
||||
);
|
||||
},
|
||||
error: error,
|
||||
loading: () => SliverList.builder(
|
||||
itemCount: tabs.valueOrNull?.length ?? 3,
|
||||
itemBuilder: (context, index) {
|
||||
return ListTile()
|
||||
},),
|
||||
return ListTile(
|
||||
title: Bone.text(),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
+5
-5
@@ -9,13 +9,13 @@ environment:
|
||||
dependencies:
|
||||
collection: ^1.19.0
|
||||
copy_with_extension: ^6.0.0
|
||||
drift: ^2.22.1
|
||||
drift: ^2.23.0
|
||||
dynamic_color: ^1.7.0
|
||||
exceptions: ^0.6.1
|
||||
expandable_page_view: ^1.0.17
|
||||
fading_scroll: ^0.9.1
|
||||
fast_equatable: ^1.1.0
|
||||
file_picker: ^8.1.6
|
||||
file_picker: ^8.1.7
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_hooks: ^0.20.5
|
||||
@@ -23,7 +23,7 @@ dependencies:
|
||||
flutter_material_design_icons: ^1.1.7447
|
||||
flutter_mozilla_components:
|
||||
path: ../packages/flutter_mozilla_components
|
||||
flutter_pdf_text: ^0.7.0
|
||||
flutter_pdf_text: ^0.8.1
|
||||
flutter_secure_storage: ^9.2.2
|
||||
flutter_sharing_intent: ^1.1.1
|
||||
go_router: ^14.6.2
|
||||
@@ -47,7 +47,7 @@ dependencies:
|
||||
riverpod_annotation: ^2.6.1
|
||||
rxdart: ^0.28.0
|
||||
share_plus: ^10.1.3
|
||||
shared_preferences: ^2.3.4
|
||||
shared_preferences: ^2.3.5
|
||||
skeletonizer: ^1.4.2
|
||||
speech_to_text_google_dialog:
|
||||
git:
|
||||
@@ -71,7 +71,7 @@ dev_dependencies:
|
||||
copy_with_extension_gen: ^6.0.0
|
||||
custom_lint: ^0.6.10
|
||||
dependency_validator: ^4.1.2
|
||||
drift_dev: ^2.22.1
|
||||
drift_dev: ^2.23.0
|
||||
fast_equatable_lint: ^0.3.0
|
||||
flutter_launcher_icons: ^0.14.2
|
||||
go_router_builder: ^2.7.1
|
||||
|
||||
@@ -109,10 +109,6 @@ dependencies {
|
||||
implementation "org.mozilla.components:support-ktx:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:support-webextensions:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:support-locale:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:lib-fetch-httpurlconnection:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:lib-crash:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:lib-publicsuffixlist:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:lib-dataprotect:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:concept-engine:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:concept-fetch:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:concept-toolbar:$mozillaComponentsVersion"
|
||||
@@ -125,8 +121,8 @@ dependencies {
|
||||
implementation "org.mozilla.components:browser-thumbnails:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:feature-addons:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:feature-app-links:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:feature-autofill:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:feature-awesomebar:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:feature-customtabs:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:feature-downloads:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:feature-media:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:feature-tabs:$mozillaComponentsVersion"
|
||||
@@ -137,7 +133,6 @@ dependencies {
|
||||
implementation "org.mozilla.components:feature-sitepermissions:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:feature-webcompat:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:feature-webnotifications:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:service-digitalassetlinks:$mozillaComponentsVersion"
|
||||
implementation "org.mozilla.components:ui-widgets:$mozillaComponentsVersion"
|
||||
|
||||
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
|
||||
|
||||
+6
@@ -31,6 +31,7 @@ import mozilla.components.feature.addons.AddonManager
|
||||
import mozilla.components.feature.addons.amo.AMOAddonsProvider
|
||||
import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker
|
||||
import mozilla.components.feature.addons.update.DefaultAddonUpdater
|
||||
import mozilla.components.feature.customtabs.store.CustomTabsServiceStore
|
||||
import mozilla.components.feature.downloads.DownloadMiddleware
|
||||
import mozilla.components.feature.media.MediaSessionFeature
|
||||
import mozilla.components.feature.media.middleware.RecordingDevicesMiddleware
|
||||
@@ -155,6 +156,11 @@ class Core(private val context: Context,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The [CustomTabsServiceStore] holds global custom tabs related data.
|
||||
*/
|
||||
val customTabsStore by lazy { CustomTabsServiceStore() }
|
||||
|
||||
/**
|
||||
* The storage component for persisting browser tab sessions.
|
||||
*/
|
||||
|
||||
+3
-1
@@ -1,4 +1,4 @@
|
||||
// Autogenerated from Pigeon (v22.6.0), do not edit directly.
|
||||
// Autogenerated from Pigeon (v22.7.0), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
|
||||
|
||||
@@ -7,7 +7,9 @@ package eu.lensai.flutter_mozilla_components.pigeons
|
||||
import android.util.Log
|
||||
import io.flutter.plugin.common.BasicMessageChannel
|
||||
import io.flutter.plugin.common.BinaryMessenger
|
||||
import io.flutter.plugin.common.EventChannel
|
||||
import io.flutter.plugin.common.MessageCodec
|
||||
import io.flutter.plugin.common.StandardMethodCodec
|
||||
import io.flutter.plugin.common.StandardMessageCodec
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.nio.ByteBuffer
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package eu.lensai.flutter_mozilla_components.services
|
||||
|
||||
import eu.lensai.flutter_mozilla_components.GlobalComponents
|
||||
import mozilla.components.concept.engine.Engine
|
||||
import mozilla.components.feature.customtabs.AbstractCustomTabsService
|
||||
import mozilla.components.feature.customtabs.store.CustomTabsServiceStore
|
||||
|
||||
class CustomTabsService : AbstractCustomTabsService() {
|
||||
private val components by lazy {
|
||||
requireNotNull(GlobalComponents.components) { "Components not initialized" }
|
||||
}
|
||||
|
||||
override val customTabsServiceStore: CustomTabsServiceStore by lazy { components.core.customTabsStore }
|
||||
override val engine: Engine by lazy { components.core.engine }
|
||||
}
|
||||
Vendored
+1
-1
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Autogenerated from Pigeon (v22.6.0), do not edit directly.
|
||||
// Autogenerated from Pigeon (v22.7.0), do not edit directly.
|
||||
// See also: https://pub.dev/packages/pigeon
|
||||
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers
|
||||
|
||||
@@ -1483,7 +1483,7 @@ class GeckoSessionApi {
|
||||
|
||||
final String pigeonVar_messageChannelSuffix;
|
||||
|
||||
Future<void> loadUrl({required String? tabId, required String url, required LoadUrlFlagsValue flags, required Map<String, String>? additionalHeaders,}) async {
|
||||
Future<void> loadUrl({required String? tabId, required String url, required LoadUrlFlagsValue flags, required Map<String, String>? additionalHeaders, }) async {
|
||||
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoSessionApi.loadUrl$pigeonVar_messageChannelSuffix';
|
||||
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
||||
pigeonVar_channelName,
|
||||
@@ -1505,7 +1505,7 @@ class GeckoSessionApi {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> loadData({required String? tabId, required String data, required String mimeType, required String encoding,}) async {
|
||||
Future<void> loadData({required String? tabId, required String data, required String mimeType, required String encoding, }) async {
|
||||
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoSessionApi.loadData$pigeonVar_messageChannelSuffix';
|
||||
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
||||
pigeonVar_channelName,
|
||||
@@ -1725,7 +1725,7 @@ class GeckoSessionApi {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> translate({required String? tabId, required String fromLanguage, required String toLanguage, required TranslationOptions? options,}) async {
|
||||
Future<void> translate({required String? tabId, required String fromLanguage, required String toLanguage, required TranslationOptions? options, }) async {
|
||||
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoSessionApi.translate$pigeonVar_messageChannelSuffix';
|
||||
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
||||
pigeonVar_channelName,
|
||||
@@ -1871,7 +1871,7 @@ class GeckoTabsApi {
|
||||
|
||||
final String pigeonVar_messageChannelSuffix;
|
||||
|
||||
Future<void> syncEvents({required bool onSelectedTabChange, required bool onTabListChange, required bool onTabContentStateChange, required bool onIconChange, required bool onSecurityInfoStateChange, required bool onReaderableStateChange, required bool onHistoryStateChange, required bool onFindResults, required bool onThumbnailChange,}) async {
|
||||
Future<void> syncEvents({required bool onSelectedTabChange, required bool onTabListChange, required bool onTabContentStateChange, required bool onIconChange, required bool onSecurityInfoStateChange, required bool onReaderableStateChange, required bool onHistoryStateChange, required bool onFindResults, required bool onThumbnailChange, }) async {
|
||||
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoTabsApi.syncEvents$pigeonVar_messageChannelSuffix';
|
||||
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
||||
pigeonVar_channelName,
|
||||
@@ -1937,7 +1937,7 @@ class GeckoTabsApi {
|
||||
}
|
||||
}
|
||||
|
||||
Future<String> addTab({required String url, required bool selectTab, required bool startLoading, required String? parentId, required LoadUrlFlagsValue flags, required String? contextId, required SourceValue source, required bool private, required HistoryMetadataKey? historyMetadata, required Map<String, String>? additionalHeaders,}) async {
|
||||
Future<String> addTab({required String url, required bool selectTab, required bool startLoading, required String? parentId, required LoadUrlFlagsValue flags, required String? contextId, required SourceValue source, required bool private, required HistoryMetadataKey? historyMetadata, required Map<String, String>? additionalHeaders, }) async {
|
||||
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoTabsApi.addTab$pigeonVar_messageChannelSuffix';
|
||||
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
||||
pigeonVar_channelName,
|
||||
@@ -2074,7 +2074,7 @@ class GeckoTabsApi {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> restoreTabsByList({required List<RecoverableTab> tabs, required String? selectTabId, required RestoreLocation restoreLocation,}) async {
|
||||
Future<void> restoreTabsByList({required List<RecoverableTab> tabs, required String? selectTabId, required RestoreLocation restoreLocation, }) async {
|
||||
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoTabsApi.restoreTabsByList$pigeonVar_messageChannelSuffix';
|
||||
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
||||
pigeonVar_channelName,
|
||||
@@ -2148,7 +2148,7 @@ class GeckoTabsApi {
|
||||
}
|
||||
|
||||
/// Selects an already existing tab displaying [url] or otherwise creates a new tab.
|
||||
Future<String> selectOrAddTabByUrl({required String url, required bool private, required SourceValue source, required LoadUrlFlagsValue flags, required bool ignoreFragment,}) async {
|
||||
Future<String> selectOrAddTabByUrl({required String url, required bool private, required SourceValue source, required LoadUrlFlagsValue flags, required bool ignoreFragment, }) async {
|
||||
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoTabsApi.selectOrAddTabByUrl$pigeonVar_messageChannelSuffix';
|
||||
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
||||
pigeonVar_channelName,
|
||||
@@ -2202,7 +2202,7 @@ class GeckoTabsApi {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> moveTabs({required List<String> tabIds, required String targetTabId, required bool placeAfter,}) async {
|
||||
Future<void> moveTabs({required List<String> tabIds, required String targetTabId, required bool placeAfter, }) async {
|
||||
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoTabsApi.moveTabs$pigeonVar_messageChannelSuffix';
|
||||
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
||||
pigeonVar_channelName,
|
||||
|
||||
@@ -17,7 +17,7 @@ dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
lint: ^2.3.0
|
||||
pigeon: ^22.7.0
|
||||
pigeon: ^22.7.1
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
Reference in New Issue
Block a user