summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles He <qiurui@google.com>2016-12-01 19:22:33 +0000
committergitbuildkicker <android-build@google.com>2017-01-19 16:32:56 -0800
commit5f621b5b1549e8379aee05807652d5111382ccc6 (patch)
tree2c4b5c96aa6ea77e0787269573e777e69e0df5de
parent1c4d535d0806dbeb6d2fa5cea0373cbd9ab6d33b (diff)
downloadandroid-frameworks-base-5f621b5b1549e8379aee05807652d5111382ccc6.tar.gz
android-frameworks-base-5f621b5b1549e8379aee05807652d5111382ccc6.tar.xz
Add @GuardedBy annotation to PersistentDataBlockService#mIsWritable.
Change-Id: I1024f2a56badde5c123d025d6fe02f42559cbcb1 Test: manual Bug: 30352311 (cherry picked from commit f6f1d627483b4dad9d65176769a1ee92c59a4810) (cherry picked from commit 71d2a41dd9c8be8c4bca5eba339802e1e0c2be3c)
-rw-r--r--services/core/java/com/android/server/PersistentDataBlockService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/PersistentDataBlockService.java b/services/core/java/com/android/server/PersistentDataBlockService.java
index a989a17..1a6193d 100644
--- a/services/core/java/com/android/server/PersistentDataBlockService.java
+++ b/services/core/java/com/android/server/PersistentDataBlockService.java
@@ -32,6 +32,7 @@ import android.service.persistentdata.PersistentDataBlockManager;
import android.util.Slog;
import com.android.internal.R;
+import com.android.internal.annotations.GuardedBy;
import libcore.io.IoUtils;
@@ -83,6 +84,8 @@ public class PersistentDataBlockService extends SystemService {
private int mAllowedUid = -1;
private long mBlockDeviceSize;
+
+ @GuardedBy("mLock")
private boolean mIsWritable = true;
public PersistentDataBlockService(Context context) {