Skip to content

Commit

Permalink
[Gradle] Update to AGP 7.4.2 to get latest lint and fix Android U lin…
Browse files Browse the repository at this point in the history
…t issues

PiperOrigin-RevId: 520691813
  • Loading branch information
dsn5ft authored and pekingme committed Mar 30, 2023
1 parent c7d31fb commit 5a37e4b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:7.4.2'
}
}

Expand Down
7 changes: 3 additions & 4 deletions catalog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ android {
unitTests.returnDefaultValues = true
}

aaptOptions {
additionalParameters "--no-version-vectors"
}

sourceSets {
main {
manifest.srcFile 'java/io/material/catalog/AndroidManifest.xml'
Expand All @@ -146,4 +142,7 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
androidResources {
additionalParameters '--no-version-vectors'
}
}
7 changes: 3 additions & 4 deletions lib/java/com/google/android/material/search/SearchView.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,11 @@ public void handleBackInvoked() {
}

BackEvent backEvent = searchViewAnimationHelper.onHandleBackInvoked();
if (searchBar == null || backEvent == null || !BuildCompat.isAtLeastU()) {
if (BuildCompat.isAtLeastU() && searchBar != null && backEvent != null) {
searchViewAnimationHelper.finishBackProgress();
} else {
hide();
return;
}

searchViewAnimationHelper.finishBackProgress();
}

@RequiresApi(VERSION_CODES.UPSIDE_DOWN_CAKE)
Expand Down

0 comments on commit 5a37e4b

Please sign in to comment.