Loading core/java/android/os/image/DynamicSystemClient.java +7 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,13 @@ public class DynamicSystemClient { public static final String ACTION_HIDE_NOTIFICATION = "android.os.image.action.HIDE_NOTIFICATION"; /** * Intent action: notify the service to post a status update when keyguard is dismissed. * @hide */ public static final String ACTION_NOTIFY_KEYGUARD_DISMISSED = "android.os.image.action.NOTIFY_KEYGUARD_DISMISSED"; /* * Intent Keys */ Loading packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java +7 −2 Original line number Diff line number Diff line Loading @@ -16,11 +16,10 @@ package com.android.dynsystem; import static android.os.AsyncTask.Status.FINISHED; import static android.os.AsyncTask.Status.PENDING; import static android.os.AsyncTask.Status.RUNNING; import static android.os.image.DynamicSystemClient.ACTION_HIDE_NOTIFICATION; import static android.os.image.DynamicSystemClient.ACTION_NOTIFY_IF_IN_USE; import static android.os.image.DynamicSystemClient.ACTION_NOTIFY_KEYGUARD_DISMISSED; import static android.os.image.DynamicSystemClient.ACTION_START_INSTALL; import static android.os.image.DynamicSystemClient.CAUSE_ERROR_EXCEPTION; import static android.os.image.DynamicSystemClient.CAUSE_ERROR_INVALID_URL; Loading Loading @@ -234,6 +233,8 @@ public class DynamicSystemInstallationService extends Service executeNotifyIfInUseCommand(); } else if (ACTION_HIDE_NOTIFICATION.equals(action)) { executeHideNotificationCommand(); } else if (ACTION_NOTIFY_KEYGUARD_DISMISSED.equals(action)) { executeNotifyKeyguardDismissed(); } return Service.START_NOT_STICKY; Loading Loading @@ -477,6 +478,10 @@ public class DynamicSystemInstallationService extends Service } } private void executeNotifyKeyguardDismissed() { postStatus(STATUS_NOT_STARTED, CAUSE_INSTALL_CANCELLED, null); } private void resetTaskAndStop() { resetTaskAndStop(/* removeNotification= */ false); } Loading packages/DynamicSystemInstallationService/src/com/android/dynsystem/VerificationActivity.java +9 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.dynsystem; import static android.os.image.DynamicSystemClient.ACTION_NOTIFY_KEYGUARD_DISMISSED; import static android.os.image.DynamicSystemClient.KEY_KEYGUARD_USE_DEFAULT_STRINGS; import android.app.Activity; Loading Loading @@ -83,11 +84,19 @@ public class VerificationActivity extends Activity { protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) { startInstallationService(); } else { notifyKeyguardDismissed(); } finish(); } private void notifyKeyguardDismissed() { Intent intent = new Intent(this, DynamicSystemInstallationService.class); intent.setAction(ACTION_NOTIFY_KEYGUARD_DISMISSED); startServiceAsUser(intent, UserHandle.SYSTEM); } private void startInstallationService() { // retrieve data from calling intent Intent callingIntent = getIntent(); Loading Loading
core/java/android/os/image/DynamicSystemClient.java +7 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,13 @@ public class DynamicSystemClient { public static final String ACTION_HIDE_NOTIFICATION = "android.os.image.action.HIDE_NOTIFICATION"; /** * Intent action: notify the service to post a status update when keyguard is dismissed. * @hide */ public static final String ACTION_NOTIFY_KEYGUARD_DISMISSED = "android.os.image.action.NOTIFY_KEYGUARD_DISMISSED"; /* * Intent Keys */ Loading
packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java +7 −2 Original line number Diff line number Diff line Loading @@ -16,11 +16,10 @@ package com.android.dynsystem; import static android.os.AsyncTask.Status.FINISHED; import static android.os.AsyncTask.Status.PENDING; import static android.os.AsyncTask.Status.RUNNING; import static android.os.image.DynamicSystemClient.ACTION_HIDE_NOTIFICATION; import static android.os.image.DynamicSystemClient.ACTION_NOTIFY_IF_IN_USE; import static android.os.image.DynamicSystemClient.ACTION_NOTIFY_KEYGUARD_DISMISSED; import static android.os.image.DynamicSystemClient.ACTION_START_INSTALL; import static android.os.image.DynamicSystemClient.CAUSE_ERROR_EXCEPTION; import static android.os.image.DynamicSystemClient.CAUSE_ERROR_INVALID_URL; Loading Loading @@ -234,6 +233,8 @@ public class DynamicSystemInstallationService extends Service executeNotifyIfInUseCommand(); } else if (ACTION_HIDE_NOTIFICATION.equals(action)) { executeHideNotificationCommand(); } else if (ACTION_NOTIFY_KEYGUARD_DISMISSED.equals(action)) { executeNotifyKeyguardDismissed(); } return Service.START_NOT_STICKY; Loading Loading @@ -477,6 +478,10 @@ public class DynamicSystemInstallationService extends Service } } private void executeNotifyKeyguardDismissed() { postStatus(STATUS_NOT_STARTED, CAUSE_INSTALL_CANCELLED, null); } private void resetTaskAndStop() { resetTaskAndStop(/* removeNotification= */ false); } Loading
packages/DynamicSystemInstallationService/src/com/android/dynsystem/VerificationActivity.java +9 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.dynsystem; import static android.os.image.DynamicSystemClient.ACTION_NOTIFY_KEYGUARD_DISMISSED; import static android.os.image.DynamicSystemClient.KEY_KEYGUARD_USE_DEFAULT_STRINGS; import android.app.Activity; Loading Loading @@ -83,11 +84,19 @@ public class VerificationActivity extends Activity { protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) { startInstallationService(); } else { notifyKeyguardDismissed(); } finish(); } private void notifyKeyguardDismissed() { Intent intent = new Intent(this, DynamicSystemInstallationService.class); intent.setAction(ACTION_NOTIFY_KEYGUARD_DISMISSED); startServiceAsUser(intent, UserHandle.SYSTEM); } private void startInstallationService() { // retrieve data from calling intent Intent callingIntent = getIntent(); Loading