diff options
| author | Zhizhi Liu <zhizhiliu@google.com> | 2018-06-05 21:50:18 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-06-05 21:50:18 +0000 |
| commit | 39184a531709c816a8ae3222f7a9e49660ce97db (patch) | |
| tree | 41a48bd6f7e2ce03c5dea9a167da482e08270698 | |
| parent | 77653fd13b137f7e79e59c411b4c1f0708ae48a6 (diff) | |
| parent | cf8a22d8ef2f0dd0649601b837af26feabcdbd53 (diff) | |
| download | platform_packages_apps_SettingsIntelligence-pie-qpr1-release.tar.gz platform_packages_apps_SettingsIntelligence-pie-qpr1-release.tar.bz2 platform_packages_apps_SettingsIntelligence-pie-qpr1-release.zip | |
Merge "Increase SI suggestion filter timeout value for TV." into pi-devandroid-9.0.0_r47android-9.0.0_r46android-9.0.0_r45android-9.0.0_r44android-9.0.0_r43android-9.0.0_r42android-9.0.0_r41android-9.0.0_r40android-9.0.0_r39android-9.0.0_r38android-9.0.0_r37android-9.0.0_r36android-9.0.0_r35android-9.0.0_r34android-9.0.0_r33android-9.0.0_r32android-9.0.0_r31android-9.0.0_r30android-9.0.0_r22android-9.0.0_r21android-9.0.0_r20android-9.0.0_r19android-9.0.0_r16pie-qpr3-s1-releasepie-qpr3-releasepie-qpr3-b-releasepie-qpr2-releasepie-qpr1-s3-releasepie-qpr1-s2-releasepie-qpr1-s1-releasepie-qpr1-releasepie-dr1-devpie-devpie-b4s4-releasepie-b4s4-dev
| -rw-r--r-- | res/values-television/integers.xml | 19 | ||||
| -rw-r--r-- | res/values/integers.xml | 15 | ||||
| -rw-r--r-- | src/com/android/settings/intelligence/suggestions/eligibility/CandidateSuggestionFilter.java | 6 |
3 files changed, 38 insertions, 2 deletions
diff --git a/res/values-television/integers.xml b/res/values-television/integers.xml new file mode 100644 index 0000000..100a391 --- /dev/null +++ b/res/values-television/integers.xml @@ -0,0 +1,19 @@ +<?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 diff --git a/res/values/integers.xml b/res/values/integers.xml new file mode 100644 index 0000000..03f4354 --- /dev/null +++ b/res/values/integers.xml @@ -0,0 +1,15 @@ +<?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 diff --git a/src/com/android/settings/intelligence/suggestions/eligibility/CandidateSuggestionFilter.java b/src/com/android/settings/intelligence/suggestions/eligibility/CandidateSuggestionFilter.java index 5f614f6..5268ca7 100644 --- a/src/com/android/settings/intelligence/suggestions/eligibility/CandidateSuggestionFilter.java +++ b/src/com/android/settings/intelligence/suggestions/eligibility/CandidateSuggestionFilter.java @@ -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); |
