Skip to content

Commit ee64466

Browse files
authored
Merge pull request #9051 from element-hq/feature/bma/target35
Change targetApi to 35
2 parents cba1bb7 + f421ead commit ee64466

File tree

95 files changed

+587
-197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+587
-197
lines changed

dependencies.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ext.versions = [
22
'minSdk' : 21,
3-
'compileSdk' : 34,
4-
'targetSdk' : 34,
3+
'compileSdk' : 35,
4+
'targetSdk' : 35,
55
'sourceCompat' : JavaVersion.VERSION_21,
66
'targetCompat' : JavaVersion.VERSION_21,
77
'jvmTarget' : "21",
88
]
99

10-
def gradle = "8.4.2"
10+
def gradle = "8.11.0"
1111
// Ref: https://kotlinlang.org/releases.html
1212
def kotlin = "1.9.24"
1313
def kotlinCoroutines = "1.8.1"

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ signing.element.nightly.keyPassword=Secret
4242

4343
# Customise the Lint version to use a more recent version than the one bundled with AGP
4444
# https://googlesamples.github.io/android-custom-lint-rules/usage/newer-lint.md.html
45-
android.experimental.lint.version=8.6.0-alpha08
45+
android.experimental.lint.version=8.12.0-alpha08

gradle/wrapper/gradle-wrapper.jar

311 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
3+
distributionSha256Sum=bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,10 +85,8 @@ done
8385
# This is normally unused
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
88+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
9090

9191
# Use the maximum available, or set MAX_FD != -1 to use that value.
9292
MAX_FD=maximum
@@ -114,7 +114,7 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
118118

119119

120120
# Determine the Java command to use to start the JVM.
@@ -133,26 +133,29 @@ location of your Java installation."
133133
fi
134134
else
135135
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
136+
if ! command -v java >/dev/null 2>&1
137+
then
138+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137139
138140
Please set the JAVA_HOME variable in your environment to match the
139141
location of your Java installation."
142+
fi
140143
fi
141144

142145
# Increase the maximum file descriptors if we can.
143146
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144147
case $MAX_FD in #(
145148
max*)
146149
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
150+
# shellcheck disable=SC2039,SC3045
148151
MAX_FD=$( ulimit -H -n ) ||
149152
warn "Could not query maximum file descriptor limit"
150153
esac
151154
case $MAX_FD in #(
152155
'' | soft) :;; #(
153156
*)
154157
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
158+
# shellcheck disable=SC2039,SC3045
156159
ulimit -n "$MAX_FD" ||
157160
warn "Could not set maximum file descriptor limit to $MAX_FD"
158161
esac
@@ -197,16 +200,20 @@ if "$cygwin" || "$msys" ; then
197200
done
198201
fi
199202

200-
# Collect all arguments for the java command;
201-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202-
# shell script including quotes and variable substitutions, so put them in
203-
# double quotes to make sure that they get re-expanded; and
204-
# * put everything else in single quotes, so that it's not re-expanded.
203+
204+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
205+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206+
207+
# Collect all arguments for the java command:
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209+
# and any embedded shellness will be escaped.
210+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211+
# treated as '${Hostname}' itself on the command line.
205212

206213
set -- \
207214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
208215
-classpath "$CLASSPATH" \
209-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
210217
"$@"
211218

212219
# Stop when "xargs" is not available.

gradlew.bat

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
4345
%JAVA_EXE% -version >NUL 2>&1
4446
if %ERRORLEVEL% equ 0 goto execute
4547

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
48+
echo. 1>&2
49+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50+
echo. 1>&2
51+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52+
echo location of your Java installation. 1>&2
5153

5254
goto fail
5355

@@ -57,22 +59,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5759

5860
if exist "%JAVA_EXE%" goto execute
5961

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
62+
echo. 1>&2
63+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64+
echo. 1>&2
65+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66+
echo location of your Java installation. 1>&2
6567

6668
goto fail
6769

6870
:execute
6971
@rem Setup the command line
7072

71-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
set CLASSPATH=
7274

7375

7476
@rem Execute Gradle
75-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
77+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7678

7779
:end
7880
@rem End local scope for the variables with windows NT shell

library/attachment-viewer/src/main/java/im/vector/lib/attachmentviewer/AttachmentViewerActivity.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,15 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
131131
// the touch coordinates
132132
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
133133
// New API instead of SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
134+
@Suppress("DEPRECATION")
134135
window.setDecorFitsSystemWindows(false)
135136
// New API instead of SYSTEM_UI_FLAG_IMMERSIVE
136137
window.decorView.windowInsetsController?.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
137138
// New API instead of FLAG_TRANSLUCENT_STATUS
139+
@Suppress("DEPRECATION")
138140
window.statusBarColor = ContextCompat.getColor(this, R.color.half_transparent_status_bar)
139141
// new API instead of FLAG_TRANSLUCENT_NAVIGATION
142+
@Suppress("DEPRECATION")
140143
window.navigationBarColor = ContextCompat.getColor(this, R.color.half_transparent_status_bar)
141144
} else {
142145
@Suppress("DEPRECATION")
@@ -318,6 +321,7 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
318321
protected open fun shouldAnimateDismiss(): Boolean = true
319322

320323
protected open fun animateClose() {
324+
@Suppress("DEPRECATION")
321325
window.statusBarColor = Color.TRANSPARENT
322326
finish()
323327
}
@@ -334,14 +338,17 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
334338
// Or for "sticky immersive," replace it with SYSTEM_UI_FLAG_IMMERSIVE_STICKY
335339
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
336340
// New API instead of SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
341+
@Suppress("DEPRECATION")
337342
window.setDecorFitsSystemWindows(false)
338343
// new API instead of SYSTEM_UI_FLAG_HIDE_NAVIGATION
339344
window.decorView.windowInsetsController?.hide(WindowInsets.Type.navigationBars())
340345
// New API instead of SYSTEM_UI_FLAG_IMMERSIVE
341346
window.decorView.windowInsetsController?.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
342347
// New API instead of FLAG_TRANSLUCENT_STATUS
348+
@Suppress("DEPRECATION")
343349
window.statusBarColor = ContextCompat.getColor(this, R.color.half_transparent_status_bar)
344350
// New API instead of FLAG_TRANSLUCENT_NAVIGATION
351+
@Suppress("DEPRECATION")
345352
window.navigationBarColor = ContextCompat.getColor(this, R.color.half_transparent_status_bar)
346353
} else {
347354
@Suppress("DEPRECATION")
@@ -363,6 +370,7 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
363370
systemUiVisibility = true
364371
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
365372
// New API instead of SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
373+
@Suppress("DEPRECATION")
366374
window.setDecorFitsSystemWindows(false)
367375
} else {
368376
@Suppress("DEPRECATION")

library/ui-styles/src/main/res/values/theme_light.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464

6565
<!-- Material color -->
6666
<item name="colorPrimary">@color/element_accent_light</item>
67+
<!-- Fix background color of status bar in home and room detail activity -->
68+
<!--item name="colorPrimaryDark">@color/element_background_light</item-->
69+
<item name="colorPrimaryDark">?vctr_toolbar_background</item>
6770
<item name="colorPrimaryVariant">@color/element_accent_light</item>
6871
<item name="colorOnPrimary">@android:color/white</item>
6972
<item name="colorSecondary">@color/element_accent_light</item>

matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/interceptors/FormattedJsonHttpLogger.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ internal class FormattedJsonHttpLogger(
3838
*/
3939
@Synchronized
4040
override fun log(message: String) {
41-
Timber.v(message)
41+
Timber.v(message.take(20_000))
42+
if (message.length > 20_000) return
4243

4344
// Try to log formatted Json only if there is a chance that [message] contains Json.
4445
// It can be only the case if we log the bodies of Http requests.

vector-app/src/debug/java/im/vector/app/features/debug/DebugMenuActivity.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import android.app.NotificationChannel
1212
import android.app.NotificationManager
1313
import android.content.Intent
1414
import android.os.Build
15+
import android.view.View
1516
import androidx.core.app.NotificationCompat
1617
import androidx.core.app.Person
1718
import androidx.core.content.getSystemService
@@ -49,7 +50,9 @@ import javax.inject.Inject
4950
class DebugMenuActivity : VectorBaseActivity<ActivityDebugMenuBinding>() {
5051

5152
override fun getBinding() = ActivityDebugMenuBinding.inflate(layoutInflater)
52-
53+
override fun getCoordinatorLayout() = views.coordinatorLayout
54+
override val rootView: View
55+
get() = views.coordinatorLayout
5356
@Inject lateinit var clock: Clock
5457

5558
private lateinit var buffer: ByteArray

0 commit comments

Comments
 (0)