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

Commit cd38c32d authored by Justin Koh's avatar Justin Koh Committed by Android (Google) Code Review
Browse files

Merge "Catch exception of nonfound activities" into jb-mr1-aah-dev

parents 5c8e5585 6b1d912b
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -16,12 +16,14 @@

package android.view;

import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.os.Handler;
import android.os.Handler.Callback;
import android.os.Message;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.util.Log;

/**
 * This class creates trackball events from touchpad events.
@@ -30,6 +32,8 @@ import android.os.SystemProperties;
 */
class SimulatedTrackball {

    private static final String TAG = "SimulatedTrackball";

    // Maximum difference in milliseconds between the down and up of a touch
    // event for it to be considered a tap
    // TODO:Read this value from a configuration file
@@ -159,7 +163,11 @@ class SimulatedTrackball {
                    mEdgeSwipePossible = false;
                    Intent intent = new Intent("android.search.action.GLOBAL_SEARCH");
                    intent.addCategory("android.intent.category.DEFAULT");
                    try {
                        viewroot.mView.getContext().startActivity(intent);
                    } catch (ActivityNotFoundException e) {
                        Log.e(TAG,"Search activity not found.");
                    }
                }
                // Find the difference in position between the two most recent
                // touchpad events