Skip to content

Commit

Permalink
Tested on real android 14 and turns out we did not need this
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonHalvdansson committed Oct 13, 2023
1 parent fa669be commit 4c784ac
Showing 1 changed file with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,31 +85,6 @@ public void onSwitchView(boolean isAtWebView) {
}
}

//we only need to do the translucent setting on Android 14 and above as its purpose is to
//make the predictive back animation nice (when we peek back from a deeper activity,
// CommentsActivity cannot be transparent). The theme already sets the activity to translucent
//so when we animate in we are transparent which is important!
@Override
protected void onResume() {
super.onResume();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
setTranslucent(true);
}
}, 400);
}
}

@Override
protected void onPause() {
super.onPause();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
setTranslucent(false);
}
}

@Override
protected void onDestroy() {
super.onDestroy();
Expand Down

0 comments on commit 4c784ac

Please sign in to comment.