diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2018-12-09 19:25:48 -0800 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2018-12-09 19:25:48 -0800 |
commit | ad07a5dad0df3d6f8b334288149828ce002cfe60 (patch) | |
tree | 671e347fda9a9cdb366641ff0ecb146e62066b2b /src/com/android/gallery3d/app/GalleryActivity.java | |
parent | 45f68c4bd617ed1f25c116bd6b26c195fa6c9dfb (diff) | |
parent | 0e13f5a5b5098b78d6c446e201f0ef7be8db2d0e (diff) | |
download | android_packages_apps_Gallery2-ad07a5dad0df3d6f8b334288149828ce002cfe60.tar.gz android_packages_apps_Gallery2-ad07a5dad0df3d6f8b334288149828ce002cfe60.tar.bz2 android_packages_apps_Gallery2-ad07a5dad0df3d6f8b334288149828ce002cfe60.zip |
Merge 0e13f5a5b5098b78d6c446e201f0ef7be8db2d0e on remote branch
Change-Id: I02c670e385625c9eef7dd6b6dd7032d23a7a47c1
Diffstat (limited to 'src/com/android/gallery3d/app/GalleryActivity.java')
-rwxr-xr-x | src/com/android/gallery3d/app/GalleryActivity.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/GalleryActivity.java b/src/com/android/gallery3d/app/GalleryActivity.java index 16920b942..c4b9564d1 100755 --- a/src/com/android/gallery3d/app/GalleryActivity.java +++ b/src/com/android/gallery3d/app/GalleryActivity.java @@ -25,6 +25,7 @@ import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.Intent; +import android.content.IntentFilter; import android.content.UriMatcher; import android.content.pm.PackageManager; import android.graphics.Color; @@ -618,4 +619,20 @@ public final class GalleryActivity extends AbstractGalleryActivity implements On } return super.onGenericMotionEvent(event); } + + public void registerHomeButtonReceiver(TimeLinePage.HomeIconActionReceiver receiver) { + IntentFilter filter = new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); + registerReceiver(receiver, filter); + } + + public void unregisterHomeButtonReceiver(TimeLinePage.HomeIconActionReceiver receiver) { + if (receiver == null) { + return; + } + try { + unregisterReceiver(receiver); + } catch (Exception e) { + Log.w(TAG, "unregister HomeIconActionReceiver failed"); + } + } } |