Snap for 4824048 from 39184a531709c816a8ae3222f7a9e49660ce97db to pi-release

Change-Id: I9cd1c2f80498c9d0efe0d25c9bec114038a8e775
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ca14a02..5d1a1b9 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -27,7 +27,8 @@
 
     <application
         android:label="@string/app_name_settings_intelligence"
-        android:icon="@mipmap/ic_launcher">
+        android:icon="@mipmap/ic_launcher"
+        android:supportsRtl="true">
         <service
             android:name=".suggestions.SuggestionService"
             android:exported="true"
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.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 @@
 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 @@
         }
         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);