Merge "VerificationActivity clones calling Intent"
This commit is contained in:
@@ -16,9 +16,6 @@
|
|||||||
|
|
||||||
package com.android.dynsystem;
|
package com.android.dynsystem;
|
||||||
|
|
||||||
import static android.os.image.DynamicSystemClient.KEY_SYSTEM_SIZE;
|
|
||||||
import static android.os.image.DynamicSystemClient.KEY_USERDATA_SIZE;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.KeyguardManager;
|
import android.app.KeyguardManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -88,12 +85,8 @@ public class VerificationActivity extends Activity {
|
|||||||
private void startInstallationService() {
|
private void startInstallationService() {
|
||||||
// retrieve data from calling intent
|
// retrieve data from calling intent
|
||||||
Intent callingIntent = getIntent();
|
Intent callingIntent = getIntent();
|
||||||
|
|
||||||
Uri url = callingIntent.getData();
|
Uri url = callingIntent.getData();
|
||||||
long systemSize = callingIntent.getLongExtra(KEY_SYSTEM_SIZE, 0);
|
Bundle extras = callingIntent.getExtras();
|
||||||
long userdataSize = callingIntent.getLongExtra(KEY_USERDATA_SIZE, 0);
|
|
||||||
boolean enableWhenCompleted = callingIntent.getBooleanExtra(
|
|
||||||
DynamicSystemInstallationService.KEY_ENABLE_WHEN_COMPLETED, false);
|
|
||||||
|
|
||||||
sVerifiedUrl = url.toString();
|
sVerifiedUrl = url.toString();
|
||||||
|
|
||||||
@@ -101,10 +94,7 @@ public class VerificationActivity extends Activity {
|
|||||||
Intent intent = new Intent(this, DynamicSystemInstallationService.class);
|
Intent intent = new Intent(this, DynamicSystemInstallationService.class);
|
||||||
intent.setData(url);
|
intent.setData(url);
|
||||||
intent.setAction(DynamicSystemClient.ACTION_START_INSTALL);
|
intent.setAction(DynamicSystemClient.ACTION_START_INSTALL);
|
||||||
intent.putExtra(KEY_SYSTEM_SIZE, systemSize);
|
intent.putExtras(extras);
|
||||||
intent.putExtra(KEY_USERDATA_SIZE, userdataSize);
|
|
||||||
intent.putExtra(
|
|
||||||
DynamicSystemInstallationService.KEY_ENABLE_WHEN_COMPLETED, enableWhenCompleted);
|
|
||||||
|
|
||||||
Log.d(TAG, "Starting Installation Service");
|
Log.d(TAG, "Starting Installation Service");
|
||||||
startServiceAsUser(intent, UserHandle.SYSTEM);
|
startServiceAsUser(intent, UserHandle.SYSTEM);
|
||||||
|
|||||||
Reference in New Issue
Block a user