Merge "Marking SessionParams#setDontKillApp as public API"
This commit is contained in:
committed by
Android (Google) Code Review
commit
417fca9a22
@@ -12197,6 +12197,7 @@ package android.content.pm {
|
||||
method @Nullable public String getAppPackageName();
|
||||
method @NonNull public int[] getChildSessionIds();
|
||||
method public long getCreatedMillis();
|
||||
method public boolean getDontKillApp();
|
||||
method public int getInstallLocation();
|
||||
method public int getInstallReason();
|
||||
method @Nullable public String getInstallerAttributionTag();
|
||||
@@ -12252,6 +12253,7 @@ package android.content.pm {
|
||||
method public void setAppPackageName(@Nullable String);
|
||||
method public void setApplicationEnabledSettingPersistent();
|
||||
method @Deprecated public void setAutoRevokePermissionsMode(boolean);
|
||||
method public void setDontKillApp(boolean);
|
||||
method public void setInstallLocation(int);
|
||||
method public void setInstallReason(int);
|
||||
method public void setInstallScenario(int);
|
||||
|
||||
@@ -3626,7 +3626,6 @@ package android.content.pm {
|
||||
method public boolean getAllocateAggressive();
|
||||
method @Deprecated public boolean getAllowDowngrade();
|
||||
method public int getAutoRevokePermissionsMode();
|
||||
method public boolean getDontKillApp();
|
||||
method public boolean getEnableRollback();
|
||||
method @Nullable public String[] getGrantedRuntimePermissions();
|
||||
method public boolean getInstallAsFullApp(boolean);
|
||||
@@ -3642,7 +3641,6 @@ package android.content.pm {
|
||||
method @RequiresPermission(android.Manifest.permission.ALLOCATE_AGGRESSIVE) public void setAllocateAggressive(boolean);
|
||||
method @Deprecated public void setAllowDowngrade(boolean);
|
||||
method @RequiresPermission(allOf={android.Manifest.permission.INSTALL_PACKAGES, "com.android.permission.USE_INSTALLER_V2"}) public void setDataLoaderParams(@NonNull android.content.pm.DataLoaderParams);
|
||||
method public void setDontKillApp(boolean);
|
||||
method public void setEnableRollback(boolean);
|
||||
method public void setEnableRollback(boolean, int);
|
||||
method @RequiresPermission(android.Manifest.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS) public void setGrantedRuntimePermissions(String[]);
|
||||
|
||||
@@ -2616,8 +2616,17 @@ public class PackageInstaller {
|
||||
installFlags |= PackageManager.INSTALL_FORCE_PERMISSION_PROMPT;
|
||||
}
|
||||
|
||||
/** {@hide} */
|
||||
@SystemApi
|
||||
/**
|
||||
* Requests that the system not kill any of the package's running
|
||||
* processes as part of a {@link SessionParams#MODE_INHERIT_EXISTING}
|
||||
* session in which splits being added. By default, all installs will
|
||||
* result in the package's running processes being killed before the
|
||||
* install completes.
|
||||
*
|
||||
* @param dontKillApp set to {@code true} to request that the processes
|
||||
* belonging to the package not be killed as part of
|
||||
* this install.
|
||||
*/
|
||||
public void setDontKillApp(boolean dontKillApp) {
|
||||
if (dontKillApp) {
|
||||
installFlags |= PackageManager.INSTALL_DONT_KILL_APP;
|
||||
@@ -3456,10 +3465,7 @@ public class PackageInstaller {
|
||||
|
||||
/**
|
||||
* Get the value set in {@link SessionParams#setDontKillApp(boolean)}.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public boolean getDontKillApp() {
|
||||
return (installFlags & PackageManager.INSTALL_DONT_KILL_APP) != 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user