OSDN Git Service

Merge "Turn off voice interaction service restrction for now" into lmp-dev
authorDianne Hackborn <hackbod@google.com>
Wed, 13 Aug 2014 06:07:09 +0000 (06:07 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Tue, 12 Aug 2014 23:14:35 +0000 (23:14 +0000)
services/core/java/com/android/server/tv/PersistentDataStore.java

index 852e640..4af8f2c 100644 (file)
@@ -91,6 +91,7 @@ final class PersistentDataStore {
     }
 
     public void setParentalControlsEnabled(boolean enabled) {
+        loadIfNeeded();
         if (mParentalControlsEnabled != enabled) {
             mParentalControlsEnabled = enabled;
             mParentalControlsEnabledChanged = true;
@@ -114,6 +115,7 @@ final class PersistentDataStore {
     }
 
     public void addBlockedRating(TvContentRating rating) {
+        loadIfNeeded();
         if (rating != null && !mBlockedRatings.contains(rating)) {
             mBlockedRatings.add(rating);
             mBlockedRatingsChanged = true;
@@ -122,6 +124,7 @@ final class PersistentDataStore {
     }
 
     public void removeBlockedRating(TvContentRating rating) {
+        loadIfNeeded();
         if (rating != null && mBlockedRatings.contains(rating)) {
             mBlockedRatings.remove(rating);
             mBlockedRatingsChanged = true;