Skip to content
Snippets Groups Projects
Commit 093d02e6 authored by aguestuser's avatar aguestuser
Browse files

Merge branch 'bug_40205_96.3.0' into 'tor-browser-96.3.0-11.5-1'

Resolve Bug 40205: Rebase Fenix patches to 96.3.0

See merge request tpo/applications/fenix!143
parents 5a685e67 15d3a315
Branches
Tags
1 merge request!143Resolve Bug 40205: Rebase Fenix patches to 96.3.0
Showing
with 3585 additions and 341 deletions
variables:
DEBIAN_FRONTEND: noninteractive
ANDROID_CLI_TOOLS: "6609375"
ANDROID_CLI_TOOLS_DIGEST: "89f308315e041c93a37a79e0627c47f21d5c5edbe5e80ea8dc0aac8a649e0e92"
ANDROID_COMPILE_SDK: "28"
ANDROID_BUILD_TOOLS: "28.0.3"
MAVEN_REPOSITORIES: "${CI_PROJECT_DIR}/gradle_storage"
GRADLE_MAVEN_REPOSITORIES: "file://${MAVEN_REPOSITORIES}"
default:
# See https://about.gitlab.com/blog/2018/10/24/setting-up-gitlab-ci-for-android-projects/
# https://github.com/docker-library/openjdk/blob/master/8/jdk/buster/Dockerfile
image: openjdk:8-jdk
tags:
- 32GB
before_script:
- set -e
# Prepare our Debian environment.
- apt-get update -qq
- apt-get upgrade -qy
# Install needed packages from Debian.
- apt-get install -qy --fix-missing wget tar unzip lib32stdc++6 lib32z1 bzip2
#- ./taskcluster/scripts/toolchain/android-gradle-dependencies.sh
# Install the Android SDK Tools.
- wget --quiet --output-document=android-cli-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_CLI_TOOLS}_latest.zip
- echo "${ANDROID_CLI_TOOLS_DIGEST} android-cli-tools.zip" | sha256sum -c
- unzip -qd cmdline-tools android-cli-tools.zip
- echo y | cmdline-tools/tools/bin/sdkmanager --install "platforms;android-${ANDROID_COMPILE_SDK}" > /dev/null
- echo y | cmdline-tools/tools/bin/sdkmanager --install "platform-tools" > /dev/null
- echo y | cmdline-tools/tools/bin/sdkmanager --install "build-tools;${ANDROID_BUILD_TOOLS}" > /dev/null
# Install the Android NDK.
- echo y | cmdline-tools/tools/bin/sdkmanager ndk-bundle > /dev/null
# Accept all the licenses.
- set +o pipefail
- yes | cmdline-tools/tools/bin/sdkmanager --licenses > /dev/null
- set -o pipefail
# Create local.properties file.
- echo "sdk.dir=$PWD" > local.properties
# Fetch tor library build dependencies
- wget --quiet https://people.torproject.org/~sysrqb/mirrors/tor-onion-proxy-library/0.0.3/android-release.aar
- wget --quiet https://people.torproject.org/~sysrqb/mirrors/tor-onion-proxy-library/0.0.3/universal-0.0.3.jar
- wget --quiet https://people.torproject.org/~sysrqb/mirrors/tor-android-service/1.0/jsocksAndroid-release.aar
- wget --quiet https://people.torproject.org/~sysrqb/mirrors/tor-android-service/1.0/service-release.aar
- wget --quiet https://people.torproject.org/~sysrqb/mirrors/tor/0.4.4.4-rc/tor_x86.tar.gz
- wget --quiet https://people.torproject.org/~sysrqb/mirrors/tor/0.4.4.4-rc/tor_x86_64.tar.gz
- wget --quiet https://people.torproject.org/~sysrqb/mirrors/tor/0.4.4.4-rc/tor_armv7.tar.gz
- wget --quiet https://people.torproject.org/~sysrqb/mirrors/tor/0.4.4.4-rc/tor_aarch64.tar.gz
- echo "4e2bd087df6128a31c598d297367c106762f539c25d71cc343aae25386e4bee9 android-release.aar" | sha256sum -c
- echo "0082d1d035a0808d03d7e1009398ed2c3e3ea4c51811198f6ff83ccda456036f universal-0.0.3.jar" | sha256sum -c
- echo "3dca44a48fdbd3f6c44f7ea335ae85fe542676d8e48c6438f84a2c852daf4f54 jsocksAndroid-release.aar" | sha256sum -c
- echo "d38967569af56d809f09f08b888962971149411832c3bc2b7b0b64a43ceb0dcd service-release.aar" | sha256sum -c
- echo "0faa344f658d2e38c7cc881f51c1d8658aac56801f7def1b75be72a8d3f90c54 tor_x86.tar.gz" | sha256sum -c
- echo "acf1d403ca12e3302d1150d2b5fba6585aa83d46db16f15ad33fae39645c5b5d tor_x86_64.tar.gz" | sha256sum -c
- echo "132cb40bbc15bd8f72abd15324705ab720f8b316a2fca84baaeb5db37f602c32 tor_armv7.tar.gz" | sha256sum -c
- echo "6c453c5f7566c87d422ef60750cba794d9616e9197114be5dc1194f75b55b04e tor_aarch64.tar.gz" | sha256sum -c
- mv android-release.aar universal-0.0.3.jar jsocksAndroid-release.aar service-release.aar app/
- tar -C app/src/main -xf tor_x86.tar.gz
- tar -C app/src/main -xf tor_x86_64.tar.gz
- tar -C app/src/main -xf tor_armv7.tar.gz
- tar -C app/src/main -xf tor_aarch64.tar.gz
- rm tor_x86.tar.gz tor_x86_64.tar.gz tor_armv7.tar.gz tor_aarch64.tar.gz
stages:
- build
- buildFenixProduction
- buildFennecBeta
- buildFennecProduction
- test
buildDebug:
stage: build
script:
- ./gradlew -PdisableTor=true clean app:assembleDebug --stacktrace
# Disable for now.
#artifacts:
# paths:
# - app/build/outputs/apk/geckoBeta/debug/*.apk
# expire_in: 1 day
testLight:
stage: test
script:
# from config/pre-push-recommended.sh
# `tee` into a log file because resulting output is larger than 4 MB
# (4 MB is max log size)
- ./gradlew -PdisableTor=true ktlint detekt assembleDebug assembleDebugAndroidTest testDebug | tee testLight_gradle.log
artifacts:
paths:
- testLight_gradle.log
expire_in: 1 day
when: always
#### Scheduled Jobs (build* stages run serially) ###
buildFenixProduction:
stage: buildFenixProduction
only:
- schedules
script:
- ./gradlew -PdisableTor=true clean app:assembleNightly --stacktrace
buildFennecBeta:
stage: buildFennecBeta
only:
- schedules
script:
- ./gradlew -PdisableTor=true clean app:assembleBeta --stacktrace
buildFennecProduction:
stage: buildFennecProduction
only:
- schedules
script:
- ./gradlew -PdisableTor=true clean app:assembleRelease --stacktrace
testAll:
stage: test
only:
- schedules
script:
- ./gradlew -PdisableTor=true clean test
......@@ -23,7 +23,16 @@ import static org.gradle.api.tasks.testing.TestResult.ResultType
apply from: 'benchmark.gradle'
def obtainTestBuildType() {
def result = "debug";
if (project.hasProperty("testBuildType")) {
result = project.getProperties().get("testBuildType")
}
result
}
android {
testBuildType obtainTestBuildType()
compileSdkVersion Config.compileSdkVersion
project.maybeConfigForJetpackBenchmark(it)
......@@ -34,7 +43,7 @@ android {
}
defaultConfig {
applicationId "org.mozilla"
applicationId "org.torproject"
minSdkVersion Config.minSdkVersion
targetSdkVersion Config.targetSdkVersion
versionCode 1
......@@ -63,7 +72,7 @@ android {
"}"
// This should be the base URL used to call the AMO API.
buildConfigField "String", "AMO_SERVER_URL", "\"https://services.addons.mozilla.org\""
def deepLinkSchemeValue = "fenix-dev"
def deepLinkSchemeValue = "torbrowser-dev"
buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\""
manifestPlaceholders = [
"deepLinkScheme": deepLinkSchemeValue
......@@ -75,6 +84,8 @@ android {
} else {
buildConfigField "boolean", "MOZILLA_ONLINE", "false"
}
buildConfigField "boolean", "DATA_COLLECTION_DISABLED", "true"
}
def releaseTemplate = {
......@@ -102,21 +113,21 @@ android {
debug {
shrinkResources false
minifyEnabled false
applicationIdSuffix ".fenix.debug"
applicationIdSuffix ".torbrowser_debug"
resValue "bool", "IS_DEBUG", "true"
pseudoLocalesEnabled true
}
nightly releaseTemplate >> {
applicationIdSuffix ".fenix"
applicationIdSuffix ".torbrowser_nightly"
buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true"
def deepLinkSchemeValue = "fenix-nightly"
def deepLinkSchemeValue = "torbrowser-nightly"
buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\""
manifestPlaceholders = ["deepLinkScheme": deepLinkSchemeValue]
}
beta releaseTemplate >> {
buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true"
applicationIdSuffix ".firefox_beta"
def deepLinkSchemeValue = "fenix-beta"
applicationIdSuffix ".torbrowser_alpha"
def deepLinkSchemeValue = "torbrowser-alpha"
buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\""
manifestPlaceholders = [
// This release type is meant to replace Firefox (Beta channel) and therefore needs to inherit
......@@ -126,14 +137,14 @@ android {
// fatal consequences. For example see:
// - https://issuetracker.google.com/issues/36924841
// - https://issuetracker.google.com/issues/36905922
"sharedUserId": "org.mozilla.firefox.sharedID",
"sharedUserId": "org.torproject.torbrowser_alpha.sharedID",
"deepLinkScheme": deepLinkSchemeValue
]
}
release releaseTemplate >> {
buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true"
applicationIdSuffix ".firefox"
def deepLinkSchemeValue = "fenix"
applicationIdSuffix ".torbrowser"
def deepLinkSchemeValue = "torbrowser"
buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\""
manifestPlaceholders = [
// This release type is meant to replace Firefox (Release channel) and therefore needs to inherit
......@@ -143,7 +154,7 @@ android {
// fatal consequences. For example see:
// - https://issuetracker.google.com/issues/36924841
// - https://issuetracker.google.com/issues/36905922
"sharedUserId": "org.mozilla.firefox.sharedID",
"sharedUserId": "org.torproject.torbrowser.sharedID",
"deepLinkScheme": deepLinkSchemeValue
]
}
......@@ -256,15 +267,25 @@ android.applicationVariants.all { variant ->
// -------------------------------------------------------------------------------------------------
def isDebug = variant.buildType.resValues['IS_DEBUG']?.value ?: false
def isDataCollectionDisabled = variant.buildType.buildConfigFields['DATA_COLLECTION_DISABLED']?.value ?: true
def isDebugOrDCD = isDebug || isDataCollectionDisabled
def useReleaseVersioning = variant.buildType.buildConfigFields['USE_RELEASE_VERSIONING']?.value ?: false
def versionName = variant.buildType.name == 'nightly' ? Config.nightlyVersionName() : Config.releaseVersionName(project)
def disableTor = false
if (project.hasProperty("disableTor")) {
disableTor = project.getProperty("disableTor")
}
println("----------------------------------------------")
println("Variant name: " + variant.name)
println("Application ID: " + [variant.mergedFlavor.applicationId, variant.buildType.applicationIdSuffix].findAll().join())
println("Build type: " + variant.buildType.name)
println("Flavor: " + variant.flavorName)
println("Telemetry enabled: " + !isDebug)
println("Telemetry enabled: " + !isDebugOrDCD)
println("Tor is disabled: " + disableTor)
buildConfigField "boolean", "DISABLE_TOR", "$disableTor"
if (useReleaseVersioning) {
// The Google Play Store does not allow multiple APKs for the same app that all have the
......@@ -294,7 +315,7 @@ android.applicationVariants.all { variant ->
// -------------------------------------------------------------------------------------------------
buildConfigField 'String', 'SENTRY_TOKEN', 'null'
if (!isDebug) {
if (!isDebugOrDCD) {
buildConfigField 'boolean', 'CRASH_REPORTING', 'true'
// Reading sentry token from local file (if it exists). In a release task on taskcluster it will be available.
try {
......@@ -305,7 +326,7 @@ android.applicationVariants.all { variant ->
buildConfigField 'boolean', 'CRASH_REPORTING', 'false'
}
if (!isDebug) {
if (!isDebugOrDCD) {
buildConfigField 'boolean', 'TELEMETRY', 'true'
} else {
buildConfigField 'boolean', 'TELEMETRY', 'false'
......@@ -326,7 +347,7 @@ android.applicationVariants.all { variant ->
print("Adjust token: ")
if (!isDebug) {
if (!isDebugOrDCD) {
try {
def token = new File("${rootDir}/.adjust_token").text.trim()
buildConfigField 'String', 'ADJUST_TOKEN', '"' + token + '"'
......@@ -547,8 +568,6 @@ dependencies {
implementation Deps.adjust
implementation Deps.installreferrer // Required by Adjust
implementation Deps.google_ads_id // Required for the Google Advertising ID
implementation Deps.google_play_store // Required for in-app reviews
androidTestImplementation Deps.uiautomator
......@@ -604,6 +623,18 @@ dependencies {
testImplementation "org.mozilla.telemetry:glean-native-forUnitTests:${project.ext.glean_version}"
lintChecks project(":mozilla-lint-rules")
// Tor Android Services Dependencies
implementation 'net.freehaven.tor.control:jtorctl:0.2'
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'org.slf4j:slf4j-android:1.7.25'
// Tor Android Services.
implementation files('service-release.aar')
// Tor Onion Proxy Library.
implementation files('universal-0.0.3.jar')
implementation files('android-release.aar')
}
protobuf {
......@@ -706,16 +737,22 @@ task buildTranslationArray {
// This isn't running as a task, instead the array is build when the gradle file is parsed.
// https://github.com/mozilla-mobile/fenix/issues/14175
def foundLocales = new StringBuilder()
def languageCodes = []
foundLocales.append("new String[]{")
fileTree("src/main/res").visit { FileVisitDetails details ->
if(details.file.path.endsWith("${File.separator}strings.xml")){
if(details.file.path.endsWith("${File.separator}torbrowser_strings.xml")){
def languageCode = details.file.parent.tokenize(File.separator).last().replaceAll('values-','').replaceAll('-r','-')
languageCode = (languageCode == "values") ? "en-US" : languageCode
foundLocales.append("\"").append(languageCode).append("\"").append(",")
languageCodes.add(languageCode)
}
}
// The order of files in a `FileTree` is not stable, even on a single
// computer. Thus we need to sort the `languageCode`s. See: fenix#40083.
languageCodes.sort()
languageCodes.each {
foundLocales.append("\"").append(it).append("\"").append(",")
}
foundLocales.append("}")
def foundLocalesString = foundLocales.toString().replaceAll(',}','}')
android.defaultConfig.buildConfigField "String[]", "SUPPORTED_LOCALE_ARRAY", foundLocalesString
......@@ -798,7 +835,13 @@ ext.updateExtensionVersion = { task, extDir ->
rename { 'manifest.json' }
into extDir
def values = ['version': AndroidComponents.VERSION + "." + new Date().format('MMddHHmmss')]
def systemEnvBuildDate = System.getenv('MOZ_BUILD_DATE')
// MOZ_BUILD_DATE is in the yyyyMMddHHmmss format. Thus, we only use a
// substring of it if it is available.
def values = ['version': AndroidComponents.VERSION + "." +
(systemEnvBuildDate != null ?
systemEnvBuildDate.substring(4) :
new Date().format('MMddHHmmss'))]
inputs.properties(values)
expand(values)
}
......
......
......@@ -124,3 +124,6 @@
# Keep Android Lifecycle methods
# https://bugzilla.mozilla.org/show_bug.cgi?id=1596302
-keep class androidx.lifecycle.** { *; }
# Workaround for 'already has mapping' r8 issue (https://issuetracker.google.com/issues/140851070)
-keep class com.google.android.gms.common.internal.BaseGmsClient { *; }
......@@ -116,7 +116,7 @@ private fun assertVersionNumber() {
private fun assertProductCompany() {
onView(withId(R.id.about_content))
.check(matches(withText(containsString("$appName is produced by Mozilla."))))
.check(matches(withText(containsString("$appName is produced by the Tor Project, a U.S.-based 501(c)(3) nonprofit."))))
}
private fun assertCurrentTimestamp() {
......
......
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:pathData="M75.22,60.55H51.81a1.25,1.25 0,0 0,-1.25 1.25v3.75a10,10 0,0 0,10 10h13A7.49,7.49 0,0 0,81 68v-3.23c0,-1.88 -1.87,-4.22 -5.78,-4.22z"
android:fillColor="#008787"/>
<path
android:pathData="M75.22,60.55H51.81a1.25,1.25 0,0 0,-1.25 1.25v3.75a10,10 0,0 0,10 10h13A7.49,7.49 0,0 0,81 68v-3.23c0,-1.88 -1.87,-4.22 -5.78,-4.22z"
android:strokeAlpha="0.9"
android:fillAlpha="0.9">
<aapt:attr name="android:fillColor">
<gradient
android:startY="75.100006"
android:startX="74.920456"
android:endY="72.55"
android:endX="65.785286"
android:type="linear">
<item android:offset="0" android:color="#7F054096"/>
<item android:offset="0.7" android:color="#07542BC8"/>
<item android:offset="0.85" android:color="#00592ACB"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M78.13,44.28c-1.13,-2.72 -3.43,-5.66 -5.23,-6.59a26.79,26.79 0,0 1,2.64 7.91c-3,-7.34 -7.94,-10.3 -12,-16.74 -0.2,-0.33 -0.41,-0.65 -0.61,-1a5.94,5.94 0,0 1,-0.29 -0.54,4.92 4.92,0 0,1 -0.39,-1 0.07,0.07 0,0 0,-0.05 -0.07h-0.07a19,19 0,0 0,-9 14.46A12.92,12.92 0,0 0,46 43.49a10.031,10.031 0,0 0,-0.68 -0.51,12 12,0 0,1 -0.07,-6.36A19.21,19.21 0,0 0,39 41.46c-1,-1.31 -1,-5.62 -0.9,-6.52a4.39,4.39 0,0 0,-0.87 0.46,19.37 19.37,0 0,0 -2.54,2.18 22.23,22.23 0,0 0,-2.43 2.92,21.88 21.88,0 0,0 -3.5,7.88v0.18a39.159,39.159 0,0 0,-0.26 1.62,0.13 0.13,0 0,1 0,0.06 26.47,26.47 0,0 0,-0.5 3.59L28,54a26,26 0,0 0,51.7 4.41l0.12,-1a26.9,26.9 0,0 0,-1.69 -13.13zM48.13,64.66l0.36,0.18zM54.13,48.96zM75.6,45.65z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="34.731655"
android:startX="73.6671"
android:endY="77.194664"
android:endX="32.80596"
android:type="linear">
<item android:offset="0.05" android:color="#FFFFF44F"/>
<item android:offset="0.37" android:color="#FFFF980E"/>
<item android:offset="0.53" android:color="#FFFF3647"/>
<item android:offset="0.7" android:color="#FFE31587"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M78.13,44.28c-1.13,-2.72 -3.43,-5.66 -5.23,-6.59a26.79,26.79 0,0 1,2.64 7.91,23.55 23.55,0 0,1 -0.81,17.57c-3,6.4 -10.21,13 -21.51,12.65 -12.22,-0.35 -23,-9.41 -25,-21.29a11.22,11.22 0,0 1,0.18 -4.34,19.61 19.61,0 0,0 -0.4,3.64V54a26,26 0,0 0,51.7 4.41l0.12,-1a26.9,26.9 0,0 0,-1.69 -13.13z">
<aapt:attr name="android:fillColor">
<gradient
android:gradientRadius="53.746716"
android:centerX="68.339355"
android:centerY="37.69"
android:type="radial">
<item android:offset="0.13" android:color="#FFFFBD4F"/>
<item android:offset="0.28" android:color="#FFFF980E"/>
<item android:offset="0.47" android:color="#FFFF3750"/>
<item android:offset="0.78" android:color="#FFEB0878"/>
<item android:offset="0.86" android:color="#FFE50080"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M78.13,44.28c-1.13,-2.72 -3.43,-5.66 -5.23,-6.59a26.79,26.79 0,0 1,2.64 7.91,23.55 23.55,0 0,1 -0.81,17.57c-3,6.4 -10.21,13 -21.51,12.65 -12.22,-0.35 -23,-9.41 -25,-21.29a11.22,11.22 0,0 1,0.18 -4.34,19.61 19.61,0 0,0 -0.4,3.64V54a26,26 0,0 0,51.7 4.41l0.12,-1a26.9,26.9 0,0 0,-1.69 -13.13z">
<aapt:attr name="android:fillColor">
<gradient
android:gradientRadius="55.09038"
android:centerX="48.56332"
android:centerY="55.002163"
android:type="radial">
<item android:offset="0.3" android:color="#FF960E18"/>
<item android:offset="0.35" android:color="#BCB11927"/>
<item android:offset="0.43" android:color="#56DB293D"/>
<item android:offset="0.5" android:color="#16F5334B"/>
<item android:offset="0.53" android:color="#00FF3750"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M65.47,47.34l0.17,0.12a14.35,14.35 0,0 0,-2.42 -3.15c-8.09,-8.09 -2.12,-17.55 -1.12,-18a19,19 0,0 0,-9 14.46h0.92a13.13,13.13 0,0 1,11.45 6.57z">
<aapt:attr name="android:fillColor">
<gradient
android:gradientRadius="29.610003"
android:centerX="59.1192"
android:centerY="23.771997"
android:type="radial">
<item android:offset="0.13" android:color="#FFFFF44F"/>
<item android:offset="0.53" android:color="#FFFF980E"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M54.08,49c0,0.65 -2.33,2.88 -3.13,2.88 -7.4,0 -8.6,4.48 -8.6,4.48a11,11 0,0 0,6.13 8.52l0.44,0.21a12.13,12.13 0,0 0,0.76 0.31,11.91 11.91,0 0,0 3.39,0.66c13,0.61 15.49,-15.52 6.13,-20.2a9,9 0,0 1,6.27 1.52,13.13 13.13,0 0,0 -11.4,-6.66h-0.92A12.92,12.92 0,0 0,46 43.49c0.39,0.34 0.84,0.78 1.79,1.71 1.75,1.8 6.28,3.55 6.29,3.8z">
<aapt:attr name="android:fillColor">
<gradient
android:gradientRadius="26.21"
android:centerX="48.315395"
android:centerY="69.29355"
android:type="radial">
<item android:offset="0.35" android:color="#FF3A8EE6"/>
<item android:offset="0.67" android:color="#FF9059FF"/>
<item android:offset="1" android:color="#FFC139E6"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M54.08,49c0,0.65 -2.33,2.88 -3.13,2.88 -7.4,0 -8.6,4.48 -8.6,4.48a11,11 0,0 0,6.13 8.52l0.44,0.21a12.13,12.13 0,0 0,0.76 0.31,11.91 11.91,0 0,0 3.39,0.66c13,0.61 15.49,-15.52 6.13,-20.2a9,9 0,0 1,6.27 1.52,13.13 13.13,0 0,0 -11.4,-6.66h-0.92A12.92,12.92 0,0 0,46 43.49c0.39,0.34 0.84,0.78 1.79,1.71 1.75,1.8 6.28,3.55 6.29,3.8z">
<aapt:attr name="android:fillColor">
<gradient
android:gradientRadius="13.917509"
android:centerX="50.381275"
android:centerY="49.283504"
android:type="radial">
<item android:offset="0.21" android:color="#009059FF"/>
<item android:offset="0.97" android:color="#996E008B"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M44.77,42.62l0.54,0.36a12,12 0,0 1,-0.07 -6.36A19.21,19.21 0,0 0,39 41.46c0.1,0 3.87,-0.07 5.77,1.16z">
<aapt:attr name="android:fillColor">
<gradient
android:gradientRadius="18.444002"
android:centerX="52.251003"
android:centerY="30.259998"
android:type="radial">
<item android:offset="0.1" android:color="#FFFFE226"/>
<item android:offset="0.79" android:color="#FFFF7139"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M28.24,54.58c2,11.88 12.77,20.94 25,21.29 11.3,0.32 18.52,-6.25 21.51,-12.65a23.55,23.55 0,0 0,0.81 -17.57c0.92,6 -2.15,11.87 -6.94,15.82 -9.34,7.61 -18.28,4.59 -20.09,3.35l-0.38,-0.19c-5.45,-2.6 -7.7,-7.56 -7.22,-11.82A6.67,6.67 0,0 1,34.74 49a9.8,9.8 0,0 1,9.57 -0.38A13,13 0,0 0,54.08 49c0,-0.21 -4.54,-2 -6.3,-3.76 -1,-0.93 -1.4,-1.37 -1.79,-1.71a10.031,10.031 0,0 0,-0.68 -0.51l-0.54,-0.36c-1.9,-1.23 -5.67,-1.16 -5.8,-1.16 -1,-1.31 -1,-5.62 -0.9,-6.52a4.39,4.39 0,0 0,-0.87 0.46,19.37 19.37,0 0,0 -2.54,2.18 22.23,22.23 0,0 0,-2.43 2.92,21.88 21.88,0 0,0 -3.5,7.88c-0.02,0.02 -0.95,4.07 -0.49,6.16z">
<aapt:attr name="android:fillColor">
<gradient
android:gradientRadius="89.619446"
android:centerX="69.60241"
android:centerY="18.083904"
android:type="radial">
<item android:offset="0.11" android:color="#FFFFF44F"/>
<item android:offset="0.46" android:color="#FFFF980E"/>
<item android:offset="0.72" android:color="#FFFF3647"/>
<item android:offset="0.9" android:color="#FFE31587"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M63.22,44.31a14.35,14.35 0,0 1,2.42 3.15l0.39,0.32c5.9,5.44 2.81,13.13 2.58,13.68 4.79,-4 7.86,-9.79 6.94,-15.82 -3,-7.34 -7.94,-10.3 -12,-16.74 -0.2,-0.33 -0.41,-0.65 -0.61,-1a5.94,5.94 0,0 1,-0.29 -0.54,4.92 4.92,0 0,1 -0.39,-1 0.07,0.07 0,0 0,-0.05 -0.07H62.1c-1,0.47 -6.97,9.93 1.12,18.02z">
<aapt:attr name="android:fillColor">
<gradient
android:gradientRadius="95.36754"
android:centerX="-6.76699"
android:centerY="37.10374"
android:type="radial">
<item android:offset="0" android:color="#FFFFF44F"/>
<item android:offset="0.3" android:color="#FFFF980E"/>
<item android:offset="0.57" android:color="#FFFF3647"/>
<item android:offset="0.74" android:color="#FFE31587"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M66,47.78l-0.39,-0.32 -0.17,-0.12a9,9 0,0 0,-6.27 -1.52c9.36,4.68 6.85,20.81 -6.13,20.2a11.91,11.91 0,0 1,-3.39 -0.66,12.13 12.13,0 0,1 -0.76,-0.31l-0.44,-0.21c1.81,1.24 10.75,4.26 20.09,-3.35 0.3,-0.58 3.39,-8.27 -2.54,-13.71z">
<aapt:attr name="android:fillColor">
<gradient
android:gradientRadius="56.180176"
android:centerX="52.887726"
android:centerY="35.519154"
android:type="radial">
<item android:offset="0.14" android:color="#FFFFF44F"/>
<item android:offset="0.48" android:color="#FFFF980E"/>
<item android:offset="0.66" android:color="#FFFF3647"/>
<item android:offset="0.9" android:color="#FFE31587"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M42.35,56.32s1.2,-4.48 8.6,-4.48c0.8,0 3.09,-2.23 3.13,-2.88a13,13 0,0 1,-9.77 -0.38,9.8 9.8,0 0,0 -9.57,0.38 6.67,6.67 0,0 0,6.16 3.88c-0.48,4.26 1.77,9.22 7.22,11.82l0.36,0.18a11,11 0,0 1,-6.13 -8.52z">
<aapt:attr name="android:fillColor">
<gradient
android:gradientRadius="60.55354"
android:centerX="65.548615"
android:centerY="39.680077"
android:type="radial">
<item android:offset="0.09" android:color="#FFFFF44F"/>
<item android:offset="0.63" android:color="#FFFF980E"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M78.13,44.28c-1.13,-2.72 -3.43,-5.66 -5.23,-6.59a26.79,26.79 0,0 1,2.64 7.91c-3,-7.34 -7.94,-10.3 -12,-16.74 -0.2,-0.33 -0.41,-0.65 -0.61,-1a5.94,5.94 0,0 1,-0.29 -0.54,4.92 4.92,0 0,1 -0.39,-1 0.07,0.07 0,0 0,-0.05 -0.07h-0.07a19,19 0,0 0,-9 14.46h0.92a13.13,13.13 0,0 1,11.4 6.66,9 9,0 0,0 -6.27,-1.52c9.36,4.68 6.85,20.81 -6.13,20.2a11.91,11.91 0,0 1,-3.39 -0.66,12.13 12.13,0 0,1 -0.76,-0.31l-0.44,-0.21 -0.38,-0.19 0.36,0.18a11,11 0,0 1,-6.13 -8.52s1.2,-4.48 8.6,-4.48c0.8,0 3.09,-2.23 3.13,-2.88 0,-0.21 -4.54,-2 -6.3,-3.76 -1,-0.93 -1.4,-1.37 -1.79,-1.71A10.031,10.031 0,0 0,45.27 43a12,12 0,0 1,-0.07 -6.36,19.21 19.21,0 0,0 -6.2,4.82c-1,-1.31 -1,-5.62 -0.9,-6.52a4.39,4.39 0,0 0,-0.87 0.46,19.37 19.37,0 0,0 -2.54,2.18 22.23,22.23 0,0 0,-2.43 2.92,21.88 21.88,0 0,0 -3.5,7.88v0.18a39.815,39.815 0,0 0,-0.3 1.64A31.77,31.77 0,0 0,28 53.83L28,54a26,26 0,0 0,51.7 4.41l0.12,-1a26.9,26.9 0,0 0,-1.69 -13.13zM75.54,45.62z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="33.91085"
android:startX="69.86179"
android:endY="72.21511"
android:endX="37.319843"
android:type="linear">
<item android:offset="0.17" android:color="#CCFFF44F"/>
<item android:offset="0.6" android:color="#00FFF44F"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M79.75,66H58.23A9.23,9.23 0,0 0,49 75.24v4.51A1.25,1.25 0,0 0,50.25 81h21.52A9.23,9.23 0,0 0,81 71.77v-7A1.24,1.24 0,0 1,79.75 66z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="67.2045"
android:startX="52.19842"
android:endY="79.377"
android:endX="82.60009"
android:type="linear">
<item android:offset="0.001" android:color="#FF54FFBD"/>
<item android:offset="1" android:color="#FF00DDFF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M54.26,70.33h2.65c1.43,0 2.23,0.64 2.23,1.79a1.42,1.42 0,0 1,-0.74 1.3,1.47 1.47,0 0,1 0.83,1.42c0,1.27 -0.87,1.9 -2.3,1.9h-2.67zM55.48,71.42v1.49L57,72.91c0.66,0 0.94,-0.33 0.94,-0.77s-0.31,-0.72 -1,-0.72zM55.48,74.02v1.6L57,75.62c0.68,0 1,-0.3 1,-0.8s-0.3,-0.8 -1.08,-0.8zM60.42,70.33h4.31v1.16h-3.07v1.45h3.07v1.16h-3.07v1.46h3.07v1.18h-4.31zM67.58,71.47L65.8,71.47v-1.14h4.77v1.14L68.8,71.47v5.27h-1.22zM72.67,70.33h1.22l2.43,6.41L75,76.74l-0.42,-1.17h-2.64l-0.42,1.17h-1.28zM72.35,74.45h1.86l-0.93,-2.55z"
android:fillColor="#20123a"/>
</vector>
app/src/beta/res/mipmap-hdpi/ic_launcher.png

3.9 KiB | W: | H:

app/src/beta/res/mipmap-hdpi/ic_launcher.png

5.87 KiB | W: | H:

app/src/beta/res/mipmap-hdpi/ic_launcher.png
app/src/beta/res/mipmap-hdpi/ic_launcher.png
app/src/beta/res/mipmap-hdpi/ic_launcher.png
app/src/beta/res/mipmap-hdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
app/src/beta/res/mipmap-mdpi/ic_launcher.png

2.09 KiB | W: | H:

app/src/beta/res/mipmap-mdpi/ic_launcher.png

5.87 KiB | W: | H:

app/src/beta/res/mipmap-mdpi/ic_launcher.png
app/src/beta/res/mipmap-mdpi/ic_launcher.png
app/src/beta/res/mipmap-mdpi/ic_launcher.png
app/src/beta/res/mipmap-mdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
app/src/beta/res/mipmap-xhdpi/ic_launcher.png

4.94 KiB | W: | H:

app/src/beta/res/mipmap-xhdpi/ic_launcher.png

8.57 KiB | W: | H:

app/src/beta/res/mipmap-xhdpi/ic_launcher.png
app/src/beta/res/mipmap-xhdpi/ic_launcher.png
app/src/beta/res/mipmap-xhdpi/ic_launcher.png
app/src/beta/res/mipmap-xhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
app/src/beta/res/mipmap-xxhdpi/ic_launcher.png

8.21 KiB | W: | H:

app/src/beta/res/mipmap-xxhdpi/ic_launcher.png

15.8 KiB | W: | H:

app/src/beta/res/mipmap-xxhdpi/ic_launcher.png
app/src/beta/res/mipmap-xxhdpi/ic_launcher.png
app/src/beta/res/mipmap-xxhdpi/ic_launcher.png
app/src/beta/res/mipmap-xxhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
app/src/beta/res/mipmap-xxxhdpi/ic_launcher.png

12.6 KiB | W: | H:

app/src/beta/res/mipmap-xxxhdpi/ic_launcher.png

24.1 KiB | W: | H:

app/src/beta/res/mipmap-xxxhdpi/ic_launcher.png
app/src/beta/res/mipmap-xxxhdpi/ic_launcher.png
app/src/beta/res/mipmap-xxxhdpi/ic_launcher.png
app/src/beta/res/mipmap-xxxhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -4,5 +4,5 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<resources>
<!-- Name of the application -->
<string name="app_name" translatable="false">Firefox Beta</string>
<string name="app_name" translatable="false">Tor Browser Alpha</string>
</resources>
......@@ -11,7 +11,7 @@
android:shortcutLongLabel="@string/home_screen_shortcut_open_new_tab_2">
<intent
android:action="org.mozilla.fenix.OPEN_TAB"
android:targetPackage="org.mozilla.firefox_beta"
android:targetPackage="org.torproject.torbrowser_alpha"
android:targetClass="org.mozilla.fenix.IntentReceiverActivity" />
</shortcut>
<shortcut
......@@ -22,7 +22,7 @@
android:shortcutLongLabel="@string/home_screen_shortcut_open_new_private_tab_2">
<intent
android:action="org.mozilla.fenix.OPEN_PRIVATE_TAB"
android:targetPackage="org.mozilla.firefox_beta"
android:targetPackage="org.torproject.torbrowser_alpha"
android:targetClass="org.mozilla.fenix.IntentReceiverActivity" />
</shortcut>
</shortcuts>
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="208"
android:viewportHeight="208">
<path android:pathData="M163.2,113.7c6.4,-1.2 3.9,-14.4 6.6,-5.2"
android:strokeWidth="1.1"
android:fillColor="#000"
android:strokeColor="#000"/>
<path android:pathData="M171.8,59c2.1,-5.6 5.7,-6.7 8.6,-8.3 -4.7,7.3 -1.4,10.2 -2.5,13 -2.3,5.5 -7.9,0 -6,-4.8z"
android:strokeWidth="1.1"
android:fillColor="#fe9d2a"
android:strokeColor="#000"/>
<path android:pathData="M44.3,75.2c1.8,-4.2 4.8,-5 7.3,-6.1 -4,5.4 -1.2,7.6 -2.2,9.7 -1.9,4.1 -6.6,0 -5,-3.6zM27.3,51.9c4,5.4 3,9.6 4,11.7 1.8,4.1 5.9,0.5 4.3,-3.1a19,19 0,0 0,-8.4 -8.6z"
android:strokeWidth="1.1"
android:fillColor="#f3611e"
android:strokeColor="#000"/>
<path android:pathData="M89.3,91.9l2.8,12.1L23,104l2.5,-19.7a50.9,50.9 0,0 1,18.3 -19c-6.4,7.6 -5.7,21.1 8.6,24.8 9.2,2.4 28.6,-9.8 36.8,1.8zM120.7,92.6c21.9,-9.5 26.4,-1.8 34.8,-4 17.2,-5.3 15.7,-13.6 9.7,-23.4A51,51 0,0 1,183.5 84l2.5,20h-66.6l1.3,-11.4zM89.3,91.9zM159.5,78c0.3,3 5.5,3.2 6.4,0 -0.3,-7 -5.5,-9.2 -10.7,-10.8 2.8,3.6 4.3,5.3 4.3,10.8zM34.1,64.4c-1.8,-4.1 -6.6,-5.2 -9.1,-6.3 4,5.4 3,7.8 4,9.9 1.8,4.1 6.6,0 5,-3.6z"
android:strokeWidth="1.1"
android:fillColor="#f00027"
android:strokeColor="#000"/>
<path android:pathData="M87.3,92.8c-24.6,-8.2 -41,7 -45.9,6.5 -19,-2.3 -19,-16.2 -13.8,-28.6 -4.3,6.5 -9.6,7 -12.3,22.7 -2.3,-2.3 -4.8,-3 -5.8,-11.6 -5.4,16.9 -2,20.8 0.5,26.2 -2.6,-1.6 -5,-3.5 -7.2,-5.5 0.7,7.9 3.5,11.6 5.8,16.3l-5.8,-3.5c9.5,25.9 23.3,35.6 39.6,36.1 16,-1.5 24.2,-4 33.7,-6.3l11.2,-52.3zM123.3,94.8c4,-2.3 10.3,-3.1 15.4,-3 8.7,-0.5 25.2,7.9 29,7.9 9.3,0.1 21.1,-9.6 14,-28.3 4.9,6.5 9.9,10.8 12,22 3.5,-2 4.6,-6.3 6,-10.4 4,9.1 3,17.4 -0.2,25.3 2,-1.1 4,-2.4 6.6,-5.6 0.3,7 -3.6,11 -6,16l5,-2.6c-6,17.8 -15.6,32.7 -36.1,35.6 -13,-2.9 -25.4,-6.9 -41,-6.4l-9.2,-24.4s6.1,-28.4 4.6,-26.1"
android:strokeWidth="1.1"
android:fillColor="#cc002b"
android:strokeColor="#000"/>
<path android:pathData="M163,113.5c2.8,-0.6 4.8,-3.2 5.9,-8.7l1,3.6"
android:strokeWidth="1.1"
android:fillColor="#0000"
android:strokeColor="#000"
android:strokeLineCap="square"/>
<path android:pathData="M177,110a19,19 0,0 0,5.4 -6.8l1,7M154,129.3c5.6,0.8 6.9,-2.7 9.4,-5l-0.5,3.7"
android:strokeLineJoin="bevel"
android:strokeWidth="1.1"
android:fillColor="#0000"
android:strokeColor="#000"/>
<path android:pathData="M44,112.7c-2.7,-0.6 -4.7,-3.2 -5.9,-8.7l-1,3.6"
android:strokeWidth="1.1"
android:fillColor="#0000"
android:strokeColor="#000"
android:strokeLineCap="square"/>
<path android:pathData="M30.1,109.2a19,19 0,0 1,-5.4 -6.8l-1,7M53,128.4c-5.5,0.7 -6.8,-2.7 -9.3,-5l0.5,3.7"
android:strokeLineJoin="bevel"
android:strokeWidth="1.1"
android:fillColor="#0000"
android:strokeColor="#000"/>
<path android:pathData="M24.3 105c0.3 7 1.1 13.8 6.2 18.6a24 24 0 0 1-6.8-2.7c2.2 4.4 4.5 8.8 9 12l-4.7-0.3c2.5 4.5 6.3 8.1 10 11.8-8.3-3.7-17.7-5.7-20.6-18.9 2.3 2.2 3 1.6 4.1 1.9-4-4-5.3-9.3-7-13.8 2 2 4.3 3.5 6.8 4.4-6-6.2-4.5-14.3-4.2-22.2 1.8 3.8 3.9 7.3 7.2 9.2zm10.2 18c3 1.6 4.2 4.3 9.7 4 1 5.4 5 8.4 9.4 11.4-6.1 0.7-14.1-0.1-19-15.4zm5.8-0.8C30.3 119 29 109.4 31 98.9c2 6.6 3.9 7.2 6 8.2-0.7 6-0.5 12 3.3 15z"
android:strokeWidth="1.1"
android:fillColor="#f00027"
android:strokeColor="#000"/>
<path android:pathData="M182.8 105.8c3.3-1.9 5.3-5.4 7.2-9.1 0.3 7.8 1.8 16-4.2 22.1a17 17 0 0 0 6.7-4.3c-1.6 4.4-2.8 9.6-6.9 13.7 1.2-0.3 1.8 0.3 4.2-1.9-3 13.2-12.4 15.3-20.7 19 3.7-3.8 7.5-7.4 10-12-1.8 0.3-3.4 0.4-4.7 0.4 4.5-3.2 6.8-7.6 9-12a24 24 0 0 1-6.8 2.7c5-4.8 6-11.6 6.2-18.6zm-20 22c5.6 0.3 6.8-2.4 9.8-4-5 15.3-13 16-19.1 15.4 4.3-3 8.4-6 9.4-11.3zm4-3.1c10-3.2 11.3-12.8 9.3-23.3-2 6.6-3.9 7.2-6 8.2 0.7 6 0.5 12-3.3 15z"
android:strokeWidth="1.1"
android:fillColor="#f00027"
android:strokeColor="#000"/>
<path android:pathData="M146.8,95.8c0,-3.6 -2.8,-6.5 -6.4,-6.5a6.5,6.5 0,0 0,-6.4 6.5v26.7c0,3.5 3,6.4 6.4,6.4 3.5,0 6.4,-3 6.4,-6.4L146.8,95.7zM72,95.8c0,-3.6 -2.8,-6.5 -6.4,-6.5a6.5,6.5 0,0 0,-6.4 6.5v26.7c0,3.5 3,6.4 6.4,6.4 3.5,0 6.4,-3 6.5,-6.4L72.1,95.7zM117,65.2l4.6,-8.2s0.4,-0.7 -0.4,-1.2c-0.7,-0.4 -1.2,0.4 -1.2,0.4l-4.6,8.2a30.4,30.4 0,0 0,-24.7 0L86,56.2s-0.5,-0.8 -1.2,-0.4c-0.8,0.4 -0.4,1.3 -0.4,1.3l4.5,8.1a26,26 0,0 0,-14.6 23h57.2a26,26 0,0 0,-14.5 -23zM74.4,90.5v41.4a7,7 0,0 0,7 6.9h4.5v14.1c0,3.6 3,6.4 6.4,6.4 3.6,0 6.4,-2.8 6.5,-6.4v-14.1h8.5v14.1c0,3.6 3,6.4 6.4,6.4 3.5,0 6.4,-2.8 6.4,-6.4v-14.1h4.6a7,7 0,0 0,7 -6.9L131.7,90.4L74.3,90.4z"
android:fillColor="#79c257"/>
<path android:pathData="M94.6,88.6c4.5,5 11.5,3.3 17.2,3 -6,-1 -12.6,-2.5 -17,-8.6"
android:strokeWidth="1"
android:fillColor="#f8db00"
android:strokeColor="#000"/>
<path android:pathData="M106.5,90.2c4,-2.8 8.9,-2.5 13.3,-1.4 -2.3,-1.8 -1.5,-3.4 -14.6,-2.6a17,17 0,0 1,-9.4 -2.4c1.8,3.2 6.1,6 10.7,6.4z"
android:strokeWidth="1"
android:fillColor="#d36224"
android:strokeColor="#000"/>
<path android:pathData="M122.2,91c2,-4 -5,-9.6 -6.8,-9.6 -5,-0.5 -14.7,-0.3 -14.4,-3 -3,-0.4 -5,1 -5.8,4 2.7,2.2 5.7,3.7 9.3,3.8 12.3,-0.9 14,0.8 15,2.6l2.7,2.2z"
android:strokeLineJoin="bevel"
android:strokeWidth="1"
android:fillColor="#ecd404"
android:strokeColor="#000"/>
<path android:pathData="M89.7,77.2L84,79.5l1,-2.3L89,74l0.8,1v2.2zM114.8,76.7l-5.7,1.9 1.2,-2.2 4,-3 0.7,1 -0.2,2.3z"
android:strokeWidth="1"
android:fillColor="#680000"
android:strokeColor="#000"/>
<path android:pathData="M84.3,78.6c1.8,-4.7 3.7,-6.3 7.3,-5.1 0.6,0.3 1.3,0.3 1.5,2.2 -0.1,1.4 -0.8,2 -2,2 -2.3,0 -2,-1.5 -2,-3 -2.4,0 -4.8,8.6 -7,3h0.7c0,1.1 1.3,1.4 1.5,0.9zM109.3,77.7c2.2,-4.5 4.2,-6 7.7,-4.6 0.6,0.4 1.3,0.4 1.3,2.4 -0.2,1.3 -0.9,1.9 -2,1.8 -2.3,0 -2,-1.7 -1.8,-3.2 -2.5,-0.1 -5.5,8.3 -7.2,2.6h0.6c0,1.1 1.2,1.5 1.4,1z"
android:strokeWidth="1"
android:fillColor="#000"
android:strokeColor="#000"/>
<path android:pathData="M92.3,75.7c0,0.6 -0.4,1 -1,1a1,1 0,0 1,-1 -1c0,-0.5 0.5,-1 1,-1 0.6,0 1,0.5 1,1zM117.6,75.4c0,0.6 -0.5,1 -1,1a1,1 0,0 1,-1 -1.1c0,-0.5 0.5,-1 1,-1a1,1 0,0 1,1 1.1z"
android:fillColor="#fff"/>
</vector>
......@@ -12,7 +12,7 @@
android:shortcutLongLabel="@string/home_screen_shortcut_open_new_tab_2">
<intent
android:action="org.mozilla.fenix.OPEN_TAB"
android:targetPackage="org.mozilla.fenix.debug"
android:targetPackage="org.torproject.torbrowser_debug"
android:targetClass="org.mozilla.fenix.IntentReceiverActivity" />
</shortcut>
<shortcut
......@@ -23,7 +23,7 @@
android:shortcutLongLabel="@string/home_screen_shortcut_open_new_private_tab_2">
<intent
android:action="org.mozilla.fenix.OPEN_PRIVATE_TAB"
android:targetPackage="org.mozilla.fenix.debug"
android:targetPackage="org.torproject.torbrowser_debug"
android:targetClass="org.mozilla.fenix.IntentReceiverActivity" />
</shortcut>
</shortcuts>
......@@ -4,11 +4,8 @@
package="org.mozilla.fenix">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
......@@ -28,10 +25,10 @@
android:extractNativeLibs="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/NormalTheme"
android:usesCleartextTraffic="true"
android:usesCleartextTraffic="false"
tools:ignore="UnusedAttribute">
<!--
......@@ -298,6 +295,7 @@
<service
android:name=".push.FirebasePushService"
android:enabled="false"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
......@@ -318,6 +316,13 @@
android:name="androidx.work.impl.WorkManagerInitializer"
android:authorities="${applicationId}.workmanager-init"
tools:node="remove" />
<!-- Define Orbotservice's TorService -->
<service
android:name="org.torproject.android.service.TorService"
android:enabled="true"
android:exported="false"
android:stopWithTask="true">
</service>
</application>
</manifest>
This diff is collapsed.
......@@ -82,6 +82,7 @@ import org.mozilla.fenix.components.metrics.MozillaProductDetector
import org.mozilla.fenix.components.toolbar.ToolbarPosition
import org.mozilla.fenix.perf.MarkersActivityLifecycleCallbacks
import org.mozilla.fenix.utils.Settings
import org.torproject.android.service.util.Prefs
/**
*The main application class for Fenix. Records data to measure initialization performance.
......@@ -95,6 +96,8 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
private val logger = Logger("FenixApplication")
var terminating = false
open val components by lazy { Components(this) }
var visibilityLifecycleCallback: VisibilityLifecycleCallback? = null
......@@ -130,6 +133,21 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
PerfStartup.applicationOnCreate.stopAndAccumulate(completeMethodDurationTimerId)
}
fun isTerminating() = terminating
fun terminate() {
onTerminate()
System.exit(0)
}
override fun onTerminate() {
terminating = true
super.onTerminate()
components.torController.stop()
components.torController.stopTor()
}
@OptIn(DelicateCoroutinesApi::class) // GlobalScope usage
protected open fun initializeGlean() {
val telemetryEnabled = settings().isTelemetryEnabled
......@@ -164,6 +182,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
}
@CallSuper
@OptIn(DelicateCoroutinesApi::class) // GlobalScope usage
open fun setupInMainProcessOnly() {
ProfilerMarkerFactProcessor.create { components.core.engine.profiler }.register()
......@@ -189,6 +208,11 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
if (!megazordSetup.isCompleted) {
runBlockingIncrement { megazordSetup.await() }
}
GlobalScope.launch(Dispatchers.IO) {
// Give TAS the base Context
Prefs.setContext(applicationContext)
}
}
setupLeakCanary()
......@@ -210,6 +234,8 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
initVisualCompletenessQueueAndQueueTasks()
ProcessLifecycleOwner.get().lifecycle.addObserver(TelemetryLifecycleObserver(components.core.store))
components.torController.start()
}
@OptIn(DelicateCoroutinesApi::class) // GlobalScope usage
......
......
......@@ -4,6 +4,7 @@
package org.mozilla.fenix
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.content.Intent.ACTION_MAIN
......@@ -51,6 +52,8 @@ import mozilla.components.concept.engine.EngineView
import mozilla.components.concept.storage.BookmarkNode
import mozilla.components.concept.storage.BookmarkNodeType
import mozilla.components.concept.storage.HistoryMetadataKey
import mozilla.components.feature.app.links.RedirectDialogFragment
import mozilla.components.feature.app.links.SimpleRedirectDialogFragment
import mozilla.components.feature.contextmenu.DefaultSelectionActionDelegate
import mozilla.components.feature.privatemode.notification.PrivateNotificationFeature
import mozilla.components.feature.search.BrowserStoreSearchAdapter
......@@ -65,6 +68,7 @@ import mozilla.components.support.ktx.kotlin.isUrl
import mozilla.components.support.ktx.kotlin.toNormalizedUrl
import mozilla.components.support.locale.LocaleAwareAppCompatActivity
import mozilla.components.support.utils.SafeIntent
import mozilla.components.support.utils.TorUtils
import mozilla.components.support.utils.toSafeIntent
import mozilla.components.support.webextensions.WebExtensionPopupFeature
import org.mozilla.fenix.GleanMetrics.Metrics
......@@ -151,6 +155,8 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
private var isToolbarInflated = false
private var isBeingRecreated = false
private val webExtensionPopupFeature by lazy {
WebExtensionPopupFeature(components.core.store, ::openPopup)
}
......@@ -182,9 +188,11 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
private val startupPathProvider = StartupPathProvider()
private lateinit var startupTypeTelemetry: StartupTypeTelemetry
private var dialog: RedirectDialogFragment? = null
final override fun onCreate(savedInstanceState: Bundle?) {
// DO NOT MOVE ANYTHING ABOVE THIS getProfilerTime CALL.
val startTimeProfiler = components.core.engine.profiler?.getProfilerTime()
components.core.engine.profiler?.addMarker("Activity.onCreate", "HomeActivity")
components.strictMode.attachListenerToDisablePenaltyDeath(supportFragmentManager)
MarkersFragmentLifecycleCallbacks.register(supportFragmentManager, components.core.engine)
......@@ -429,6 +437,14 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
components.core.pocketStoriesService.stopPeriodicStoriesRefresh()
privateNotificationObserver?.stop()
if (!isBeingRecreated && !(application as FenixApplication).isTerminating()) {
// We assume the Activity is being destroyed because the user
// swiped away the app on the Recent screen. When this happens,
// we assume the user expects the entire Application is destroyed
// and not only the top Activity/Task. Therefore we kill the
// underlying Application, as well.
(application as FenixApplication).terminate()
}
}
override fun onConfigurationChanged(newConfig: Configuration) {
......@@ -448,9 +464,31 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
message = "recreate()"
)
isBeingRecreated = true
super.recreate()
}
// Copied from mozac AppLinksFeature.kt
internal fun getOrCreateDialog(): RedirectDialogFragment {
val existingDialog = dialog
if (existingDialog != null) {
return existingDialog
}
SimpleRedirectDialogFragment.newInstance().also {
dialog = it
return it
}
}
private fun isAlreadyADialogCreated(): Boolean {
return findPreviousDialogFragment() != null
}
private fun findPreviousDialogFragment(): RedirectDialogFragment? {
return supportFragmentManager.findFragmentByTag(RedirectDialogFragment.FRAGMENT_TAG) as? RedirectDialogFragment
}
/**
* Handles intents received when the activity is open.
*/
......@@ -463,6 +501,26 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
}
open fun handleNewIntent(intent: Intent) {
val startIntent = intent.getParcelableExtra<PendingIntent>(TorUtils.TORBROWSER_START_ACTIVITY_PROMPT)
if (startIntent != null) {
if (startIntent.creatorPackage == applicationContext.packageName) {
val dialog = getOrCreateDialog()
dialog.onConfirmRedirect = {
@Suppress("EmptyCatchBlock")
try {
startIntent.send()
} catch (error: PendingIntent.CanceledException) {
}
}
dialog.onCancelRedirect = {}
if (!isAlreadyADialogCreated()) {
dialog.showNow(supportFragmentManager, RedirectDialogFragment.FRAGMENT_TAG)
}
}
return
}
// Diagnostic breadcrumb for "Display already aquired" crash:
// https://github.com/mozilla-mobile/android-components/issues/7960
breadcrumb(
......@@ -655,11 +713,17 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
internal fun getModeFromIntentOrLastKnown(intent: Intent?): BrowsingMode {
intent?.toSafeIntent()?.let {
if (it.hasExtra(PRIVATE_BROWSING_MODE)) {
val startPrivateMode = it.getBooleanExtra(PRIVATE_BROWSING_MODE, false)
val startPrivateMode = settings().shouldDisableNormalMode ||
it.getBooleanExtra(PRIVATE_BROWSING_MODE, settings().openLinksInAPrivateTab)
return BrowsingMode.fromBoolean(isPrivate = startPrivateMode)
}
}
return settings().lastKnownMode
return when {
settings().shouldDisableNormalMode -> BrowsingMode.Private
settings().openLinksInAPrivateTab -> BrowsingMode.Private
else -> settings().lastKnownMode
}
}
/**
......
......
......@@ -20,6 +20,7 @@ import kotlinx.coroutines.launch
import mozilla.components.feature.addons.Addon
import mozilla.components.feature.addons.AddonManagerException
import mozilla.components.feature.addons.ui.translateName
import mozilla.components.support.webextensions.WebExtensionSupport.installedExtensions
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
......@@ -127,7 +128,7 @@ class InstalledAddonDetailsFragment : Fragment() {
runIfFragmentIsAttached {
this.addon = it
switch.isClickable = true
privateBrowsingSwitch.isVisible = it.isEnabled()
privateBrowsingSwitch.isVisible = false
privateBrowsingSwitch.isChecked = it.isAllowedInPrivateBrowsing()
switch.setText(R.string.mozac_feature_addons_enabled)
binding.settings.isVisible = shouldSettingsBeVisible()
......@@ -252,7 +253,7 @@ class InstalledAddonDetailsFragment : Fragment() {
private fun bindAllowInPrivateBrowsingSwitch() {
val switch = binding.allowInPrivateBrowsingSwitch
switch.isChecked = addon.isAllowedInPrivateBrowsing()
switch.isVisible = addon.isEnabled()
switch.isVisible = false
switch.setOnCheckedChangeListener { v, isChecked ->
val addonManager = v.context.components.addonManager
switch.isClickable = false
......@@ -278,6 +279,8 @@ class InstalledAddonDetailsFragment : Fragment() {
}
}
private fun bindRemoveButton() {
val isBuiltin = installedExtensions[addon.id]?.isBuiltIn() ?: false
binding.removeAddOn.isVisible = !isBuiltin
binding.removeAddOn.setOnClickListener {
setAllInteractiveViewsClickable(binding, false)
requireContext().components.addonManager.uninstallAddon(
......
......
......@@ -467,7 +467,7 @@ abstract class BaseBrowserFragment :
shouldForwardToThirdParties = {
PreferenceManager.getDefaultSharedPreferences(context).getBoolean(
context.getPreferenceKey(R.string.pref_key_external_download_manager), false
)
) && false
},
promptsStyling = DownloadsFeature.PromptsStyling(
gravity = Gravity.BOTTOM,
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment