Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06c02767 authored by Mangesh Ghiware's avatar Mangesh Ghiware
Browse files

Rename Gallery activity and add trampoline

Bug: 10807861

Change-Id: Iaaf17b579db2fe09900e9817f766f43dd66dea61
parent 641be74b
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@
             </intent-filter>
        </activity>

        <activity android:name="com.android.gallery3d.app.Gallery" android:label="@string/app_name"
        <activity android:name="com.android.gallery3d.app.GalleryActivity" android:label="@string/app_name"
                android:configChanges="keyboardHidden|orientation|screenSize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
@@ -161,10 +161,21 @@
            </intent-filter>
        </activity>

        <!-- This activity acts as a trampoline to the new Gallery activity,
             so that existing shortcuts are preserved. -->
        <activity android:name="com.android.gallery3d.app.Gallery"
            android:excludeFromRecents="true"
            android:theme="@style/android:Theme.NoDisplay">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <!-- we add this activity-alias for shortcut backward compatibility -->
        <!-- Note: The alias must put after the target activity -->
        <activity-alias android:name="com.cooliris.media.Gallery"
                android:targetActivity="com.android.gallery3d.app.Gallery"
                android:targetActivity="com.android.gallery3d.app.GalleryActivity"
                android:configChanges="keyboardHidden|orientation|screenSize"
                android:label="@string/app_name">
            <intent-filter>
+3 −3
Original line number Diff line number Diff line
@@ -15,18 +15,18 @@
 */
package com.android.camera;

import com.android.gallery3d.util.CameraHelper;
import com.android.gallery3d.util.IntentHelper;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

/** Trampoline activity that launches the new Camera activity defined in CameraHelper. */
/** Trampoline activity that launches the new Camera activity defined in IntentHelper. */
public class CameraActivity extends Activity {
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        Intent intent = CameraHelper.CAMERA_LAUNCHER_INTENT;
        Intent intent = IntentHelper.CAMERA_LAUNCHER_INTENT;
        // Since this is being launched from a homescreen shorcut,
        // it's already in a new task. Start Camera activity and
        // reset the task to its initial state if needed.
+3 −3
Original line number Diff line number Diff line
@@ -316,7 +316,7 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster
    private void onGetContent(final MediaItem item) {
        DataManager dm = mActivity.getDataManager();
        Activity activity = mActivity;
        if (mData.getString(Gallery.EXTRA_CROP) != null) {
        if (mData.getString(GalleryActivity.EXTRA_CROP) != null) {
            Uri uri = dm.getContentUri(item.getPath());
            Intent intent = new Intent(CropActivity.CROP_ACTION, uri)
                    .addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT)
@@ -367,7 +367,7 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster
        mUserDistance = GalleryUtils.meterToPixel(USER_DISTANCE_METER);
        initializeViews();
        initializeData(data);
        mGetContent = data.getBoolean(Gallery.KEY_GET_CONTENT, false);
        mGetContent = data.getBoolean(GalleryActivity.KEY_GET_CONTENT, false);
        mShowClusterMenu = data.getBoolean(KEY_SHOW_CLUSTER_MENU, false);
        mDetailsSource = new MyDetailsSource();
        Context context = mActivity.getAndroidContext();
@@ -544,7 +544,7 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster
        MenuInflater inflator = getSupportMenuInflater();
        if (mGetContent) {
            inflator.inflate(R.menu.pickup, menu);
            int typeBits = mData.getInt(Gallery.KEY_TYPE_BITS,
            int typeBits = mData.getInt(GalleryActivity.KEY_TYPE_BITS,
                    DataManager.INCLUDE_IMAGE);
            actionBar.setTitle(GalleryUtils.getSelectionModePrompt(typeBits));
        } else {
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ public class AlbumPicker extends PickerActivity {
        Bundle extras = intent.getExtras();
        Bundle data = extras == null ? new Bundle() : new Bundle(extras);

        data.putBoolean(Gallery.KEY_GET_ALBUM, true);
        data.putBoolean(GalleryActivity.KEY_GET_ALBUM, true);
        data.putString(AlbumSetPage.KEY_MEDIA_PATH,
                getDataManager().getTopSetPath(DataManager.INCLUDE_IMAGE));
        getStateManager().startState(AlbumSetPage.class, data);
+3 −3
Original line number Diff line number Diff line
@@ -322,8 +322,8 @@ public class AlbumSetPage extends ActivityState implements
        initializeViews();
        initializeData(data);
        Context context = mActivity.getAndroidContext();
        mGetContent = data.getBoolean(Gallery.KEY_GET_CONTENT, false);
        mGetAlbum = data.getBoolean(Gallery.KEY_GET_ALBUM, false);
        mGetContent = data.getBoolean(GalleryActivity.KEY_GET_CONTENT, false);
        mGetAlbum = data.getBoolean(GalleryActivity.KEY_GET_ALBUM, false);
        mTitle = data.getString(AlbumSetPage.KEY_SET_TITLE);
        mSubtitle = data.getString(AlbumSetPage.KEY_SET_SUBTITLE);
        mEyePosition = new EyePosition(context, this);
@@ -534,7 +534,7 @@ public class AlbumSetPage extends ActivityState implements
        if (mGetContent) {
            inflater.inflate(R.menu.pickup, menu);
            int typeBits = mData.getInt(
                    Gallery.KEY_TYPE_BITS, DataManager.INCLUDE_IMAGE);
                    GalleryActivity.KEY_TYPE_BITS, DataManager.INCLUDE_IMAGE);
            mActionBar.setTitle(GalleryUtils.getSelectionModePrompt(typeBits));
        } else  if (mGetAlbum) {
            inflater.inflate(R.menu.pickup, menu);
Loading