Launched camera in the correct user.

Fixed b/23325974.
The camera was always launched in the device owner's profile. Now it can
work with secondary users.

Change-Id: I826b341a7e73a9dd603dd5df7aa31bfaf4d440c4
This commit is contained in:
Zhentao Sun
2015-08-14 15:57:18 -07:00
parent 3605247746
commit 4354a05f85

View File

@@ -35,6 +35,7 @@ import android.os.Handler;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.Vibrator;
import android.provider.MediaStore;
import android.provider.Settings;
@@ -247,7 +248,7 @@ class GestureLauncherService extends SystemService {
intent.setComponent(new ComponentName(componentInfo.activityInfo.packageName,
componentInfo.activityInfo.name));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent);
mContext.startActivityAsUser(intent, UserHandle.CURRENT);
mWakeLock.release();
}