Skip to content

Commit 5a37e4b

Browse files
dsn5ftpekingme
authored andcommitted
[Gradle] Update to AGP 7.4.2 to get latest lint and fix Android U lint issues
PiperOrigin-RevId: 520691813
1 parent c7d31fb commit 5a37e4b

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
mavenCentral()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:7.2.0'
7+
classpath 'com.android.tools.build:gradle:7.4.2'
88
}
99
}
1010

catalog/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ android {
118118
unitTests.returnDefaultValues = true
119119
}
120120

121-
aaptOptions {
122-
additionalParameters "--no-version-vectors"
123-
}
124-
125121
sourceSets {
126122
main {
127123
manifest.srcFile 'java/io/material/catalog/AndroidManifest.xml'
@@ -146,4 +142,7 @@ android {
146142
sourceCompatibility JavaVersion.VERSION_1_8
147143
targetCompatibility JavaVersion.VERSION_1_8
148144
}
145+
androidResources {
146+
additionalParameters '--no-version-vectors'
147+
}
149148
}

lib/java/com/google/android/material/search/SearchView.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,11 @@ public void handleBackInvoked() {
285285
}
286286

287287
BackEvent backEvent = searchViewAnimationHelper.onHandleBackInvoked();
288-
if (searchBar == null || backEvent == null || !BuildCompat.isAtLeastU()) {
288+
if (BuildCompat.isAtLeastU() && searchBar != null && backEvent != null) {
289+
searchViewAnimationHelper.finishBackProgress();
290+
} else {
289291
hide();
290-
return;
291292
}
292-
293-
searchViewAnimationHelper.finishBackProgress();
294293
}
295294

296295
@RequiresApi(VERSION_CODES.UPSIDE_DOWN_CAKE)

0 commit comments

Comments
 (0)