summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
author Andrey Yepin <ayepin@google.com> 2024-12-12 10:28:25 -0800
committer Andrey Yepin <ayepin@google.com> 2024-12-12 10:28:25 -0800
commiteffd3e6c1bba8d5d5ce8047b9a1e455816fcd4b3 (patch)
tree457f791e63eb0e51f68da3f03f61a04b57f6216b /java
parent5e8f80ab06c1a5b65a7b30f8f384ee81daad4b14 (diff)
A feature flag removal
Remove 24Q4-released 'fix_missing_drawer_offset_calculation' feature flag. Bug: 347316548 Test: presubmits Flag: EXEMPT flag removal Change-Id: Id03271034a81015d77b6bd4164073671feb50e9b
Diffstat (limited to 'java')
-rw-r--r--java/src/com/android/intentresolver/ChooserActivity.java55
1 files changed, 21 insertions, 34 deletions
diff --git a/java/src/com/android/intentresolver/ChooserActivity.java b/java/src/com/android/intentresolver/ChooserActivity.java
index c2c7dfab..92f366ea 100644
--- a/java/src/com/android/intentresolver/ChooserActivity.java
+++ b/java/src/com/android/intentresolver/ChooserActivity.java
@@ -23,7 +23,6 @@ import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTE
import static androidx.lifecycle.LifecycleKt.getCoroutineScope;
import static com.android.intentresolver.ChooserActionFactory.EDIT_SOURCE;
-import static com.android.intentresolver.Flags.fixMissingDrawerOffsetCalculation;
import static com.android.intentresolver.Flags.fixShortcutsFlashing;
import static com.android.intentresolver.Flags.keyboardNavigationFix;
import static com.android.intentresolver.Flags.rebuildAdaptersOnTargetPinning;
@@ -2308,43 +2307,31 @@ public class ChooserActivity extends Hilt_ChooserActivity implements
|| recyclerView.getAdapter() == null
|| availableWidth != mCurrAvailableWidth;
- boolean insetsChanged = !Objects.equals(mLastAppliedInsets, mSystemWindowInsets);
-
- if (isLayoutUpdated
- || insetsChanged
- || mLastNumberOfChildren != recyclerView.getChildCount()
- || fixMissingDrawerOffsetCalculation()) {
- mCurrAvailableWidth = availableWidth;
- if (isLayoutUpdated) {
- // It is very important we call setAdapter from here. Otherwise in some cases
- // the resolver list doesn't get populated, such as b/150922090, b/150918223
- // and b/150936654
- recyclerView.setAdapter(gridAdapter);
- ((GridLayoutManager) recyclerView.getLayoutManager()).setSpanCount(
- mMaxTargetsPerRow);
-
- updateTabPadding();
- }
+ mCurrAvailableWidth = availableWidth;
+ if (isLayoutUpdated) {
+ // It is very important we call setAdapter from here. Otherwise in some cases
+ // the resolver list doesn't get populated, such as b/150922090, b/150918223
+ // and b/150936654
+ recyclerView.setAdapter(gridAdapter);
+ ((GridLayoutManager) recyclerView.getLayoutManager()).setSpanCount(
+ mMaxTargetsPerRow);
- if (mChooserMultiProfilePagerAdapter.getActiveProfile() != mInitialProfile) {
- return;
- }
+ updateTabPadding();
+ }
+
+ if (mChooserMultiProfilePagerAdapter.getActiveProfile() != mInitialProfile) {
+ return;
+ }
- if (mLastNumberOfChildren == recyclerView.getChildCount() && !insetsChanged
- && !fixMissingDrawerOffsetCalculation()) {
+ getMainThreadHandler().post(() -> {
+ if (mResolverDrawerLayout == null || gridAdapter == null) {
return;
}
-
- getMainThreadHandler().post(() -> {
- if (mResolverDrawerLayout == null || gridAdapter == null) {
- return;
- }
- int offset = calculateDrawerOffset(top, bottom, recyclerView, gridAdapter);
- mResolverDrawerLayout.setCollapsibleHeightReserved(offset);
- mEnterTransitionAnimationDelegate.markOffsetCalculated();
- mLastAppliedInsets = mSystemWindowInsets;
- });
- }
+ int offset = calculateDrawerOffset(top, bottom, recyclerView, gridAdapter);
+ mResolverDrawerLayout.setCollapsibleHeightReserved(offset);
+ mEnterTransitionAnimationDelegate.markOffsetCalculated();
+ mLastAppliedInsets = mSystemWindowInsets;
+ });
}
private int calculateDrawerOffset(