Car user switching dialog taking more than 3 seconds

Bug: 144706096
Bug: 145021634
Bug: 140999054
Bug: 145001354
Test: adb shell am instrument -w -r -e include_creation_time true -e iterations 10 -e class android.platform.test.scenario.multiuser.nonui.TEST_NAME android.platform.test.scenario/androidx.test.runner.AndroidJUnitRunner
      // for TEST_NAME SwitchToExistingSecondaryUserBenchmark, user switch time dropped from 5.2 seconds to 2.2 seconds
Change-Id: I5474c683725b22f3e15e9b80ac4209df028a7993
(cherry picked from commit dec438aa5c5ae5a54d7bc7ac788ec4936ae3e3ba)
This commit is contained in:
Mayank Garg
2019-11-22 15:53:19 -08:00
parent 659f477f65
commit 3629c607f0

View File

@@ -37,6 +37,7 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.android.internal.R; import com.android.internal.R;
@@ -65,7 +66,9 @@ final class CarUserSwitchingDialog extends UserSwitchingDialog {
setCancelable(false); setCancelable(false);
Resources res = getContext().getResources(); Resources res = getContext().getResources();
// Custom view due to alignment and font size requirements // Custom view due to alignment and font size requirements
getContext().setTheme(R.style.Theme_DeviceDefault_Light_Dialog_Alert_UserSwitchingDialog); // TODO (b/145021634): disabled because it's delaying user switch by 3 seconds
// getContext()
// .setTheme(R.style.Theme_DeviceDefault_Light_Dialog_Alert_UserSwitchingDialog);
View view = LayoutInflater.from(getContext()).inflate( View view = LayoutInflater.from(getContext()).inflate(
R.layout.car_user_switching_dialog, R.layout.car_user_switching_dialog,
null); null);