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

Commit 39184a53 authored by Zhizhi Liu's avatar Zhizhi Liu Committed by Android (Google) Code Review
Browse files

Merge "Increase SI suggestion filter timeout value for TV." into pi-dev

parents 77653fd1 cf8a22d8
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);