Skip to content

Commit

Permalink
Fix: Extensions would not install correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
threethan committed Oct 14, 2024
1 parent ffc28a2 commit 95f6f7c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
8 changes: 4 additions & 4 deletions App/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ android {
defaultConfig {
compileSdk 34
minSdkVersion 23
versionCode 1200
versionName "1.2.0"
versionCode 1210
versionName "1.2.1"

ndk {
//noinspection ChromeOsAbiSupport
abiFilters "arm64-v8a"
// abiFilters "arm64-v8a"
//noinspection ChromeOsAbiSupport
// abiFilters "armeabi-v7a"
abiFilters "armeabi-v7a"
// Note: On x86/x86_64 geckoview can crash erratically
}
}
Expand Down
7 changes: 4 additions & 3 deletions App/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE"
tools:ignore="SystemPermissionTypo" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"
tools:ignore="SystemPermissionTypo" />

<application
android:icon="@drawable/ic_app_icon"
Expand Down Expand Up @@ -132,7 +134,6 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,24 @@ public GeckoResult<AllowOrDeny> onInstallPrompt(@NonNull WebExtension extension)
return GeckoResult.fromValue(AllowOrDeny.ALLOW);
}

@Nullable
@Override
public GeckoResult<AllowOrDeny> onInstallPrompt(@NonNull WebExtension extension, @NonNull String[] permissions, @NonNull String[] origins) {
return GeckoResult.fromValue(AllowOrDeny.ALLOW);
}

@Nullable
@Override
public GeckoResult<AllowOrDeny> onOptionalPrompt(@NonNull WebExtension extension, @NonNull String[] permissions, @NonNull String[] origins) {
return GeckoResult.fromValue(AllowOrDeny.ALLOW);
}

@Nullable
@Override
public GeckoResult<AllowOrDeny> onUpdatePrompt(@NonNull WebExtension currentlyInstalled, @NonNull WebExtension updatedExtension, @NonNull String[] newPermissions, @NonNull String[] newOrigins) {
return GeckoResult.fromValue(AllowOrDeny.ALLOW);
}

public void showList() {

final Activity activity = Dialog.getActivityContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ private void showAppUpdateDialog(String currentVersion, String newVersion) {

updateDialogBuilder.setPositiveButton(R.string.update_button, (dialog, which) ->
downloadPackage(getAppPackage(newVersion)));
updateDialogBuilder.setNegativeButton(R.string.update_skip_button, (dialog, which) ->
skipAppUpdate(newVersion));
updateDialogBuilder.setNegativeButton(R.string.update_skip_button, (dialog, which) -> {
dialog.dismiss();
skipAppUpdate(newVersion);
});

updateDialogBuilder.show();
} catch (Exception ignored) {} // This is not critical, and may fail if the launcher window isn't visible
Expand Down

0 comments on commit 95f6f7c

Please sign in to comment.