Merge "Handle night display state when timezone changes" into oc-mr1-dev

This commit is contained in:
Christine Franks
2017-09-20 00:23:29 +00:00
committed by Android (Google) Code Review
5 changed files with 47 additions and 21 deletions

View File

@@ -166,8 +166,7 @@ public class SuggestionFeatureProviderImpl implements SuggestionFeatureProvider
@VisibleForTesting
boolean hasUsedNightDisplay(Context context) {
final ContentResolver cr = context.getContentResolver();
final long lastActivatedTimeMillis = Secure.getLong(cr,
Secure.NIGHT_DISPLAY_LAST_ACTIVATED_TIME, -1);
return lastActivatedTimeMillis > 0;
return Secure.getInt(cr, Secure.NIGHT_DISPLAY_AUTO_MODE, 0) != 0
|| Secure.getString(cr, Secure.NIGHT_DISPLAY_LAST_ACTIVATED_TIME) != null;
}
}