Count isActivityEmbedded() state to show split screen warning dialog
According to Activity#isInMultiWindowMode() API design, When the Task is in fullscreen windowing mode, and the app is in ActivityEmbedding split (two activities split left and right), Activity.isInMultiWindowMode() == true. With the reason, we should consider additional condidion for foldable device in unfolded mode, while settings activities config to embedded activity, we can't only count on isInMultiWindowMode() for split-screen mode Bug: 278176550 Bug: 276938441 Test: atest CombinedBiometricProfileSettingsTest Test: atest FingerprintSettingsFragmentTest Test: manaul go to split screen mode and try to enroll face Test: manual unfold device and enroll finger or face Change-Id: I02bd223f27889e74e67b73051531a5b4554f3de1
This commit is contained in:
@@ -76,7 +76,7 @@ public class FaceSettingsEnrollButtonPreferenceController extends BasePreference
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// If it's in multi window mode, do not start the introduction intent.
|
||||
if (mListener != null && mListener.checkInMultiWindowMode()) {
|
||||
if (mListener != null && mListener.onShowSplitScreenDialog()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,10 +121,10 @@ public class FaceSettingsEnrollButtonPreferenceController extends BasePreference
|
||||
*/
|
||||
public interface Listener {
|
||||
/**
|
||||
* Called to check whether it's in multi window mode
|
||||
* @return Whether it's in multi window mode.
|
||||
* Called to check whether to show dialog in split screen mode
|
||||
* @return Whether split screen warning dialog shown.
|
||||
*/
|
||||
boolean checkInMultiWindowMode();
|
||||
boolean onShowSplitScreenDialog();
|
||||
|
||||
/**
|
||||
* Called when the user has indicated an intent to begin enrolling a new face.
|
||||
|
Reference in New Issue
Block a user