OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.blimp; | 5 package org.chromium.blimp.app; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.content.Intent; | 9 import android.content.Intent; |
10 import android.os.Bundle; | 10 import android.os.Bundle; |
11 import android.os.Process; | 11 import android.os.Process; |
12 | 12 |
13 /** | 13 /** |
14 * Kills and (optionally) restarts the main Blimp process, then immediately kill
s itself. | 14 * Kills and (optionally) restarts the main Blimp process, then immediately kill
s itself. |
15 * | 15 * |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 */ | 65 */ |
66 public static Intent createRestartIntent(Context context) { | 66 public static Intent createRestartIntent(Context context) { |
67 Intent intent = new Intent(); | 67 Intent intent = new Intent(); |
68 intent.setClassName(context.getPackageName(), BrowserRestartActivity.cla
ss.getName()); | 68 intent.setClassName(context.getPackageName(), BrowserRestartActivity.cla
ss.getName()); |
69 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | 69 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
70 intent.putExtra(BrowserRestartActivity.EXTRA_MAIN_PID, Process.myPid()); | 70 intent.putExtra(BrowserRestartActivity.EXTRA_MAIN_PID, Process.myPid()); |
71 intent.putExtra(BrowserRestartActivity.EXTRA_RESTART, true); | 71 intent.putExtra(BrowserRestartActivity.EXTRA_RESTART, true); |
72 return intent; | 72 return intent; |
73 } | 73 } |
74 } | 74 } |
OLD | NEW |