Disable long-press home Orb animation.

Bug: 64814158
Test: Tested manually.
Change-Id: I8a33e302e26211be77b4ee2e0d36f438cfccd383
This commit is contained in:
Rajeev Kumar
2017-09-25 19:08:12 -07:00
parent 87794e95a2
commit 3e0843038d

View File

@@ -61,6 +61,7 @@ public class AssistManager implements ConfigurationChangedReceiver {
private AssistOrbContainer mView;
private final DeviceProvisionedController mDeviceProvisionedController;
protected final AssistUtils mAssistUtils;
private final boolean mShouldEnableOrb;
private IVoiceInteractionSessionShowCallback mShowCallback =
new IVoiceInteractionSessionShowCallback.Stub() {
@@ -96,6 +97,7 @@ public class AssistManager implements ConfigurationChangedReceiver {
| ActivityInfo.CONFIG_LOCALE | ActivityInfo.CONFIG_UI_MODE
| ActivityInfo.CONFIG_SCREEN_LAYOUT | ActivityInfo.CONFIG_ASSETS_PATHS);
onConfigurationChanged(context.getResources().getConfiguration());
mShouldEnableOrb = !ActivityManager.isLowRamDeviceStatic();
}
protected void registerVoiceInteractionSessionListener() {
@@ -179,7 +181,9 @@ public class AssistManager implements ConfigurationChangedReceiver {
private void showOrb(@NonNull ComponentName assistComponent, boolean isService) {
maybeSwapSearchIcon(assistComponent, isService);
mView.show(true /* show */, true /* animate */);
if (mShouldEnableOrb) {
mView.show(true /* show */, true /* animate */);
}
}
private void startAssistInternal(Bundle args, @NonNull ComponentName assistComponent,