mirror of
https://github.com/apache/cordova-android.git
synced 2026-07-25 00:00:05 +08:00
Compare commits
54
Commits
rel/15.0.0
..
15.1.x
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
034075d96a | ||
|
|
61ebdcdec9 | ||
|
|
80658ea401 | ||
|
|
89771e64c8 | ||
|
|
065a99d8f9 | ||
|
|
cdbeb603bd | ||
|
|
50ee09e492 | ||
|
|
d830222e40 | ||
|
|
1e2f0ca6c3 | ||
|
|
654b03a327 | ||
|
|
acbc5b48c0 | ||
|
|
cb52fb8ddd | ||
|
|
7dd7f5042c | ||
|
|
1d01ea1fc0 | ||
|
|
929f20542f | ||
|
|
dd3fd3571e | ||
|
|
7977149924 | ||
|
|
ebccedf691 | ||
|
|
e53dc373a4 | ||
|
|
80491e9a45 | ||
|
|
d90eeecbba | ||
|
|
703ebeae81 | ||
|
|
363a9a772e | ||
|
|
f4ecf9974d | ||
|
|
a63c1e18ca | ||
|
|
661fadd083 | ||
|
|
74fbbdce32 | ||
|
|
a1f75a3e95 | ||
|
|
56e263fece | ||
|
|
4ce731dac2 | ||
|
|
b91144c0d4 | ||
|
|
c636f8bbe4 | ||
|
|
90b4b057a4 | ||
|
|
0baa901d6a | ||
|
|
08c4fd1ebf | ||
|
|
f490531d5a | ||
|
|
245021782b | ||
|
|
0d6fdd178c | ||
|
|
b66f0f33b8 | ||
|
|
8c83976486 | ||
|
|
9c3d82680e | ||
|
|
190076ba18 | ||
|
|
7b33c5dd64 | ||
|
|
0bfbc20b84 | ||
|
|
b1705d83c5 | ||
|
|
c44a4627e3 | ||
|
|
1f70d396da | ||
|
|
2868f93aae | ||
|
|
340eade2de | ||
|
|
9ae489bd37 | ||
|
|
af56a00324 | ||
|
|
9064bc0792 | ||
|
|
c02d1b0331 | ||
|
|
31f3d57c8d |
@@ -39,8 +39,21 @@ github:
|
||||
merge: false
|
||||
rebase: false
|
||||
|
||||
rulesets:
|
||||
- name: "Default Branch Protection"
|
||||
type: branch
|
||||
branches:
|
||||
includes:
|
||||
- "~DEFAULT_BRANCH"
|
||||
- "release/*"
|
||||
- "rel/*"
|
||||
excludes: []
|
||||
bypass_teams:
|
||||
- root
|
||||
restrict_deletion: true
|
||||
restrict_force_push: true
|
||||
notifications:
|
||||
commits: commits@cordova.apache.org
|
||||
issues: issues@cordova.apache.org
|
||||
pullrequests_status: issues@cordova.apache.org
|
||||
commits: commits@cordova.apache.org
|
||||
issues: issues@cordova.apache.org
|
||||
pullrequests_status: issues@cordova.apache.org
|
||||
pullrequests_comment: issues@cordova.apache.org
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
cooldown:
|
||||
default-days: 4
|
||||
schedule:
|
||||
interval: "daily" # Every weekday, Monday to Friday
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
cooldown:
|
||||
default-days: 4
|
||||
schedule:
|
||||
interval: "weekly" # By default on a Monday
|
||||
+62
-30
@@ -25,28 +25,79 @@ on:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
jobs:
|
||||
codeql:
|
||||
name: CodeQL Analysis
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 1
|
||||
|
||||
- uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
# "bin/templates/platform_www/cordova.js" is ignored because it is a generated file.
|
||||
# It contains mixed content from the npm package "cordova-js" and "./cordova-js-src".
|
||||
# The report might not be resolvable because of the external package.
|
||||
# If the report is related to this repository, it would be detected when scanning "./cordova-js-src".
|
||||
- uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
|
||||
with:
|
||||
languages: javascript, java-kotlin
|
||||
queries: security-and-quality
|
||||
# When 'build-mode' is set to 'none', CodeQL will create a database without
|
||||
# requiring a build for Java. If Kotlin files are added in the future, build
|
||||
# will be required.
|
||||
build-mode: none
|
||||
config: |
|
||||
paths-ignore:
|
||||
- coverage
|
||||
- node_modules
|
||||
- templates/project/assets/www/cordova.js
|
||||
- test/androidx/app/src/main/assets/www/cordova.js
|
||||
- framework/build/intermediates
|
||||
- framework/build/outputs
|
||||
- framework/build/reports
|
||||
- framework/build/tmp
|
||||
- test/androidx/build/intermediates
|
||||
- test/androidx/build/outputs
|
||||
- test/androidx/build/reports
|
||||
- test/androidx/build/tmp
|
||||
|
||||
- uses: github/codeql-action/analyze@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
|
||||
|
||||
test:
|
||||
name: NodeJS ${{ matrix.node-version }} on ${{ matrix.os }}
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [20.x, 22.x, 24.x]
|
||||
os: [ubuntu-latest, windows-latest, macos-15]
|
||||
node-version: [20.x, 22.x, 24.x, 26.x]
|
||||
os: [ubuntu-latest, windows-latest, macos-26]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 1
|
||||
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- uses: actions/setup-java@v5
|
||||
- uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
@@ -57,32 +108,13 @@ jobs:
|
||||
npm --version
|
||||
gradle --version
|
||||
|
||||
# "bin/templates/platform_www/cordova.js" is ignored because it is a generated file.
|
||||
# It contains mixed content from the npm package "cordova-js" and "./cordova-js-src".
|
||||
# The report might not be resolvable because of the external package.
|
||||
# If the report is related to this repository, it would be detected when scanning "./cordova-js-src".
|
||||
- uses: github/codeql-action/init@v4
|
||||
with:
|
||||
languages: javascript, java-kotlin
|
||||
queries: security-and-quality
|
||||
config: |
|
||||
paths-ignore:
|
||||
- coverage
|
||||
- node_modules
|
||||
- templates/project/assets/www/cordova.js
|
||||
- test/androidx/app/src/main/assets/www/cordova.js
|
||||
|
||||
- name: npm install and test
|
||||
run: |
|
||||
npm i
|
||||
npm t
|
||||
npm cit
|
||||
env:
|
||||
CI: true
|
||||
|
||||
- uses: github/codeql-action/analyze@v4
|
||||
|
||||
# v4.6.0
|
||||
- uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238
|
||||
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
if: success()
|
||||
with:
|
||||
name: ${{ runner.os }} node.js ${{ matrix.node-version }}
|
||||
|
||||
@@ -31,36 +31,57 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 1
|
||||
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
package-manager-cache: false
|
||||
cache: ''
|
||||
|
||||
- name: Setup environment variables
|
||||
run: |
|
||||
REPO_NAME="${GITHUB_REPOSITORY#*/}"
|
||||
TAG_NAME="${GITHUB_REF#refs/tags/}"
|
||||
TARGET_RELEASE_VERSION="${TAG_NAME#draft/}"
|
||||
SRC_PACKAGE_NAME=${REPO_NAME}-source-${TARGET_RELEASE_VERSION}
|
||||
SRC_PACKAGE_TAR=${SRC_PACKAGE_NAME}.tar
|
||||
SRC_PACKAGE_TAR_GZ=${SRC_PACKAGE_NAME}.tar.gz
|
||||
SRC_PACKAGE_ZIP=${SRC_PACKAGE_NAME}.zip
|
||||
NPM_PACKAGE_NAME=${REPO_NAME}-npm-${TARGET_RELEASE_VERSION}
|
||||
|
||||
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "TARGET_RELEASE_VERSION=$TARGET_RELEASE_VERSION" >> $GITHUB_ENV
|
||||
echo "SRC_PACKAGE_NAME=$SRC_PACKAGE_NAME" >> $GITHUB_ENV
|
||||
echo "SRC_PACKAGE_TAR=$SRC_PACKAGE_TAR" >> $GITHUB_ENV
|
||||
echo "SRC_PACKAGE_TAR_GZ=$SRC_PACKAGE_TAR_GZ" >> $GITHUB_ENV
|
||||
echo "SRC_PACKAGE_ZIP=$SRC_PACKAGE_ZIP" >> $GITHUB_ENV
|
||||
echo "NPM_PACKAGE_NAME=$NPM_PACKAGE_NAME" >> $GITHUB_ENV
|
||||
|
||||
echo "REPO_NAME=$REPO_NAME"
|
||||
echo "TAG_NAME=$TAG_NAME"
|
||||
echo "TARGET_RELEASE_VERSION=$TARGET_RELEASE_VERSION"
|
||||
echo "SRC_PACKAGE_NAME=$SRC_PACKAGE_NAME"
|
||||
echo "SRC_PACKAGE_TAR=$SRC_PACKAGE_TAR"
|
||||
echo "SRC_PACKAGE_TAR_GZ=$SRC_PACKAGE_TAR_GZ"
|
||||
echo "SRC_PACKAGE_ZIP=$SRC_PACKAGE_ZIP"
|
||||
echo "NPM_PACKAGE_NAME=$NPM_PACKAGE_NAME"
|
||||
|
||||
- name: Verify Target Release Version
|
||||
run: |
|
||||
PACKAGE_VERSION=$(jq -r '.version' package.json)
|
||||
if [ $PACKAGE_VERSION != "$TARGET_RELEASE_VERSION" ]; then
|
||||
if [ "$PACKAGE_VERSION" != "$TARGET_RELEASE_VERSION" ]; then
|
||||
echo "Mismatch version detected between tag version ($TARGET_RELEASE_VERSION) and package version ($PACKAGE_VERSION)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "plugin.xml" ]; then
|
||||
PLUGIN_VERSION=$(yq -p=xml -o=json '.plugin.+@version' plugin.xml)
|
||||
if [ $PLUGIN_VERSION != "$TARGET_RELEASE_VERSION" ]; then
|
||||
PLUGIN_VERSION=$(yq -p=xml -o=json '.plugin.+@version' plugin.xml | jq -r .)
|
||||
if [ "$PLUGIN_VERSION" != "$TARGET_RELEASE_VERSION" ]; then
|
||||
echo "Mismatch version detected between tag version ($TARGET_RELEASE_VERSION) and plugin version ($PLUGIN_VERSION)"
|
||||
exit 1
|
||||
fi
|
||||
@@ -68,23 +89,51 @@ jobs:
|
||||
|
||||
- name: Generate "tgz" npm convenience package
|
||||
run: |-
|
||||
npm install
|
||||
npm ci
|
||||
NPM_PKG_NAME=$(npm pack --json | jq -r '.[0].filename')
|
||||
mv ./.asf-release/$NPM_PKG_NAME ./.asf-release/${REPO_NAME}-npm-${TARGET_RELEASE_VERSION}.tgz
|
||||
mv ./.asf-release/$NPM_PKG_NAME ./.asf-release/${NPM_PACKAGE_NAME}.tgz
|
||||
env:
|
||||
TZ: UTC
|
||||
|
||||
- name: Generate "tar" source package
|
||||
run: |-
|
||||
export SRC_LAST_COMMIT_EPOCH=$(git log -1 --format=%ct "$TAG_NAME")
|
||||
|
||||
git archive \
|
||||
--prefix=$SRC_PACKAGE_NAME/ \
|
||||
--mtime=$SRC_LAST_COMMIT_EPOCH \
|
||||
-o ./.asf-release/${SRC_PACKAGE_TAR} \
|
||||
$TAG_NAME
|
||||
env:
|
||||
TZ: UTC
|
||||
|
||||
- name: Generate "tar.gz" source archive
|
||||
working-directory: ./.asf-release
|
||||
run: |-
|
||||
git archive --format=tar.gz \
|
||||
--prefix=${REPO_NAME}-source-${TARGET_RELEASE_VERSION}/ \
|
||||
-o ./.asf-release/${REPO_NAME}-source-${TARGET_RELEASE_VERSION}.tar.gz \
|
||||
${TAG_NAME}
|
||||
gzip -n -9 -c "$SRC_PACKAGE_TAR" > "$SRC_PACKAGE_TAR_GZ"
|
||||
env:
|
||||
TZ: UTC
|
||||
|
||||
- name: Generate "zip" source archive
|
||||
working-directory: ./.asf-release
|
||||
run: |-
|
||||
git archive --format=zip \
|
||||
--prefix=${REPO_NAME}-source-${TARGET_RELEASE_VERSION}/ \
|
||||
-o ./.asf-release/${REPO_NAME}-source-${TARGET_RELEASE_VERSION}.zip \
|
||||
${TAG_NAME}
|
||||
export ASF_RELEASE_DIR=$(pwd)
|
||||
export TMP_DIR=$(mktemp -d)
|
||||
|
||||
tar -xf "$SRC_PACKAGE_TAR" -C "$TMP_DIR"
|
||||
(
|
||||
cd "$TMP_DIR"
|
||||
find . -type f | LC_ALL=C sort | zip -X -q "$ASF_RELEASE_DIR/$SRC_PACKAGE_ZIP" -@
|
||||
)
|
||||
rm -rf $TMP_DIR
|
||||
env:
|
||||
TZ: UTC
|
||||
|
||||
- name: Cleanup Process
|
||||
working-directory: ./.asf-release
|
||||
run: |-
|
||||
rm -rf $SRC_PACKAGE_TAR
|
||||
rm -rf .gitkeep
|
||||
|
||||
- name: Create Sign and Checksum
|
||||
working-directory: .asf-release
|
||||
@@ -98,11 +147,8 @@ jobs:
|
||||
env:
|
||||
CORDOVA_GPG_SECRET_KEY: ${{ secrets.CORDOVA_GPG_SECRET_KEY }}
|
||||
|
||||
- name: Remove ".gitkeep" from ".asf-release"
|
||||
run: rm -rf ./.asf-release/.gitkeep
|
||||
|
||||
- name: Upload to Apache Trusted Release (ATR)
|
||||
uses: apache/tooling-actions/upload-to-atr@b7e972c11790ee16eca101900af1b3c7fd1b106e
|
||||
uses: apache/tooling-actions/upload-to-atr@f5f4c0e7ddfbde6b1f8288cef36324c6def68051
|
||||
with:
|
||||
project: ${{ env.REPO_NAME }}
|
||||
version: ${{ env.TARGET_RELEASE_VERSION }}
|
||||
|
||||
@@ -34,13 +34,16 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout project
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 1
|
||||
|
||||
# Check license headers (v2.0.0)
|
||||
- uses: erisu/apache-rat-action@46fb01ce7d8f76bdcd7ab10e7af46e1ea95ca01c
|
||||
# Check license headers
|
||||
- uses: erisu/apache-rat-action@30c94d10ed21e6f6fd5590dc5c158f58cae7a0dd # v3.0.0
|
||||
|
||||
# Setup environment with node
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
@@ -48,8 +51,8 @@ jobs:
|
||||
- name: npm install packages
|
||||
run: npm ci
|
||||
|
||||
# Check node package licenses (v2.0.1)
|
||||
- uses: erisu/license-checker-action@99cffa11264fe545fd0baa6c13bca5a00ae608f2
|
||||
# Check node package licenses
|
||||
- uses: erisu/license-checker-action@04511f4c052b5773f11e1c65b42cda88235c62ae # v2.1.0
|
||||
with:
|
||||
license-config: 'licence_checker.yml'
|
||||
include-asf-category-a: true
|
||||
|
||||
@@ -74,3 +74,6 @@ coverage/
|
||||
# ASF release workspace
|
||||
.asf-release/
|
||||
!.asf-release/.gitkeep
|
||||
|
||||
# Gradle problems report, build artifact
|
||||
problems-report.html
|
||||
|
||||
@@ -15,15 +15,11 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# This file used by ATR
|
||||
|
||||
**/*.txt
|
||||
.git/
|
||||
coverage/
|
||||
framework/build/
|
||||
node_modules/
|
||||
templates/project/gitignore
|
||||
test/androidx/app/.gitignore
|
||||
test/androidx/app/build/
|
||||
test/androidx/build/
|
||||
test/androidx/tools/
|
||||
|
||||
@@ -21,6 +21,70 @@
|
||||
|
||||
## Release Notes for Cordova (Android)
|
||||
|
||||
### 15.1.0
|
||||
|
||||
**Features:**
|
||||
|
||||
* feat: call new method `CordovaPlugin.onRequestPermissionsResult` ([#1855](https://github.com/apache/cordova-android/pull/1855)) [[b66f0f33](https://github.com/apache/cordova-android/commit/b66f0f33)]
|
||||
* feat: deprecate `PermissionHelper` ([#1857](https://github.com/apache/cordova-android/pull/1857)) [[8c839764](https://github.com/apache/cordova-android/commit/8c839764)]
|
||||
* feat: remove unused private Method `PermissionHelper.deliverPermissionResult` ([#1858](https://github.com/apache/cordova-android/pull/1858)) [[9c3d8268](https://github.com/apache/cordova-android/commit/9c3d8268)]
|
||||
|
||||
**Fixes:**
|
||||
|
||||
* fix: webview loses scrollability and creates empty bottom space ([#1924](https://github.com/apache/cordova-android/pull/1924)) [[b91144c0](https://github.com/apache/cordova-android/commit/b91144c0)]
|
||||
* fix: handle permissions for getUserMedia ([#1895](https://github.com/apache/cordova-android/pull/1895)) [[24502178](https://github.com/apache/cordova-android/commit/24502178)]
|
||||
* fix: overwritten backbutton not firing on first time by hardware button and never on back gesture ([#1910](https://github.com/apache/cordova-android/pull/1910)) [[0bfbc20b](https://github.com/apache/cordova-android/commit/0bfbc20b)]
|
||||
* fix(android): use AndroidX `OnBackPressedCallback` instead of `OnBackInvokedCallback` ([#1903](https://github.com/apache/cordova-android/pull/1903)) [[9064bc07](https://github.com/apache/cordova-android/commit/9064bc07)]
|
||||
* fix(gradle-9): unable to resolve class XmlParser for Groovy 4.x ([#1896](https://github.com/apache/cordova-android/pull/1896)) [[9ae489bd](https://github.com/apache/cordova-android/commit/9ae489bd)]
|
||||
* fix(statusbar.js): remove trailing whitespace in comment for lint ([#1970](https://github.com/apache/cordova-android/pull/1970)) [[cdbeb603](https://github.com/apache/cordova-android/commit/cdbeb603)]
|
||||
* fix(statusbar): Properly handle CSS colours ([#1955](https://github.com/apache/cordova-android/pull/1955)) [[dd3fd357](https://github.com/apache/cordova-android/commit/dd3fd357)]
|
||||
* fix(SystemBarPlugin): remove `canEdgeToEdge` check for `execute` method ([#1971](https://github.com/apache/cordova-android/pull/1971)) [[61ebdcde](https://github.com/apache/cordova-android/commit/61ebdcde)]
|
||||
* fix(SystemBarPlugin): remove sentinel value `INVALID_COLOR`, use `null` instead ([#1939](https://github.com/apache/cordova-android/pull/1939)) [[f4ecf997](https://github.com/apache/cordova-android/commit/f4ecf997)]
|
||||
|
||||
**Others**
|
||||
|
||||
* chore: cleanup PermissionHelper ([#1925](https://github.com/apache/cordova-android/pull/1925)) [[7dd7f504](https://github.com/apache/cordova-android/commit/7dd7f504)]
|
||||
* chore: bump package 15.1.0-dev.0 & update package-lock ([#1964](https://github.com/apache/cordova-android/pull/1964)) [[929f2054](https://github.com/apache/cordova-android/commit/929f2054)]
|
||||
* chore: remove redundant Hello World template files ([#1926](https://github.com/apache/cordova-android/pull/1926)) [[56e263fe](https://github.com/apache/cordova-android/commit/56e263fe)]
|
||||
* chore: simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin ([#1902](https://github.com/apache/cordova-android/pull/1902)) [[190076ba](https://github.com/apache/cordova-android/commit/190076ba)]
|
||||
* chore: ignore gradle build artificat `problems-report.html` ([#1912](https://github.com/apache/cordova-android/pull/1912)) [[b1705d83](https://github.com/apache/cordova-android/commit/b1705d83)]
|
||||
* chore: more license header updates ([#1909](https://github.com/apache/cordova-android/pull/1909)) [[1f70d396](https://github.com/apache/cordova-android/commit/1f70d396)]
|
||||
* chore: update package-lock ([#1905](https://github.com/apache/cordova-android/pull/1905)) [[af56a003](https://github.com/apache/cordova-android/commit/af56a003)]
|
||||
* chore(ci): update & clean workflow ([#1966](https://github.com/apache/cordova-android/pull/1966)) [[654b03a3](https://github.com/apache/cordova-android/commit/654b03a3)]
|
||||
* chore(ci): improve workflows & dependabot ([#1928](https://github.com/apache/cordova-android/pull/1928)) [[08c4fd1e](https://github.com/apache/cordova-android/commit/08c4fd1e)]
|
||||
* chore(deps-dev): bump js-yaml from 4.1.1 to 4.2.0 ([#1960](https://github.com/apache/cordova-android/pull/1960)) [[ebccedf6](https://github.com/apache/cordova-android/commit/ebccedf6)]
|
||||
* chore(deps-dev): bump tmp from 0.2.6 to 0.2.7 ([#1956](https://github.com/apache/cordova-android/pull/1956)) [[d90eeecb](https://github.com/apache/cordova-android/commit/d90eeecb)]
|
||||
* chore(deps-dev): bump tmp from 0.2.5 to 0.2.6 ([#1945](https://github.com/apache/cordova-android/pull/1945)) [[a63c1e18](https://github.com/apache/cordova-android/commit/a63c1e18)]
|
||||
* chore(deps-dev): bump c8 from 10.1.3 to 11.0.0 ([#1941](https://github.com/apache/cordova-android/pull/1941)) [[74fbbdce](https://github.com/apache/cordova-android/commit/74fbbdce)]
|
||||
* chore(deps-dev): bump jasmine from 6.1.0 to 6.2.0 ([#1932](https://github.com/apache/cordova-android/pull/1932)) [[90b4b057](https://github.com/apache/cordova-android/commit/90b4b057)]
|
||||
* chore(deps): bump github/codeql-action/analyze from 4.36.3 to 4.37.0 ([#1973](https://github.com/apache/cordova-android/pull/1973)) [[80658ea4](https://github.com/apache/cordova-android/commit/80658ea4)]
|
||||
* chore(deps): bump github/codeql-action/init from 4.36.3 to 4.37.0 ([#1972](https://github.com/apache/cordova-android/pull/1972)) [[89771e64](https://github.com/apache/cordova-android/commit/89771e64)]
|
||||
* chore(deps): bump actions/setup-java from 5.4.0 to 5.5.0 ([#1974](https://github.com/apache/cordova-android/pull/1974)) [[065a99d8](https://github.com/apache/cordova-android/commit/065a99d8)]
|
||||
* chore(deps): bump github/codeql-action/analyze from 4.36.2 to 4.36.3 ([#1969](https://github.com/apache/cordova-android/pull/1969)) [[d830222e](https://github.com/apache/cordova-android/commit/d830222e)]
|
||||
* chore(deps): bump github/codeql-action/init from 4.36.2 to 4.36.3 ([#1968](https://github.com/apache/cordova-android/pull/1968)) [[1e2f0ca6](https://github.com/apache/cordova-android/commit/1e2f0ca6)]
|
||||
* chore(deps): bump codecov/codecov-action from 4.6.0 to 7.0.0 ([#1954](https://github.com/apache/cordova-android/pull/1954)) [[acbc5b48](https://github.com/apache/cordova-android/commit/acbc5b48)]
|
||||
* chore(deps): bump actions/setup-java from 5.3.0 to 5.4.0 ([#1965](https://github.com/apache/cordova-android/pull/1965)) [[cb52fb8d](https://github.com/apache/cordova-android/commit/cb52fb8d)]
|
||||
* chore(deps): bump actions/checkout from 6.0.3 to 7.0.0 ([#1959](https://github.com/apache/cordova-android/pull/1959)) [[79771499](https://github.com/apache/cordova-android/commit/79771499)]
|
||||
* chore(deps): bump actions/setup-java from 5.2.0 to 5.3.0 ([#1958](https://github.com/apache/cordova-android/pull/1958)) [[e53dc373](https://github.com/apache/cordova-android/commit/e53dc373)]
|
||||
* chore(deps): bump actions/checkout from 6.0.2 to 6.0.3 ([#1952](https://github.com/apache/cordova-android/pull/1952)) [[703ebeae](https://github.com/apache/cordova-android/commit/703ebeae)]
|
||||
* chore(deps): bump github/codeql-action from 4.36.0 to 4.36.2 ([#1953](https://github.com/apache/cordova-android/pull/1953)) [[363a9a77](https://github.com/apache/cordova-android/commit/363a9a77)]
|
||||
* chore(deps): bump github/codeql-action from 4.35.5 to 4.36.0 ([#1944](https://github.com/apache/cordova-android/pull/1944)) [[a1f75a3e](https://github.com/apache/cordova-android/commit/a1f75a3e)]
|
||||
* chore(deps): bump erisu/apache-rat-action from 2.0.0 to 3.0.0 ([#1937](https://github.com/apache/cordova-android/pull/1937)) [[4ce731da](https://github.com/apache/cordova-android/commit/4ce731da)]
|
||||
* chore(deps): bump semver from 7.7.4 to 7.8.0 ([#1934](https://github.com/apache/cordova-android/pull/1934)) [[c636f8bb](https://github.com/apache/cordova-android/commit/c636f8bb)]
|
||||
* chore(deps): bump erisu/license-checker-action from 2.0.1 to 2.1.0 ([#1930](https://github.com/apache/cordova-android/pull/1930)) [[0baa901d](https://github.com/apache/cordova-android/commit/0baa901d)]
|
||||
* chore(deps): bump @xmldom/xmldom from 0.8.12 to 0.8.13 ([#1918](https://github.com/apache/cordova-android/pull/1918)) [[0d6fdd17](https://github.com/apache/cordova-android/commit/0d6fdd17)]
|
||||
* chore(deps): bump lodash from 4.17.23 to 4.18.1 ([#1914](https://github.com/apache/cordova-android/pull/1914)) [[7b33c5dd](https://github.com/apache/cordova-android/commit/7b33c5dd)]
|
||||
* chore(deps): bump @xmldom/xmldom from 0.8.11 to 0.8.12 ([#1911](https://github.com/apache/cordova-android/pull/1911)) [[c44a4627](https://github.com/apache/cordova-android/commit/c44a4627)]
|
||||
* chore(deps): bump picomatch ([#1908](https://github.com/apache/cordova-android/pull/1908)) [[2868f93a](https://github.com/apache/cordova-android/commit/2868f93a)]
|
||||
* chore(deps): bump minimatch ([#1898](https://github.com/apache/cordova-android/pull/1898)) [[31f3d57c](https://github.com/apache/cordova-android/commit/31f3d57c)]
|
||||
* chore(gh-action): improve draft-release workflow ([#1906](https://github.com/apache/cordova-android/pull/1906)) [[340eade2](https://github.com/apache/cordova-android/commit/340eade2)]
|
||||
* chore(INFRA): Set up default protection ruleset for default and release branches ([#1927](https://github.com/apache/cordova-android/pull/1927)) [[f490531d](https://github.com/apache/cordova-android/commit/f490531d)]
|
||||
* chore(post-release): bump v15.0.1-dev.0 ([#1899](https://github.com/apache/cordova-android/pull/1899)) [[c02d1b03](https://github.com/apache/cordova-android/commit/c02d1b03)]
|
||||
* doc: improve documentation of `onRequestPermissionResult` and `onRequestPermissionsResult` ([#1920](https://github.com/apache/cordova-android/pull/1920)) [[1d01ea1f](https://github.com/apache/cordova-android/commit/1d01ea1f)]
|
||||
* doc(CordovaPreferences): Improve documentation for using Long.decode instead of Integer.decode ([#1943](https://github.com/apache/cordova-android/pull/1943)) [[661fadd0](https://github.com/apache/cordova-android/commit/661fadd0)]
|
||||
* doc(statusbar.js): document `visible` property and `setBackgroundColor` method ([#1961](https://github.com/apache/cordova-android/pull/1961)) [[50ee09e4](https://github.com/apache/cordova-android/commit/50ee09e4)]
|
||||
* refactor: address warnings in SystemWebChromeClient.java ([#1951](https://github.com/apache/cordova-android/pull/1951)) [[80491e9a](https://github.com/apache/cordova-android/commit/80491e9a)]
|
||||
|
||||
### 15.0.0
|
||||
|
||||
**Breaking Changes:**
|
||||
|
||||
+16
-16
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
+16
-16
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+16
-18
@@ -1,22 +1,20 @@
|
||||
/*
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+16
-18
@@ -1,22 +1,20 @@
|
||||
/*
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
*/
|
||||
|
||||
// The last resume event that was received that had the result of a plugin call.
|
||||
|
||||
Vendored
+16
-18
@@ -1,22 +1,20 @@
|
||||
/*
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
*/
|
||||
|
||||
var exec = require('cordova/exec');
|
||||
|
||||
+16
-18
@@ -1,22 +1,20 @@
|
||||
/*
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
*/
|
||||
|
||||
var exec = require('cordova/exec');
|
||||
|
||||
+48
-35
@@ -1,22 +1,21 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
*/
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
*/
|
||||
|
||||
var exec = require('cordova/exec');
|
||||
|
||||
@@ -27,6 +26,11 @@ var statusBar = {};
|
||||
const statusBarScript = document.createElement('script');
|
||||
document.head.appendChild(statusBarScript);
|
||||
|
||||
/**
|
||||
* Sets the visibility of the status bar, which will only work if Android EdgeToEdge is disabled.
|
||||
* If cordova-plugin-statusbar is used, the call will be forwarded to `window.StatusBar.show` or
|
||||
* `window.StatusBar.hide` of the plugin.
|
||||
*/
|
||||
Object.defineProperty(statusBar, 'visible', {
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
@@ -53,6 +57,14 @@ Object.defineProperty(statusBar, 'visible', {
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Sets the background color of the visible status bar.
|
||||
* Supports valid CSS color values, e.g. `rebeccapurple`, `#RRGGBBAA`, `rgb(255 0 153)`.
|
||||
*
|
||||
* If cordova-plugin-statusbar is installed, calls are forwarded to the plugin API:
|
||||
* `window.StatusBar.backgroundColorByHexString`
|
||||
* See {@link https://s.apache.org/cdv-plugin-statusbar} for cordova-plugin-statusbar details.
|
||||
*/
|
||||
Object.defineProperty(statusBar, 'setBackgroundColor', {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
@@ -61,28 +73,29 @@ Object.defineProperty(statusBar, 'setBackgroundColor', {
|
||||
statusBarScript.style.color = value;
|
||||
var rgbStr = window.getComputedStyle(statusBarScript).getPropertyValue('color');
|
||||
|
||||
if (!rgbStr.match(/^rgb/)) { return; }
|
||||
|
||||
var rgbVals = rgbStr.match(/\d+/g).map(function (v) { return parseInt(v, 10); });
|
||||
|
||||
if (rgbVals.length < 3) {
|
||||
if (!rgbStr.match(/^rgb/)) {
|
||||
return;
|
||||
} else if (rgbVals.length === 3) {
|
||||
rgbVals = [255].concat(rgbVals);
|
||||
}
|
||||
|
||||
// TODO: Use `padStart(2, '0')` once SDK 24 is dropped.
|
||||
const padRgb = (val) => {
|
||||
const hex = val.toString(16);
|
||||
return hex.length === 1 ? '0' + hex : hex;
|
||||
};
|
||||
const a = padRgb(rgbVals[0]);
|
||||
const r = padRgb(rgbVals[1]);
|
||||
const g = padRgb(rgbVals[2]);
|
||||
const b = padRgb(rgbVals[3]);
|
||||
const hexStr = '#' + a + r + g + b;
|
||||
var rgbVals = rgbStr.match(/[\d.]+/g).map(function (v, i) { return (i < 3) ? parseInt(v, 10) : parseFloat(v); });
|
||||
if (rgbVals.length < 3) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (window.StatusBar) {
|
||||
// try to let the StatusBar plugin handle it
|
||||
// TODO: Use `padStart(2, '0')` once SDK 24 is dropped.
|
||||
const padRgb = (val) => {
|
||||
const hex = val.toString(16);
|
||||
return hex.length === 1 ? '0' + hex : hex;
|
||||
};
|
||||
|
||||
const r = padRgb(rgbVals[0]);
|
||||
const g = padRgb(rgbVals[1]);
|
||||
const b = padRgb(rgbVals[2]);
|
||||
const a = padRgb(255 * (rgbVals[3] !== undefined ? rgbVals[3] : 1.0));
|
||||
|
||||
const hexStr = '#' + a + r + g + b;
|
||||
window.StatusBar.backgroundColorByHexString(hexStr);
|
||||
} else {
|
||||
exec(null, null, 'SystemBarPlugin', 'setStatusBarBackgroundColor', rgbVals);
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
@@ -17,6 +17,7 @@
|
||||
under the License.
|
||||
*/
|
||||
|
||||
import groovy.xml.XmlParser
|
||||
import java.util.regex.Pattern
|
||||
import io.github.g00fy2.versioncompare.Version
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
@@ -121,8 +121,7 @@ public class CordovaActivity extends AppCompatActivity {
|
||||
// need to activate preferences before super.onCreate to avoid "requestFeature() must be called before adding content" exception
|
||||
loadConfig();
|
||||
|
||||
canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false)
|
||||
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM;
|
||||
canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false);
|
||||
|
||||
String logLevel = preferences.getString("loglevel", "ERROR");
|
||||
LOG.setLogLevel(logLevel);
|
||||
@@ -226,13 +225,22 @@ public class CordovaActivity extends AppCompatActivity {
|
||||
|
||||
boolean isStatusBarVisible = statusBarView.getVisibility() != View.GONE;
|
||||
int top = isStatusBarVisible && !canEdgeToEdge && !isFullScreen ? bars.top : 0;
|
||||
int bottom = !canEdgeToEdge && !isFullScreen ? bars.bottom : 0;
|
||||
int left = !canEdgeToEdge && !isFullScreen ? bars.left : 0;
|
||||
int right = !canEdgeToEdge && !isFullScreen ? bars.right : 0;
|
||||
|
||||
Insets imeInsets = insets.getInsets(WindowInsetsCompat.Type.ime());
|
||||
// When in fullscreen mode, we ignore bottom system insets (like the navigation bar)
|
||||
// to allow the WebView to span the entire screen and avoid being pushed up.
|
||||
int bottom = isFullScreen ? 0 : canEdgeToEdge ? imeInsets.bottom : Math.max(bars.bottom, imeInsets.bottom);
|
||||
|
||||
FrameLayout.LayoutParams webViewParams = (FrameLayout.LayoutParams) webView.getLayoutParams();
|
||||
webViewParams.setMargins(left, top, right, bottom);
|
||||
webView.setLayoutParams(webViewParams);
|
||||
// Only update layout margins if the values have actually changed.
|
||||
// This prevents redundant layout passes and potential infinite layout loops
|
||||
if (webViewParams.leftMargin != left || webViewParams.topMargin != top
|
||||
|| webViewParams.rightMargin != right || webViewParams.bottomMargin != bottom) {
|
||||
webViewParams.setMargins(left, top, right, bottom);
|
||||
webView.setLayoutParams(webViewParams);
|
||||
}
|
||||
|
||||
FrameLayout.LayoutParams statusBarParams = new FrameLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
@@ -578,7 +586,7 @@ public class CordovaActivity extends AppCompatActivity {
|
||||
|
||||
try
|
||||
{
|
||||
cordovaInterface.onRequestPermissionResult(requestCode, permissions, grantResults);
|
||||
cordovaInterface.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
}
|
||||
catch (JSONException e)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
@@ -217,11 +217,15 @@ public class CordovaInterfaceImpl implements CordovaInterface {
|
||||
* @param permissions
|
||||
* @param grantResults
|
||||
*/
|
||||
public void onRequestPermissionResult(int requestCode, String[] permissions,
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions,
|
||||
int[] grantResults) throws JSONException {
|
||||
Pair<CordovaPlugin, Integer> callback = permissionResultCallbacks.getAndRemoveCallback(requestCode);
|
||||
if(callback != null) {
|
||||
// This one is deprecated - see https://github.com/apache/cordova-android/issues/592
|
||||
// and should be removed in a future release
|
||||
callback.first.onRequestPermissionResult(callback.second, permissions, grantResults);
|
||||
// Call the new method
|
||||
callback.first.onRequestPermissionsResult(callback.second, permissions, grantResults);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
@@ -416,7 +416,14 @@ public class CordovaPlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the system when the user grants permissions
|
||||
* Forwarded system call to the plugin when the user grants permissions,
|
||||
* denies them or the request was interrupted.
|
||||
* This is a legacy method and should not be used anymore.
|
||||
* Instead {@link #onRequestPermissionsResult} should be used.
|
||||
*
|
||||
* Note: The system calls {@link CordovaActivity#onRequestPermissionsResult(int, String[], int[])},
|
||||
* which calls {@link CordovaInterfaceImpl#onRequestPermissionsResult(int, String[], int[])},
|
||||
* and finally this method.
|
||||
*
|
||||
* @param requestCode
|
||||
* @param permissions
|
||||
@@ -430,11 +437,17 @@ public class CordovaPlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the system when the user grants permissions
|
||||
* Forwarded system call to the plugin when the user grants permissions,
|
||||
* denies them or the request was interrupted.
|
||||
*
|
||||
* Note: The system calls {@link CordovaActivity#onRequestPermissionsResult(int, String[], int[])},
|
||||
* which calls {@link CordovaInterfaceImpl#onRequestPermissionsResult(int, String[], int[])},
|
||||
* and finally this method.
|
||||
*
|
||||
* @param requestCode
|
||||
* @param permissions
|
||||
* @param grantResults
|
||||
* @see https://developer.android.com/reference/android/app/Activity#onRequestPermissionsResult(int,%20java.lang.String[],%20int[])
|
||||
*/
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions,
|
||||
int[] grantResults) throws JSONException {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
@@ -74,7 +74,10 @@ public class CordovaPreferences {
|
||||
name = name.toLowerCase(Locale.ENGLISH);
|
||||
String value = prefs.get(name);
|
||||
if (value != null) {
|
||||
// Use Integer.decode() can't handle it if the highest bit is set.
|
||||
// Some 32-bit hex values (for example, 0x80000000) are valid int bit patterns
|
||||
// but exceed Integer.MAX_VALUE when read as positive numbers. Integer.decode()
|
||||
// rejects such values with NumberFormatException, so decode as long first and
|
||||
// cast to int to preserve the intended 32-bit value.
|
||||
return (int)(long)Long.decode(value);
|
||||
}
|
||||
return defaultValue;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
@@ -33,7 +33,7 @@ import android.webkit.WebChromeClient.CustomViewCallback;
|
||||
* are not expected to implement it.
|
||||
*/
|
||||
public interface CordovaWebView {
|
||||
public static final String CORDOVA_VERSION = "15.0.0";
|
||||
public static final String CORDOVA_VERSION = "15.1.0";
|
||||
|
||||
void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
@@ -29,14 +29,16 @@ import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.SystemClock;
|
||||
import android.content.IntentFilter;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.view.KeyEvent;
|
||||
import android.window.OnBackInvokedCallback;
|
||||
import android.window.OnBackInvokedDispatcher;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import androidx.activity.OnBackPressedCallback;
|
||||
import androidx.activity.OnBackPressedDispatcherOwner;
|
||||
|
||||
/**
|
||||
* This class exposes methods in Cordova that can be called from JavaScript.
|
||||
*/
|
||||
@@ -48,7 +50,7 @@ public class CoreAndroid extends CordovaPlugin {
|
||||
private CallbackContext messageChannel;
|
||||
private PluginResult pendingResume;
|
||||
private PluginResult pendingPause;
|
||||
private OnBackInvokedCallback backCallback;
|
||||
private OnBackPressedCallback backCallback;
|
||||
private final Object messageChannelLock = new Object();
|
||||
private final Object backButtonHandlerLock = new Object();
|
||||
|
||||
@@ -252,31 +254,65 @@ public class CoreAndroid extends CordovaPlugin {
|
||||
* @param override T=override, F=cancel override
|
||||
*/
|
||||
public void overrideBackbutton(boolean override) {
|
||||
LOG.i("App", "WARNING: Back Button Default Behavior will be overridden. The backbutton event will be fired!");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA) {
|
||||
if (override) {
|
||||
synchronized (backButtonHandlerLock) {
|
||||
if (backCallback == null) {
|
||||
// The callback is intentionally empty. Since API 36, intercepting the back button is ignored, which means
|
||||
// the onDispatchKeyEvent boolean result won't actually stop native from consuming the back button and doing
|
||||
// it's own logic, UNLESS if there is an OnBackInvokedCallback registered on the dispatcher.
|
||||
// The key dispatch events will still fire, which still handles propagating back button events to the webview.
|
||||
// See https://developer.android.com/about/versions/16/behavior-changes-16#predictive-back for more info on the caveat.
|
||||
backCallback = () -> {};
|
||||
this.cordova.getActivity().getOnBackInvokedDispatcher().registerOnBackInvokedCallback(OnBackInvokedDispatcher.PRIORITY_DEFAULT, backCallback);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
synchronized (backButtonHandlerLock) {
|
||||
if (backCallback != null) {
|
||||
this.cordova.getActivity().getOnBackInvokedDispatcher().unregisterOnBackInvokedCallback(backCallback);
|
||||
backCallback = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cordova.getActivity() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
webView.setButtonPlumbedToJs(KeyEvent.KEYCODE_BACK, override);
|
||||
final boolean shouldOverride = override;
|
||||
cordova.getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (shouldOverride) {
|
||||
LOG.i("App", "WARNING: Back Button Default Behavior will be overridden. The backbutton event will be fired!");
|
||||
synchronized (backButtonHandlerLock) {
|
||||
if (backCallback == null) {
|
||||
backCallback = new OnBackPressedCallback(true) {
|
||||
@Override
|
||||
public void handleOnBackPressed() {
|
||||
dispatchBackKeyEvent();
|
||||
}
|
||||
};
|
||||
OnBackPressedDispatcherOwner backPressedDispatcherOwner = cordova.getActivity();
|
||||
backPressedDispatcherOwner.getOnBackPressedDispatcher().addCallback(backPressedDispatcherOwner, backCallback);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
synchronized (backButtonHandlerLock) {
|
||||
if (backCallback != null) {
|
||||
backCallback.remove();
|
||||
backCallback = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
webView.setButtonPlumbedToJs(KeyEvent.KEYCODE_BACK, shouldOverride);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void dispatchBackKeyEvent() {
|
||||
// Build a synthetic BACK key press (DOWN + UP) and route it through the WebView.
|
||||
// This lets Cordova's existing key handling fire the JS "backbutton" event.
|
||||
final long eventTime = SystemClock.uptimeMillis();
|
||||
final KeyEvent downEvent = new KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK, 0);
|
||||
final KeyEvent upEvent = new KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK, 0);
|
||||
|
||||
final boolean handledDown = webView.getView().dispatchKeyEvent(downEvent);
|
||||
final boolean handledUp = webView.getView().dispatchKeyEvent(upEvent);
|
||||
|
||||
// If either event was consumed, Cordova/WebView already handled back behavior.
|
||||
if (handledDown || handledUp) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise, delegate to Android's default back dispatcher.
|
||||
// Temporarily disable this callback to avoid recursive re-entry.
|
||||
backCallback.setEnabled(false);
|
||||
try {
|
||||
cordova.getActivity().getOnBackPressedDispatcher().onBackPressed();
|
||||
} finally {
|
||||
backCallback.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
@@ -18,19 +18,22 @@
|
||||
*/
|
||||
package org.apache.cordova;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.json.JSONException;
|
||||
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
/**
|
||||
* This class provides reflective methods for permission requesting and checking so that plugins
|
||||
* This class is permission helper class when compiling against older versions of cordova-android pre 5.0.0
|
||||
* and provides reflective methods for permission requesting and checking so that plugins
|
||||
* written for cordova-android 5.0.0+ can still compile with earlier cordova-android versions.
|
||||
*
|
||||
* Some Cordova plugins still use this class, for example:
|
||||
* - https://github.com/apache/cordova-plugin-file/blob/master/src/android/FileUtils.java#L42
|
||||
* - https://github.com/apache/cordova-plugin-geolocation/blob/master/src/android/Geolocation.java#L27
|
||||
* - https://github.com/apache/cordova-plugin-camera/blob/master/src/android/CameraLauncher.java#L52
|
||||
* Before this class can be removed, those plugins need to be updated to call {@link CordovaInterface} methods directly.
|
||||
*
|
||||
* @deprecated As of cordova-android 5.0.0, this class is no longer needed and will be removed in a future release.
|
||||
* You can call directly into {@link CordovaInterface} methods instead with {@link CordovaPlugin#cordova}.
|
||||
*/
|
||||
@Deprecated
|
||||
public class PermissionHelper {
|
||||
private static final String LOG_TAG = "CordovaPermissionHelper";
|
||||
|
||||
/**
|
||||
* Requests a "dangerous" permission for the application at runtime. This is a helper method
|
||||
* alternative to cordovaInterface.requestPermission() that does not require the project to be
|
||||
@@ -40,7 +43,9 @@ public class PermissionHelper {
|
||||
* @param requestCode A requestCode to be passed to the plugin's onRequestPermissionResult()
|
||||
* along with the result of the permission request
|
||||
* @param permission The permission to be requested
|
||||
* @deprecated As of cordova-android 5.0.0, use {@link CordovaInterface#requestPermission(CordovaPlugin, int, String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void requestPermission(CordovaPlugin plugin, int requestCode, String permission) {
|
||||
PermissionHelper.requestPermissions(plugin, requestCode, new String[] {permission});
|
||||
}
|
||||
@@ -54,7 +59,9 @@ public class PermissionHelper {
|
||||
* @param requestCode A requestCode to be passed to the plugin's onRequestPermissionResult()
|
||||
* along with the result of the permissions request
|
||||
* @param permissions The permissions to be requested
|
||||
* @deprecated As of cordova-android 5.0.0, use {@link CordovaInterface#requestPermissions(CordovaPlugin, int, String[])} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static void requestPermissions(CordovaPlugin plugin, int requestCode, String[] permissions) {
|
||||
plugin.cordova.requestPermissions(plugin, requestCode, permissions);
|
||||
}
|
||||
@@ -67,22 +74,10 @@ public class PermissionHelper {
|
||||
* @param plugin The plugin the permission is being checked against
|
||||
* @param permission The permission to be checked
|
||||
* @return True if the permission has already been granted and false otherwise
|
||||
* @deprecated As of cordova-android 5.0.0, use {@link CordovaInterface#hasPermission(String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean hasPermission(CordovaPlugin plugin, String permission) {
|
||||
return plugin.cordova.hasPermission(permission);
|
||||
}
|
||||
|
||||
private static void deliverPermissionResult(CordovaPlugin plugin, int requestCode, String[] permissions) {
|
||||
// Generate the request results
|
||||
int[] requestResults = new int[permissions.length];
|
||||
Arrays.fill(requestResults, PackageManager.PERMISSION_GRANTED);
|
||||
|
||||
try {
|
||||
// This one is deprecated - see https://github.com/apache/cordova-android/issues/592
|
||||
plugin.onRequestPermissionResult(requestCode, permissions, requestResults);
|
||||
plugin.onRequestPermissionsResult(requestCode, permissions, requestResults);
|
||||
} catch (JSONException e) {
|
||||
LOG.e(LOG_TAG, "JSONException when delivering permissions results", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
@@ -39,15 +39,15 @@ import androidx.core.view.WindowInsetsControllerCompat;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class SystemBarPlugin extends CordovaPlugin {
|
||||
static final String PLUGIN_NAME = "SystemBarPlugin";
|
||||
|
||||
static final int INVALID_COLOR = -1;
|
||||
|
||||
// Internal variables
|
||||
private Context context;
|
||||
private Resources resources;
|
||||
private int overrideStatusBarBackgroundColor = INVALID_COLOR;
|
||||
private Integer overrideStatusBarBackgroundColor = null;
|
||||
|
||||
private boolean canEdgeToEdge = false;
|
||||
|
||||
@@ -55,8 +55,7 @@ public class SystemBarPlugin extends CordovaPlugin {
|
||||
protected void pluginInitialize() {
|
||||
context = cordova.getContext();
|
||||
resources = context.getResources();
|
||||
canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false)
|
||||
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM;
|
||||
canEdgeToEdge = preferences.getBoolean("AndroidEdgeToEdge", false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,10 +80,6 @@ public class SystemBarPlugin extends CordovaPlugin {
|
||||
|
||||
@Override
|
||||
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
|
||||
if(canEdgeToEdge) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ("setStatusBarVisible".equals(action)) {
|
||||
boolean visible = args.getBoolean(0);
|
||||
cordova.getActivity().runOnUiThread(() -> setStatusBarVisible(visible));
|
||||
@@ -122,20 +117,16 @@ public class SystemBarPlugin extends CordovaPlugin {
|
||||
* If the supplied ARGB is invalid or fails to parse, it will silently ignore
|
||||
* the change request.
|
||||
*
|
||||
* @param argbVals {A, R, G, B}
|
||||
* @param argbVals {R, G, B, A}
|
||||
*/
|
||||
private void setStatusBarBackgroundColor(JSONArray argbVals) {
|
||||
try {
|
||||
int a = argbVals.getInt(0);
|
||||
int r = argbVals.getInt(1);
|
||||
int g = argbVals.getInt(2);
|
||||
int b = argbVals.getInt(3);
|
||||
String hexColor = String.format("#%02X%02X%02X%02X", a, r, g, b);
|
||||
int r = argbVals.getInt(0);
|
||||
int g = argbVals.getInt(1);
|
||||
int b = argbVals.getInt(2);
|
||||
int a = Math.round(255 * (float)argbVals.optDouble(3, 1.0));
|
||||
|
||||
int parsedColor = parseColorFromString(hexColor);
|
||||
if (parsedColor == INVALID_COLOR) return;
|
||||
|
||||
overrideStatusBarBackgroundColor = parsedColor;
|
||||
overrideStatusBarBackgroundColor = Color.argb(a, r, g, b);
|
||||
updateStatusBar(overrideStatusBarBackgroundColor);
|
||||
} catch (JSONException e) {
|
||||
// Silently skip
|
||||
@@ -146,26 +137,26 @@ public class SystemBarPlugin extends CordovaPlugin {
|
||||
* Attempt to update all system bars (status, navigation and gesture bars) in various points
|
||||
* of the apps life cycle.
|
||||
* For example:
|
||||
* 1. Device configurations between (E.g. between dark and light mode)
|
||||
* 2. User resumes the app
|
||||
* 3. App transitions from SplashScreen Theme to App's Theme
|
||||
* 1. Device configurations between (E.g. between dark and light mode)
|
||||
* 2. User resumes the app
|
||||
* 3. App transitions from SplashScreen Theme to App's Theme
|
||||
*/
|
||||
private void updateSystemBars() {
|
||||
// Update Root View Background Color
|
||||
int rootViewBackgroundColor = getPreferenceBackgroundColor();
|
||||
if (rootViewBackgroundColor == INVALID_COLOR) {
|
||||
Integer rootViewBackgroundColor = getPreferenceBackgroundColor();
|
||||
if (rootViewBackgroundColor == null) {
|
||||
rootViewBackgroundColor = canEdgeToEdge ? Color.TRANSPARENT : getUiModeColor();
|
||||
}
|
||||
updateRootView(rootViewBackgroundColor);
|
||||
|
||||
// Update StatusBar Background Color
|
||||
int statusBarBackgroundColor;
|
||||
if (overrideStatusBarBackgroundColor != INVALID_COLOR) {
|
||||
Integer statusBarBackgroundColor;
|
||||
if (overrideStatusBarBackgroundColor != null) {
|
||||
statusBarBackgroundColor = overrideStatusBarBackgroundColor;
|
||||
} else if (preferences.contains("StatusBarBackgroundColor")) {
|
||||
statusBarBackgroundColor = getPreferenceStatusBarBackgroundColor();
|
||||
} else if(preferences.contains("BackgroundColor")){
|
||||
statusBarBackgroundColor = rootViewBackgroundColor;
|
||||
} else if (preferences.contains("BackgroundColor")) {
|
||||
statusBarBackgroundColor = rootViewBackgroundColor;
|
||||
} else {
|
||||
statusBarBackgroundColor = canEdgeToEdge ? Color.TRANSPARENT : getUiModeColor();
|
||||
}
|
||||
@@ -262,34 +253,31 @@ public class SystemBarPlugin extends CordovaPlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the StatusBarBackgroundColor preference value.
|
||||
* If the value is missing or fails to parse, it will attempt to try to guess the background
|
||||
* color by extracting from the apps R.color.cdv_background_color or determine from the uiModes.
|
||||
* If all fails, the color normally used in light mode is returned.
|
||||
* Returns the StatusBarBackgroundColor preference value or {@link #getUiModeColor()} as fallback.
|
||||
*
|
||||
* @return int
|
||||
* @return Integer
|
||||
*/
|
||||
private int getPreferenceStatusBarBackgroundColor() {
|
||||
private Integer getPreferenceStatusBarBackgroundColor() {
|
||||
String colorString = preferences.getString("StatusBarBackgroundColor", null);
|
||||
|
||||
int parsedColor = parseColorFromString(colorString);
|
||||
if (parsedColor != INVALID_COLOR) return parsedColor;
|
||||
|
||||
return getUiModeColor(); // fallback
|
||||
return Objects.requireNonNullElse(parseColorFromString(colorString), getUiModeColor());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the BackgroundColor preference value.
|
||||
* If missing or fails to decode, it will return INVALID_COLOR (-1).
|
||||
* If the value is missing or fails to decode, null is returned.
|
||||
*
|
||||
* @return int
|
||||
* @return Integer|null
|
||||
*/
|
||||
private int getPreferenceBackgroundColor() {
|
||||
private Integer getPreferenceBackgroundColor() {
|
||||
if (!preferences.contains("BackgroundColor")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
return preferences.getInteger("BackgroundColor", INVALID_COLOR);
|
||||
return preferences.getInteger("BackgroundColor", 0);
|
||||
} catch (NumberFormatException e) {
|
||||
LOG.e(PLUGIN_NAME, "Invalid background color argument. Example valid string: '0x00000000'");
|
||||
return INVALID_COLOR;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,20 +343,20 @@ public class SystemBarPlugin extends CordovaPlugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse color string that would be provided by app developers.
|
||||
* If the color string is empty or unable to parse, it will return INVALID_COLOR (-1).
|
||||
* Parses a color string provided by app developers.
|
||||
* If the color string is empty or unable to parse, null is returned.
|
||||
*
|
||||
* @param colorPref hex string value, #AARRGGBB or #RRGGBB
|
||||
* @return int
|
||||
* @return Integer|null
|
||||
*/
|
||||
private int parseColorFromString(final String colorPref) {
|
||||
if (colorPref.isEmpty()) return INVALID_COLOR;
|
||||
private Integer parseColorFromString(final String colorPref) {
|
||||
if (colorPref == null || colorPref.isEmpty()) return null;
|
||||
|
||||
try {
|
||||
return Color.parseColor(colorPref);
|
||||
} catch (IllegalArgumentException ignore) {
|
||||
LOG.e(PLUGIN_NAME, "Invalid color hex code. Valid format: #RRGGBB or #AARRGGBB");
|
||||
return INVALID_COLOR;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
@@ -16,7 +17,6 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=320, user-scalable=no" />
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
@@ -16,7 +17,6 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=320, user-scalable=no" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
@@ -23,6 +23,9 @@ import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.content.ClipData;
|
||||
import android.content.Context;
|
||||
@@ -45,6 +48,9 @@ import android.webkit.PermissionRequest;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
import org.apache.cordova.CordovaDialogsHelper;
|
||||
@@ -59,24 +65,33 @@ import org.apache.cordova.LOG;
|
||||
*/
|
||||
public class SystemWebChromeClient extends WebChromeClient {
|
||||
|
||||
private interface PermissionListener {
|
||||
void onPermissionSelect(Boolean isGranted);
|
||||
}
|
||||
|
||||
private final ActivityResultLauncher<String[]> permissionLauncher;
|
||||
private PermissionListener permissionListener;
|
||||
private static final int FILECHOOSER_RESULTCODE = 5173;
|
||||
private static final String LOG_TAG = "SystemWebChromeClient";
|
||||
private long MAX_QUOTA = 100 * 1024 * 1024;
|
||||
protected final SystemWebViewEngine parentEngine;
|
||||
|
||||
// the video progress view
|
||||
private View mVideoProgressView;
|
||||
|
||||
private CordovaDialogsHelper dialogsHelper;
|
||||
private Context appContext;
|
||||
|
||||
private WebChromeClient.CustomViewCallback mCustomViewCallback;
|
||||
private View mCustomView;
|
||||
private final CordovaDialogsHelper dialogsHelper;
|
||||
|
||||
public SystemWebChromeClient(SystemWebViewEngine parentEngine) {
|
||||
this.parentEngine = parentEngine;
|
||||
appContext = parentEngine.webView.getContext();
|
||||
dialogsHelper = new CordovaDialogsHelper(appContext);
|
||||
dialogsHelper = new CordovaDialogsHelper(parentEngine.webView.getContext());
|
||||
permissionLauncher = parentEngine.cordova.getActivity().registerForActivityResult(new ActivityResultContracts.RequestMultiplePermissions(), isGranted -> {
|
||||
if (permissionListener != null) {
|
||||
boolean granted = true;
|
||||
for (Map.Entry<String, Boolean> permission : isGranted.entrySet()) {
|
||||
if (!permission.getValue()) granted = false;
|
||||
}
|
||||
permissionListener.onPermissionSelect(granted);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,13 +99,11 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
*/
|
||||
@Override
|
||||
public boolean onJsAlert(WebView view, String url, String message, final JsResult result) {
|
||||
dialogsHelper.showAlert(message, new CordovaDialogsHelper.Result() {
|
||||
@Override public void gotResult(boolean success, String value) {
|
||||
if (success) {
|
||||
result.confirm();
|
||||
} else {
|
||||
result.cancel();
|
||||
}
|
||||
dialogsHelper.showAlert(message, (success, value) -> {
|
||||
if (success) {
|
||||
result.confirm();
|
||||
} else {
|
||||
result.cancel();
|
||||
}
|
||||
});
|
||||
return true;
|
||||
@@ -101,14 +114,11 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
*/
|
||||
@Override
|
||||
public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) {
|
||||
dialogsHelper.showConfirm(message, new CordovaDialogsHelper.Result() {
|
||||
@Override
|
||||
public void gotResult(boolean success, String value) {
|
||||
if (success) {
|
||||
result.confirm();
|
||||
} else {
|
||||
result.cancel();
|
||||
}
|
||||
dialogsHelper.showConfirm(message, (success, value) -> {
|
||||
if (success) {
|
||||
result.confirm();
|
||||
} else {
|
||||
result.cancel();
|
||||
}
|
||||
});
|
||||
return true;
|
||||
@@ -129,14 +139,11 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
if (handledRet != null) {
|
||||
result.confirm(handledRet);
|
||||
} else {
|
||||
dialogsHelper.showPrompt(message, defaultValue, new CordovaDialogsHelper.Result() {
|
||||
@Override
|
||||
public void gotResult(boolean success, String value) {
|
||||
if (success) {
|
||||
result.confirm(value);
|
||||
} else {
|
||||
result.cancel();
|
||||
}
|
||||
dialogsHelper.showPrompt(message, defaultValue, (success, value) -> {
|
||||
if (success) {
|
||||
result.confirm(value);
|
||||
} else {
|
||||
result.cancel();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -152,6 +159,7 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater)
|
||||
{
|
||||
LOG.d(LOG_TAG, "onExceededDatabaseQuota estimatedSize: %d currentQuota: %d totalUsedQuota: %d", estimatedSize, currentQuota, totalUsedQuota);
|
||||
long MAX_QUOTA = 100 * 1024 * 1024;
|
||||
quotaUpdater.updateQuota(MAX_QUOTA);
|
||||
}
|
||||
|
||||
@@ -160,8 +168,8 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
*
|
||||
* <p>This also checks for the Geolocation Plugin and requests permission from the application to use Geolocation.</p>
|
||||
*
|
||||
* @param origin
|
||||
* @param callback
|
||||
* @param origin The origin of the web content attempting to use the Geolocation API.
|
||||
* @param callback The callback to use to set the permission state for the origin.
|
||||
*/
|
||||
@Override
|
||||
public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) {
|
||||
@@ -275,7 +283,7 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
// Handle result
|
||||
Uri[] result = null;
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
List<Uri> uris = new ArrayList<Uri>();
|
||||
List<Uri> uris = new ArrayList<>();
|
||||
|
||||
if (intent != null && intent.getData() != null) { // single file
|
||||
LOG.v(LOG_TAG, "Adding file (single): " + intent.getData());
|
||||
@@ -296,8 +304,8 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
}
|
||||
|
||||
if (!uris.isEmpty()) {
|
||||
LOG.d(LOG_TAG, "Receive file chooser URL: " + uris.toString());
|
||||
result = uris.toArray(new Uri[uris.size()]);
|
||||
LOG.d(LOG_TAG, "Receive file chooser URL: " + uris);
|
||||
result = uris.toArray(new Uri[0]);
|
||||
}
|
||||
}
|
||||
filePathsCallback.onReceiveValue(result);
|
||||
@@ -312,20 +320,38 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
|
||||
private File createTempFile(Context context) throws IOException {
|
||||
// Create an image file name
|
||||
File tempFile = File.createTempFile("temp", ".jpg", context.getCacheDir());
|
||||
return tempFile;
|
||||
return File.createTempFile("temp", ".jpg", context.getCacheDir());
|
||||
}
|
||||
|
||||
private Uri createUriForFile(Context context, File tempFile) throws IOException {
|
||||
String appId = context.getPackageName();
|
||||
Uri uri = FileProvider.getUriForFile(context, appId + ".cdv.core.file.provider", tempFile);
|
||||
return uri;
|
||||
return FileProvider.getUriForFile(context, appId + ".cdv.core.file.provider", tempFile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPermissionRequest(final PermissionRequest request) {
|
||||
LOG.d(LOG_TAG, "onPermissionRequest: " + Arrays.toString(request.getResources()));
|
||||
request.grant(request.getResources());
|
||||
List<String> permissionList = new ArrayList<>();
|
||||
if (Arrays.asList(request.getResources()).contains("android.webkit.resource.VIDEO_CAPTURE")) {
|
||||
permissionList.add(Manifest.permission.CAMERA);
|
||||
}
|
||||
if (Arrays.asList(request.getResources()).contains("android.webkit.resource.AUDIO_CAPTURE")) {
|
||||
permissionList.add(Manifest.permission.MODIFY_AUDIO_SETTINGS);
|
||||
permissionList.add(Manifest.permission.RECORD_AUDIO);
|
||||
}
|
||||
if (!permissionList.isEmpty()) {
|
||||
String[] permissions = permissionList.toArray(new String[0]);
|
||||
permissionListener = (isGranted) -> {
|
||||
if (isGranted) {
|
||||
request.grant(request.getResources());
|
||||
} else {
|
||||
request.deny();
|
||||
}
|
||||
};
|
||||
permissionLauncher.launch(permissions);
|
||||
} else {
|
||||
request.grant(request.getResources());
|
||||
}
|
||||
}
|
||||
|
||||
public void destroyLastDialog(){
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
Generated
+336
-477
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cordova-android",
|
||||
"version": "15.0.0",
|
||||
"version": "15.1.0",
|
||||
"description": "cordova-android release",
|
||||
"types": "./types/index.d.ts",
|
||||
"main": "lib/Api.js",
|
||||
@@ -39,7 +39,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cordova/eslint-config": "^6.0.1",
|
||||
"c8": "^10.1.3",
|
||||
"c8": "^11.0.0",
|
||||
"cordova-js": "^6.1.0",
|
||||
"elementtree": "^0.1.7",
|
||||
"jasmine": "^6.0.0",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user