diff options
author | maxwen <max.weninger@gmail.com> | 2016-06-04 22:51:06 +0200 |
---|---|---|
committer | Arne Coucheron <arco68@gmail.com> | 2017-07-31 00:38:13 +0200 |
commit | ae2d5c13ce7847275b35a82074b07cf67ab59cee (patch) | |
tree | 3de747d07a398c0551f810bd586c849eaa8ff75b /src/com/android/gallery3d/app/PhotoPage.java | |
parent | 1b893a41e2b1faa60b6cbb619c36b09fe0c0ef92 (diff) | |
download | android_packages_apps_Gallery2-ae2d5c13ce7847275b35a82074b07cf67ab59cee.tar.gz android_packages_apps_Gallery2-ae2d5c13ce7847275b35a82074b07cf67ab59cee.tar.bz2 android_packages_apps_Gallery2-ae2d5c13ce7847275b35a82074b07cf67ab59cee.zip |
Gallery2: Change all share intents to chooser style
Change-Id: Ie4387846ad65dcb7a655630dd86047d5ad63bcb9
Diffstat (limited to 'src/com/android/gallery3d/app/PhotoPage.java')
-rwxr-xr-x | src/com/android/gallery3d/app/PhotoPage.java | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 910500157..0fe96f99e 100755 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -43,7 +43,6 @@ import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.RelativeLayout; -import android.widget.ShareActionProvider; import android.widget.Toast; import android.widget.Toolbar; @@ -88,8 +87,8 @@ import java.util.Locale; //import android.drm.DrmHelper; public abstract class PhotoPage extends ActivityState implements - PhotoView.Listener, AppBridge.Server, ShareActionProvider.OnShareTargetSelectedListener, - PhotoPageBottomControls.Delegate, ThreeDButton.Delegate{ + PhotoView.Listener, AppBridge.Server, PhotoPageBottomControls.Delegate, + ThreeDButton.Delegate { private static final String TAG = "PhotoPage"; private static final int MSG_HIDE_BARS = 1; @@ -208,7 +207,6 @@ public abstract class PhotoPage extends ActivityState implements private int mLastSystemUiVis = 0; - private ShareActionProvider mShareActionProvider; private Intent mShareIntent; //use for saving the original height and padding of toolbar @@ -398,7 +396,7 @@ public abstract class PhotoPage extends ActivityState implements } Intent shareIntent = createShareIntent(mCurrentPhoto); if (shareIntent != null) { - mActionBar.setShareIntents(panoramaIntent, shareIntent, PhotoPage.this); + mActionBar.setShareIntents(panoramaIntent, shareIntent); } setNfcBeamPushUri(contentUri); } @@ -1802,19 +1800,6 @@ public abstract class PhotoPage extends ActivityState implements refreshBottomControlsWhenReady(); } - @Override - public boolean onShareTargetSelected(ShareActionProvider source, Intent intent) { - final long timestampMillis = mCurrentPhoto.getDateInMs(); - final String mediaType = getMediaTypeString(mCurrentPhoto); - UsageStatistics.onEvent(UsageStatistics.COMPONENT_GALLERY, - UsageStatistics.ACTION_SHARE, - mediaType, - timestampMillis > 0 - ? System.currentTimeMillis() - timestampMillis - : -1); - return false; - } - private static String getMediaTypeString(MediaItem item) { if (item.getMediaType() == MediaObject.MEDIA_TYPE_VIDEO) { return "Video"; |