summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/GalleryActivity.java
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-12-09 19:25:48 -0800
committerLinux Build Service Account <lnxbuild@localhost>2018-12-09 19:25:48 -0800
commitad07a5dad0df3d6f8b334288149828ce002cfe60 (patch)
tree671e347fda9a9cdb366641ff0ecb146e62066b2b /src/com/android/gallery3d/app/GalleryActivity.java
parent45f68c4bd617ed1f25c116bd6b26c195fa6c9dfb (diff)
parent0e13f5a5b5098b78d6c446e201f0ef7be8db2d0e (diff)
downloadandroid_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-xsrc/com/android/gallery3d/app/GalleryActivity.java17
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");
+ }
+ }
}