Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf8a22d8 authored by Zhizhi Liu's avatar Zhizhi Liu
Browse files

Increase SI suggestion filter timeout value for TV.

Bug: 74022482

Test: Manually check phone and TV get different timeout value.
Change-Id: Ife2784f6781493d33a92887a21c3adc0ac6ff43d
parent 390bdfe1
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<resources>
    <integer name="check_task_timeout_ms">700</integer>
</resources>
 No newline at end of file
+15 −0
Original line number Diff line number Diff line
<?xml version="1.0"  encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
          http://www.apache.org/licenses/LICENSE-2.0
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<resources>
    <integer name="check_task_timeout_ms">200</integer>
</resources>
 No newline at end of file
+4 −2
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.support.annotation.VisibleForTesting;
import android.text.TextUtils;
import android.util.Log;

import com.android.settings.intelligence.R;
import com.android.settings.intelligence.suggestions.model.CandidateSuggestion;

import java.util.ArrayList;
@@ -48,7 +49,6 @@ import java.util.concurrent.TimeoutException;
public class CandidateSuggestionFilter {

    private static final String TAG = "CandidateSuggestionFilter";
    private static final long CHECK_TASK_TIMEOUT_MS = 200;

    private static CandidateSuggestionFilter sChecker;
    private static ExecutorService sExecutorService;
@@ -78,7 +78,9 @@ public class CandidateSuggestionFilter {
        }
        for (CandidateFilterTask task : checkTasks) {
            try {
                final CandidateSuggestion candidate = task.get(CHECK_TASK_TIMEOUT_MS,
                long checkTaskTimeOutValue =
                        context.getResources().getInteger(R.integer.check_task_timeout_ms);
                final CandidateSuggestion candidate = task.get(checkTaskTimeOutValue,
                        TimeUnit.MILLISECONDS);
                if (candidate != null) {
                    incompleteCandidates.add(candidate);