Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d0ec789 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Handle AppWarnings per-user per-display" into main

parents 748f0532 02be488a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -886,6 +886,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
            mRecentTasks.onSystemReadyLocked();
            mTaskSupervisor.onSystemReady();
            mActivityClientController.onSystemReady();
            mAppWarnings.onSystemReady();
            // TODO(b/258792202) Cleanup once ASM is ready to launch
            ActivitySecurityModelFeatureFlags.initialize(mContext.getMainExecutor());
            mGrammaticalManagerInternal = LocalServices.getService(
@@ -6353,7 +6354,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
        public void onPackageDataCleared(String name, int userId) {
            synchronized (mGlobalLock) {
                mCompatModePackages.handlePackageDataClearedLocked(name);
                mAppWarnings.onPackageDataCleared(name);
                mAppWarnings.onPackageDataCleared(name, userId);
                mPackageConfigPersister.onPackageDataCleared(name, userId);
            }
        }
@@ -6361,7 +6362,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
        @Override
        public void onPackageUninstalled(String name, int userId) {
            synchronized (mGlobalLock) {
                mAppWarnings.onPackageUninstalled(name);
                mAppWarnings.onPackageUninstalled(name, userId);
                mCompatModePackages.handlePackageUninstalledLocked(name);
                mPackageConfigPersister.onPackageUninstall(name, userId);
            }
+336 −92

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ import com.android.internal.R;

class DeprecatedAbiDialog extends AppWarnings.BaseDialog {
    DeprecatedAbiDialog(final AppWarnings manager, Context context,
            ApplicationInfo appInfo) {
        super(manager, appInfo.packageName);
            ApplicationInfo appInfo, int userId) {
        super(manager, context, appInfo.packageName, userId);

        final PackageManager pm = context.getPackageManager();
        final CharSequence label = appInfo.loadSafeLabel(pm,
@@ -41,7 +41,7 @@ class DeprecatedAbiDialog extends AppWarnings.BaseDialog {
        final AlertDialog.Builder builder = new AlertDialog.Builder(context)
                .setPositiveButton(R.string.ok, (dialog, which) ->
                    manager.setPackageFlag(
                            mPackageName, AppWarnings.FLAG_HIDE_DEPRECATED_ABI, true))
                            mUserId, mPackageName, AppWarnings.FLAG_HIDE_DEPRECATED_ABI, true))
                .setMessage(message)
                .setTitle(label);

+3 −3
Original line number Diff line number Diff line
@@ -31,8 +31,8 @@ import com.android.server.utils.AppInstallerUtil;
class DeprecatedTargetSdkVersionDialog extends AppWarnings.BaseDialog {

    DeprecatedTargetSdkVersionDialog(final AppWarnings manager, Context context,
            ApplicationInfo appInfo) {
        super(manager, appInfo.packageName);
            ApplicationInfo appInfo, int userId) {
        super(manager, context, appInfo.packageName, userId);

        final PackageManager pm = context.getPackageManager();
        final CharSequence label = appInfo.loadSafeLabel(pm,
@@ -44,7 +44,7 @@ class DeprecatedTargetSdkVersionDialog extends AppWarnings.BaseDialog {
        final AlertDialog.Builder builder = new AlertDialog.Builder(context)
                .setPositiveButton(R.string.ok, (dialog, which) ->
                    manager.setPackageFlag(
                            mPackageName, AppWarnings.FLAG_HIDE_DEPRECATED_SDK, true))
                            mUserId, mPackageName, AppWarnings.FLAG_HIDE_DEPRECATED_SDK, true))
                .setMessage(message)
                .setTitle(label);

+3 −3
Original line number Diff line number Diff line
@@ -32,8 +32,8 @@ import com.android.server.utils.AppInstallerUtil;
class UnsupportedCompileSdkDialog extends AppWarnings.BaseDialog {

    UnsupportedCompileSdkDialog(final AppWarnings manager, Context context,
            ApplicationInfo appInfo) {
        super(manager, appInfo.packageName);
            ApplicationInfo appInfo, int userId) {
        super(manager, context, appInfo.packageName, userId);

        final PackageManager pm = context.getPackageManager();
        final CharSequence label = appInfo.loadSafeLabel(pm,
@@ -68,6 +68,6 @@ class UnsupportedCompileSdkDialog extends AppWarnings.BaseDialog {
        final CheckBox alwaysShow = mDialog.findViewById(R.id.ask_checkbox);
        alwaysShow.setChecked(true);
        alwaysShow.setOnCheckedChangeListener((buttonView, isChecked) -> manager.setPackageFlag(
                mPackageName, AppWarnings.FLAG_HIDE_COMPILE_SDK, !isChecked));
                mUserId, mPackageName, AppWarnings.FLAG_HIDE_COMPILE_SDK, !isChecked));
    }
}
Loading