diff options
Diffstat (limited to 'docs/html/guide/topics/data/backup.jd')
-rw-r--r-- | docs/html/guide/topics/data/backup.jd | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/docs/html/guide/topics/data/backup.jd b/docs/html/guide/topics/data/backup.jd index 4eba4f3..d91e422 100644 --- a/docs/html/guide/topics/data/backup.jd +++ b/docs/html/guide/topics/data/backup.jd @@ -708,17 +708,9 @@ you must use synchronized statements each time you perform a read or write. For in any Activity where you read and write the file, you need an object to use as the intrinsic lock for the synchronized statements:</p> -<div class="sidebox-wrapper"> -<div class="sidebox"> -<p><strong>Interesting Fact:</strong></p> -<p>A zero-length array is lighter-weight than a normal Object, so it's great for an -intrinsic lock.</p> -</div> -</div> - <pre> // Object for intrinsic lock -static final Object[] sDataLock = new Object[0]; +static final Object sDataLock = new Object(); </pre> <p>Then create a synchronized statement with this lock each time you read or write the files. For |