summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/foundation/ALooper.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2013-07-31 13:04:50 -0700
committerAndreas Huber <andih@google.com>2013-07-31 13:04:50 -0700
commit30873bfd08255e2c4e98ff5732ffff2838772617 (patch)
treee452e0a82e8716e8a7a0fd01f896cc2adfec4f63 /media/libstagefright/foundation/ALooper.cpp
parent9610adc395d18e474e6e35c0bc8b9c3220e6e525 (diff)
downloadframeworks_av-30873bfd08255e2c4e98ff5732ffff2838772617.zip
frameworks_av-30873bfd08255e2c4e98ff5732ffff2838772617.tar.gz
frameworks_av-30873bfd08255e2c4e98ff5732ffff2838772617.tar.bz2
Unregister any handlers still registered on now "dead" ALoopers
upon the death of an ALooper. Change-Id: I64c0835b8db04486204f3d0fa7173ee53708a116 related-to-bug: 10106648
Diffstat (limited to 'media/libstagefright/foundation/ALooper.cpp')
-rw-r--r--media/libstagefright/foundation/ALooper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libstagefright/foundation/ALooper.cpp b/media/libstagefright/foundation/ALooper.cpp
index 22777a2..ebf9d8d 100644
--- a/media/libstagefright/foundation/ALooper.cpp
+++ b/media/libstagefright/foundation/ALooper.cpp
@@ -72,6 +72,10 @@ ALooper::ALooper()
ALooper::~ALooper() {
stop();
+
+ // Since this looper is "dead" (or as good as dead by now),
+ // have ALooperRoster unregister any handlers still registered for it.
+ gLooperRoster.unregisterStaleHandlers();
}
void ALooper::setName(const char *name) {