diff options
author | Tavis Bohne <tbohne@google.com> | 2016-03-17 21:35:17 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-03-17 21:35:17 +0000 |
commit | 3d3c03ef9db5a163f509d0f77d35e3d2d847bb06 (patch) | |
tree | bfb9d9b1636e6a8a2708f47c36d93c9390ecdebd | |
parent | 98eadb2ed3c21e8a5097dcaa130a62a520fc8260 (diff) | |
parent | 59265b231020a4896023f24ade912dad5cae2ad6 (diff) | |
download | photoviewer-3d3c03ef9db5a163f509d0f77d35e3d2d847bb06.tar.gz |
Merge "PhotoView announces each photo as it\'s swiped in" into ub-photoviewer-dorothea am: a556a0c
am: 59265b2
* commit '59265b231020a4896023f24ade912dad5cae2ad6':
PhotoView announces each photo as it's swiped in
-rw-r--r-- | src/com/android/ex/photo/PhotoViewController.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/ex/photo/PhotoViewController.java b/src/com/android/ex/photo/PhotoViewController.java index 407da45..aa9ff4d 100644 --- a/src/com/android/ex/photo/PhotoViewController.java +++ b/src/com/android/ex/photo/PhotoViewController.java @@ -201,7 +201,7 @@ public class PhotoViewController implements // text. private long mEnterFullScreenDelayTime; - private boolean isTitleAnnounced; + private int lastAnnouncedTitle = -1; public PhotoViewController(ActivityInterface activity) { mActivity = activity; @@ -809,11 +809,11 @@ public class PhotoViewController implements int uriIndex = cursor.getColumnIndex(PhotoContract.PhotoViewColumns.URI); mCurrentPhotoUri = cursor.getString(uriIndex); updateActionBar(); - if (mAccessibilityManager.isEnabled() && isTitleAnnounced == false) { + if (mAccessibilityManager.isEnabled() && lastAnnouncedTitle != position) { String announcement = getPhotoAccessibilityAnnouncement(position); if (announcement != null) { Util.announceForAccessibility(mRootView, mAccessibilityManager, announcement); - isTitleAnnounced = true; + lastAnnouncedTitle = position; } } |