Use the standard place holder for the security summary. DO NOT MERGE
This removes the jitter when the cache is empty and there is initially no summary, and then it is replaced by the fetched summary when it's available. Bug:36463348 Test: make RunSettingsRoboTests Change-Id: I92cafbf23e3c562a470488dea28fd5106bbdf885
This commit is contained in:
@@ -24,6 +24,7 @@ import android.content.res.Resources;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.trustagent.TrustAgentManager;
|
||||
import com.android.settings.trustagent.TrustAgentManagerImpl;
|
||||
import com.android.settingslib.drawer.DashboardCategory;
|
||||
@@ -49,8 +50,6 @@ public class SecurityFeatureProviderImpl implements SecurityFeatureProvider {
|
||||
|
||||
@VisibleForTesting
|
||||
static final Drawable DEFAULT_ICON = null;
|
||||
@VisibleForTesting
|
||||
static final String DEFAULT_SUMMARY = " ";
|
||||
|
||||
@VisibleForTesting
|
||||
static Map<String, Pair<String, Integer>> sIconCache = new TreeMap<>();
|
||||
@@ -118,7 +117,7 @@ public class SecurityFeatureProviderImpl implements SecurityFeatureProvider {
|
||||
// from shifting when the final summary is injected.
|
||||
final String summaryUri =
|
||||
tile.metaData.getString(TileUtils.META_DATA_PREFERENCE_SUMMARY_URI, null);
|
||||
String summary = DEFAULT_SUMMARY;
|
||||
String summary = context.getString(R.string.summary_placeholder);
|
||||
if ((summaryUri != null) && sSummaryCache.containsKey(summaryUri)) {
|
||||
summary = sSummaryCache.get(summaryUri);
|
||||
}
|
||||
|
Reference in New Issue
Block a user