Merge "Fixes a NPE in search manager in CTS tests." into pi-dev
am: 188b642ac0
Change-Id: Ie3a7de65c4b8d06a5b0110a93689ca604bdf858a
This commit is contained in:
committed by
android-build-merger
commit
9ec1c3fe3a
@@ -207,8 +207,12 @@ public class AssistManager implements ConfigurationChangedReceiver {
|
||||
boolean structureEnabled = Settings.Secure.getIntForUser(mContext.getContentResolver(),
|
||||
Settings.Secure.ASSIST_STRUCTURE_ENABLED, 1, UserHandle.USER_CURRENT) != 0;
|
||||
|
||||
final Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
|
||||
.getAssistIntent(structureEnabled);
|
||||
final SearchManager searchManager =
|
||||
(SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE);
|
||||
if (searchManager == null) {
|
||||
return;
|
||||
}
|
||||
final Intent intent = searchManager.getAssistIntent(structureEnabled);
|
||||
if (intent == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user