blob: f7f33e97be24c638dd0a34d19b55758934f2768c [file] [log] [blame]
Sander Alewijnseed0883b2014-03-18 15:01:13 +00001/*
2 * Copyright 2014, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.managedprovisioning;
18
19import android.app.Activity;
20import android.app.AlertDialog;
Sander Alewijnsed7043852014-06-17 15:50:48 +010021import android.app.Dialog;
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +010022import android.content.BroadcastReceiver;
Sander Alewijnseed0883b2014-03-18 15:01:13 +000023import android.content.Context;
24import android.content.DialogInterface;
25import android.content.Intent;
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +010026import android.content.IntentFilter;
Sander Alewijnseed0883b2014-03-18 15:01:13 +000027import android.os.Bundle;
Sander Alewijnse8de999b2014-08-27 17:42:48 +010028import android.os.UserHandle;
Sander Alewijnse8f9bd132014-09-08 12:21:26 +010029import android.os.SystemProperties;
Sander Alewijnseed0883b2014-03-18 15:01:13 +000030import android.provider.Settings.Global;
Sander Alewijnsed7043852014-06-17 15:50:48 +010031import android.provider.Settings.Secure;
Jessica Hummel81fe1042014-06-23 17:10:38 +010032import android.support.v4.content.LocalBroadcastManager;
Sander Alewijnse326bcfd2014-06-25 15:24:03 +010033import android.text.TextUtils;
Sander Alewijnseed0883b2014-03-18 15:01:13 +000034import android.view.LayoutInflater;
35import android.view.View;
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +010036import android.widget.TextView;
Sander Alewijnsec7757382014-03-18 17:09:45 +000037
Sander Alewijnse326bcfd2014-06-25 15:24:03 +010038import com.android.managedprovisioning.task.AddWifiNetworkTask;
39
Sander Alewijnse56f71572014-06-23 16:21:33 +010040import java.util.Locale;
41
Sander Alewijnseed0883b2014-03-18 15:01:13 +000042/**
43 * This activity starts device owner provisioning:
44 * It downloads a mobile device management application(mdm) from a given url and installs it,
45 * or a given mdm is already present on the device. The mdm is set as the owner of the device so
46 * that it has full control over the device:
47 * TODO: put link here with documentation on how a device owner has control over the device
48 * The mdm can then execute further setup steps.
49 *
50 * <p>
51 * An example use case might be when a company wants to set up a device for a single use case
52 * (such as giving instructions).
53 * </p>
54 *
55 * <p>
56 * Provisioning is triggered by a programmer device that sends required provisioning parameters via
57 * nfc. For an example of a programmer app see:
58 * com.example.android.apis.app.DeviceProvisioningProgrammerSample.
59 * </p>
60 *
Sander Alewijnse4c4badf2014-03-20 14:12:49 +000061 * <p>
62 * In the unlikely case that this activity is killed the whole provisioning process so far is
63 * repeated. We made sure that all tasks can be done twice without causing any problems.
64 * </p>
Sander Alewijnseed0883b2014-03-18 15:01:13 +000065 */
66public class DeviceOwnerProvisioningActivity extends Activity {
Sander Alewijnse8f9bd132014-09-08 12:21:26 +010067 private static final String KEY_USER_CONSENTED = "user_consented";
68
Sander Alewijnse28bffd62014-06-05 10:54:26 +010069 private static final int ENCRYPT_DEVICE_REQUEST_CODE = 1;
Sander Alewijnse326bcfd2014-06-25 15:24:03 +010070 private static final int WIFI_REQUEST_CODE = 2;
Sander Alewijnse28bffd62014-06-05 10:54:26 +010071
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +010072 private BroadcastReceiver mServiceMessageReceiver;
73 private TextView mProgressTextView;
Sander Alewijnsed7043852014-06-17 15:50:48 +010074 private Dialog mDialog; // The cancel or error dialog that is currently shown.
75 private boolean mDone; // Indicates whether the service has sent ACTION_PROVISIONING_SUCCESS.
Sander Alewijnsef88f7092014-08-20 16:26:09 +010076
Sander Alewijnse8f9bd132014-09-08 12:21:26 +010077 // Run when wifi picker activity reports success.
Sander Alewijnsef88f7092014-08-20 16:26:09 +010078 private Runnable mOnWifiConnectedRunnable;
79
Sander Alewijnse8f9bd132014-09-08 12:21:26 +010080 // Indicates whether user consented by clicking on positive button of interstitial.
81 private boolean mUserConsented = false;
82
Sander Alewijnseed0883b2014-03-18 15:01:13 +000083 @Override
84 public void onCreate(Bundle savedInstanceState) {
85 super.onCreate(savedInstanceState);
86
Sander Alewijnse8f9bd132014-09-08 12:21:26 +010087 if (savedInstanceState != null) {
88 mUserConsented = savedInstanceState.getBoolean(KEY_USER_CONSENTED, false);
89 }
90
Sander Alewijnseed0883b2014-03-18 15:01:13 +000091 ProvisionLogger.logd("Device owner provisioning activity ONCREATE");
92
93 // Check whether we can provision.
Sander Alewijnsed7043852014-06-17 15:50:48 +010094 if (Global.getInt(getContentResolver(), Global.DEVICE_PROVISIONED, 0 /* default */) != 0) {
Sander Alewijnseed0883b2014-03-18 15:01:13 +000095 ProvisionLogger.loge("Device already provisioned.");
Sander Alewijnsed7043852014-06-17 15:50:48 +010096 error(R.string.device_owner_error_already_provisioned, false /* no factory reset */);
Sander Alewijnseed0883b2014-03-18 15:01:13 +000097 return;
98 }
Sander Alewijnseed0883b2014-03-18 15:01:13 +000099
Sander Alewijnse8de999b2014-08-27 17:42:48 +0100100 if (UserHandle.myUserId() != UserHandle.USER_OWNER) {
101 ProvisionLogger.loge("Device owner can only be set up for USER_OWNER.");
102 error(R.string.device_owner_error_general, false /* no factory reset */);
103 return;
104 }
105
Sander Alewijnsed7043852014-06-17 15:50:48 +0100106 // Setup the UI.
Sander Alewijnseed0883b2014-03-18 15:01:13 +0000107 final LayoutInflater inflater = getLayoutInflater();
Sander Alewijnse8ce0c512014-06-03 17:49:02 +0100108 final View contentView = inflater.inflate(R.layout.progress, null);
Sander Alewijnseed0883b2014-03-18 15:01:13 +0000109 setContentView(contentView);
Sander Alewijnse8ce0c512014-06-03 17:49:02 +0100110 mProgressTextView = (TextView) findViewById(R.id.prog_text);
Sander Alewijnseb6578e72014-07-25 17:12:05 +0100111 TextView titleText = (TextView) findViewById(R.id.title);
112 if (titleText != null) titleText.setText(getString(R.string.setup_device));
Sander Alewijnseed0883b2014-03-18 15:01:13 +0000113
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +0100114 // Setup broadcast receiver for feedback from service.
115 mServiceMessageReceiver = new ServiceMessageReceiver();
116 IntentFilter filter = new IntentFilter();
117 filter.addAction(DeviceOwnerProvisioningService.ACTION_PROVISIONING_SUCCESS);
118 filter.addAction(DeviceOwnerProvisioningService.ACTION_PROVISIONING_ERROR);
119 filter.addAction(DeviceOwnerProvisioningService.ACTION_PROGRESS_UPDATE);
Jessica Hummel81fe1042014-06-23 17:10:38 +0100120 LocalBroadcastManager.getInstance(this).registerReceiver(mServiceMessageReceiver, filter);
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +0100121
Sander Alewijnsed7043852014-06-17 15:50:48 +0100122 // Parse the incoming intent.
Sander Alewijnsef88f7092014-08-20 16:26:09 +0100123 final ProvisioningParams params;
Sander Alewijnsed7043852014-06-17 15:50:48 +0100124 MessageParser parser = new MessageParser();
Sander Alewijnsed7043852014-06-17 15:50:48 +0100125 try {
Sander Alewijnsef88f7092014-08-20 16:26:09 +0100126 params = parser.parseIntent(getIntent());
Sander Alewijnse8f9bd132014-09-08 12:21:26 +0100127 mOnWifiConnectedRunnable = new Runnable() {
128 public void run() {
129 showInterstitialAndProvision(params);
130 }
131 };
Sander Alewijnsed7043852014-06-17 15:50:48 +0100132 } catch (MessageParser.ParseException e) {
133 ProvisionLogger.loge("Could not read data from intent", e);
134 error(e.getErrorMessageId(), false /* no factory reset */);
135 return;
136 }
Sander Alewijnsed7043852014-06-17 15:50:48 +0100137
138 // Ask to encrypt the device before proceeding
Sander Alewijnse8f9bd132014-09-08 12:21:26 +0100139 if (!(EncryptDeviceActivity.isDeviceEncrypted()
140 || SystemProperties.getBoolean("persist.sys.no_req_encrypt", false))) {
Sander Alewijnsef88f7092014-08-20 16:26:09 +0100141 requestEncryption(parser, params);
Sander Alewijnsed7043852014-06-17 15:50:48 +0100142 finish();
143 return;
Sander Alewijnse326bcfd2014-06-25 15:24:03 +0100144 // System will reboot. Bootreminder will restart this activity.
Sander Alewijnsed7043852014-06-17 15:50:48 +0100145 }
146
Sander Alewijnse326bcfd2014-06-25 15:24:03 +0100147 // Have the user pick a wifi network if necessary.
Sander Alewijnseab2e3ea2014-09-23 18:00:26 +0100148 if (!AddWifiNetworkTask.isConnectedToWifi(this) && TextUtils.isEmpty(params.mWifiSsid)) {
Sander Alewijnse326bcfd2014-06-25 15:24:03 +0100149 requestWifiPick();
150 return;
151 // Wait for onActivityResult.
152 }
153
Sander Alewijnse8f9bd132014-09-08 12:21:26 +0100154 showInterstitialAndProvision(params);
155 }
156
157 private void showInterstitialAndProvision(final ProvisioningParams params) {
158 if (mUserConsented || params.mStartedByNfc) {
159 startDeviceOwnerProvisioningService(params);
160 } else {
Sander Alewijnse8f9bd132014-09-08 12:21:26 +0100161 // Notify the user that the admin will have full control over the device,
162 // then start provisioning.
Sander Alewijnse7a856942014-09-08 20:46:40 +0100163 new UserConsentDialog(this, UserConsentDialog.DEVICE_OWNER, new Runnable() {
164 @Override
165 public void run() {
166 mUserConsented = true;
167 startDeviceOwnerProvisioningService(params);
168 }
169 } /* onUserConsented */ , new Runnable() {
170 @Override
171 public void run() {
172 finish();
173 }
174 } /* onCancel */).show(getFragmentManager(),
175 "UserConsentDialogFragment");
Sander Alewijnse8f9bd132014-09-08 12:21:26 +0100176 }
Sander Alewijnse326bcfd2014-06-25 15:24:03 +0100177 }
178
Sander Alewijnsef88f7092014-08-20 16:26:09 +0100179 private void startDeviceOwnerProvisioningService(ProvisioningParams params) {
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +0100180 Intent intent = new Intent(this, DeviceOwnerProvisioningService.class);
Sander Alewijnsef88f7092014-08-20 16:26:09 +0100181 intent.putExtra(DeviceOwnerProvisioningService.EXTRA_PROVISIONING_PARAMS, params);
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +0100182 intent.putExtras(getIntent());
183 startService(intent);
Sander Alewijnseed0883b2014-03-18 15:01:13 +0000184 }
185
Jessica Hummel14eeef92014-06-16 11:06:20 +0100186 class ServiceMessageReceiver extends BroadcastReceiver
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +0100187 {
188 @Override
189 public void onReceive(Context context, Intent intent)
190 {
191 String action = intent.getAction();
192 if (action.equals(DeviceOwnerProvisioningService.ACTION_PROVISIONING_SUCCESS)) {
193 ProvisionLogger.logd("Successfully provisioned");
Sander Alewijnsef88f7092014-08-20 16:26:09 +0100194
Sander Alewijnsed7043852014-06-17 15:50:48 +0100195 synchronized(this) {
196 if (mDialog == null) {
197 onProvisioningSuccess();
198 } else {
199 // Postpone finishing this activity till the user has decided whether
200 // he/she wants to reset or not.
201 mDone = true;
202 }
203 }
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +0100204 return;
205 } else if (action.equals(DeviceOwnerProvisioningService.ACTION_PROVISIONING_ERROR)) {
Sander Alewijnsed7043852014-06-17 15:50:48 +0100206 int errorMessageId = intent.getIntExtra(
207 DeviceOwnerProvisioningService.EXTRA_USER_VISIBLE_ERROR_ID_KEY,
208 R.string.device_owner_error_general);
209
Sander Alewijnse28bffd62014-06-05 10:54:26 +0100210 ProvisionLogger.logd("Error reported with code "
Sander Alewijnsed7043852014-06-17 15:50:48 +0100211 + getResources().getString(errorMessageId));
212 error(errorMessageId, true /* always factory reset */);
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +0100213 } else if (action.equals(DeviceOwnerProvisioningService.ACTION_PROGRESS_UPDATE)) {
214 int progressMessage = intent.getIntExtra(
215 DeviceOwnerProvisioningService.EXTRA_PROGRESS_MESSAGE_ID_KEY, -1);
Sander Alewijnse28bffd62014-06-05 10:54:26 +0100216 ProvisionLogger.logd("Progress update reported with code "
217 + getResources().getString(progressMessage));
218 if (progressMessage >= 0) {
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +0100219 progressUpdate(progressMessage);
Sander Alewijnseaf8413e2014-03-19 11:37:44 +0000220 }
Sander Alewijnsec7757382014-03-18 17:09:45 +0000221 }
Sander Alewijnse63254f42014-03-21 15:31:12 +0000222 }
223 }
224
Sander Alewijnsed7043852014-06-17 15:50:48 +0100225 private void onProvisioningSuccess() {
Sander Alewijnseab18ea72014-09-11 15:15:23 +0100226 // The Setup wizards listens to this flag and finishes itself when it is set.
227 // It then fires a home intent, which we catch in the HomeReceiverActivity before sending
228 // the intent to notify the mdm that provisioning is complete.
Sander Alewijnsed7043852014-06-17 15:50:48 +0100229 Global.putInt(getContentResolver(), Global.DEVICE_PROVISIONED, 1);
230 Secure.putInt(getContentResolver(), Secure.USER_SETUP_COMPLETE, 1);
231
Sander Alewijnseab18ea72014-09-11 15:15:23 +0100232 // Note: the DeviceOwnerProvisioningService will stop itself.
Sander Alewijnse1c8d9312014-08-18 20:00:49 +0100233 setResult(Activity.RESULT_OK);
Sander Alewijnsed7043852014-06-17 15:50:48 +0100234 finish();
235 }
236
Sander Alewijnsef88f7092014-08-20 16:26:09 +0100237 private void requestEncryption(MessageParser messageParser, ProvisioningParams params) {
Sander Alewijnse56f71572014-06-23 16:21:33 +0100238 Intent encryptIntent = new Intent(DeviceOwnerProvisioningActivity.this,
239 EncryptDeviceActivity.class);
240
241 Bundle resumeExtras = new Bundle();
242 resumeExtras.putString(EncryptDeviceActivity.EXTRA_RESUME_TARGET,
243 EncryptDeviceActivity.TARGET_DEVICE_OWNER);
Sander Alewijnsef88f7092014-08-20 16:26:09 +0100244 messageParser.addProvisioningParamsToBundle(resumeExtras, params);
Sander Alewijnse56f71572014-06-23 16:21:33 +0100245
246 encryptIntent.putExtra(EncryptDeviceActivity.EXTRA_RESUME, resumeExtras);
247
248 startActivityForResult(encryptIntent, ENCRYPT_DEVICE_REQUEST_CODE);
249 }
250
Sander Alewijnse326bcfd2014-06-25 15:24:03 +0100251 private void requestWifiPick() {
252 startActivityForResult(AddWifiNetworkTask.getWifiPickIntent(), WIFI_REQUEST_CODE);
253 }
254
Sander Alewijnse63254f42014-03-21 15:31:12 +0000255 @Override
256 public void onBackPressed() {
Sander Alewijnsed7043852014-06-17 15:50:48 +0100257 showCancelResetDialog();
258 }
259
260 private void showCancelResetDialog() {
261 AlertDialog.Builder alertBuilder =
262 new AlertDialog.Builder(DeviceOwnerProvisioningActivity.this)
Jessica Hummelc3fc45e2014-09-01 19:01:12 +0100263 .setCancelable(false)
264 .setTitle(R.string.device_owner_cancel_title)
265 .setMessage(R.string.device_owner_cancel_message)
266 .setNegativeButton(R.string.device_owner_cancel_cancel,
267 new DialogInterface.OnClickListener() {
268 @Override
269 public void onClick(DialogInterface dialog,int id) {
270 dialog.dismiss();
271 synchronized(this) {
272 mDialog = null;
273 if (mDone) {
274 onProvisioningSuccess();
275 }
276 }
Sander Alewijnsed7043852014-06-17 15:50:48 +0100277 }
Sander Alewijnsed7043852014-06-17 15:50:48 +0100278 })
Jessica Hummelc3fc45e2014-09-01 19:01:12 +0100279 .setPositiveButton(R.string.device_owner_error_reset,
280 new DialogInterface.OnClickListener() {
281 @Override
282 public void onClick(DialogInterface dialog,int id) {
283 // Factory reset the device.
Jeff Sharkey56ebde02014-09-24 13:58:43 -0700284 Intent intent = new Intent(Intent.ACTION_MASTER_CLEAR);
285 intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
286 intent.putExtra(Intent.EXTRA_REASON,
287 "DeviceOwnerProvisioningActivity.showCancelResetDialog()");
288 sendBroadcast(intent);
Jessica Hummelc3fc45e2014-09-01 19:01:12 +0100289 stopService(new Intent(DeviceOwnerProvisioningActivity.this,
Sander Alewijnsed7043852014-06-17 15:50:48 +0100290 DeviceOwnerProvisioningService.class));
Jessica Hummelc3fc45e2014-09-01 19:01:12 +0100291 finish();
292 }
Sander Alewijnsed7043852014-06-17 15:50:48 +0100293 });
294
295 if (mDialog != null) {
296 mDialog.dismiss();
297 }
298 mDialog = alertBuilder.create();
299 mDialog.show();
Sander Alewijnse63254f42014-03-21 15:31:12 +0000300 }
301
Sander Alewijnse04ab6fe2014-04-29 10:53:54 +0100302 private void progressUpdate(int progressMessage) {
303 mProgressTextView.setText(progressMessage);
304 }
305
Sander Alewijnse28bffd62014-06-05 10:54:26 +0100306 @Override
307 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
308 if (requestCode == ENCRYPT_DEVICE_REQUEST_CODE) {
309 if (resultCode == RESULT_CANCELED) {
310 ProvisionLogger.loge("User canceled device encryption.");
311 finish();
312 }
Sander Alewijnse326bcfd2014-06-25 15:24:03 +0100313 } else if (requestCode == WIFI_REQUEST_CODE) {
314 if (resultCode == RESULT_CANCELED) {
315 ProvisionLogger.loge("User canceled wifi picking.");
316 stopService(new Intent(DeviceOwnerProvisioningActivity.this,
317 DeviceOwnerProvisioningService.class));
318 finish();
319 } else if (resultCode == RESULT_OK) {
320 ProvisionLogger.logd("Wifi request result is OK");
321 if (AddWifiNetworkTask.isConnectedToWifi(this)) {
Sander Alewijnsef88f7092014-08-20 16:26:09 +0100322 mOnWifiConnectedRunnable.run();
Sander Alewijnse326bcfd2014-06-25 15:24:03 +0100323 } else {
324 requestWifiPick();
325 }
326 }
Sander Alewijnse28bffd62014-06-05 10:54:26 +0100327 }
328 }
329
Sander Alewijnsed7043852014-06-17 15:50:48 +0100330 private void error(int dialogMessage, boolean resetRequired) {
331 AlertDialog.Builder alertBuilder = new AlertDialog.Builder(this)
Jessica Hummelc3fc45e2014-09-01 19:01:12 +0100332 .setTitle(R.string.provisioning_error_title)
333 .setMessage(dialogMessage)
334 .setCancelable(false);
Sander Alewijnsed7043852014-06-17 15:50:48 +0100335 if (resetRequired) {
336 alertBuilder.setPositiveButton(R.string.device_owner_error_reset,
337 new DialogInterface.OnClickListener() {
338 @Override
339 public void onClick(DialogInterface dialog,int id) {
340 // Factory reset the device.
Jeff Sharkey56ebde02014-09-24 13:58:43 -0700341 Intent intent = new Intent(Intent.ACTION_MASTER_CLEAR);
342 intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
343 intent.putExtra(Intent.EXTRA_REASON,
344 "DeviceOwnerProvisioningActivity.error()");
345 sendBroadcast(intent);
Sander Alewijnsed7043852014-06-17 15:50:48 +0100346 stopService(new Intent(DeviceOwnerProvisioningActivity.this,
347 DeviceOwnerProvisioningService.class));
348 finish();
349 }
350 });
351 } else {
352 alertBuilder.setPositiveButton(R.string.device_owner_error_ok,
353 new DialogInterface.OnClickListener() {
354 @Override
355 public void onClick(DialogInterface dialog,int id) {
356 // Close activity.
357 stopService(new Intent(DeviceOwnerProvisioningActivity.this,
358 DeviceOwnerProvisioningService.class));
359 finish();
360 }
361 });
362 }
363 mDialog = alertBuilder.create();
364 mDialog.show();
Sander Alewijnseed0883b2014-03-18 15:01:13 +0000365 }
Sander Alewijnse28bffd62014-06-05 10:54:26 +0100366
Jessica Hummel14eeef92014-06-16 11:06:20 +0100367 @Override
Sander Alewijnse8f9bd132014-09-08 12:21:26 +0100368 protected void onSaveInstanceState(Bundle outState) {
369 outState.putBoolean(KEY_USER_CONSENTED, mUserConsented);
370 }
371
372 @Override
Sander Alewijnse56f71572014-06-23 16:21:33 +0100373 public void onDestroy() {
374 ProvisionLogger.logd("Device owner provisioning activity ONDESTROY");
375 if (mServiceMessageReceiver != null) {
376 LocalBroadcastManager.getInstance(this).unregisterReceiver(mServiceMessageReceiver);
377 mServiceMessageReceiver = null;
378 }
379 if (mDialog != null) {
380 mDialog.dismiss();
381 mDialog = null;
382 }
383 super.onDestroy();
384 }
385
386 @Override
Sander Alewijnse28bffd62014-06-05 10:54:26 +0100387 protected void onRestart() {
388 ProvisionLogger.logd("Device owner provisioning activity ONRESTART");
389 super.onRestart();
390 }
391
Jessica Hummel14eeef92014-06-16 11:06:20 +0100392 @Override
Sander Alewijnse28bffd62014-06-05 10:54:26 +0100393 protected void onResume() {
394 ProvisionLogger.logd("Device owner provisioning activity ONRESUME");
395 super.onResume();
396 }
397
Jessica Hummel14eeef92014-06-16 11:06:20 +0100398 @Override
Sander Alewijnse28bffd62014-06-05 10:54:26 +0100399 protected void onPause() {
400 ProvisionLogger.logd("Device owner provisioning activity ONPAUSE");
401 super.onPause();
402 }
403
Jessica Hummel14eeef92014-06-16 11:06:20 +0100404 @Override
Sander Alewijnse28bffd62014-06-05 10:54:26 +0100405 protected void onStop() {
406 ProvisionLogger.logd("Device owner provisioning activity ONSTOP");
407 super.onStop();
408 }
Sander Alewijnseed0883b2014-03-18 15:01:13 +0000409}
410