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

Commit 39269044 authored by Chandan Nath's avatar Chandan Nath Committed by Android (Google) Code Review
Browse files

Merge "replace "android" by PLATFORM_PACKAGE_NAME"

parents c86ce9bb a4405523
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.server.backup;

import static com.android.server.pm.PackageManagerService.PLATFORM_PACKAGE_NAME;

import android.app.job.JobInfo;
import android.app.job.JobParameters;
import android.app.job.JobScheduler;
@@ -37,7 +39,7 @@ public class FullBackupJob extends JobService {
    public static final int MAX_JOB_ID = 52419896;

    private static ComponentName sIdleService =
            new ComponentName("android", FullBackupJob.class.getName());
            new ComponentName(PLATFORM_PACKAGE_NAME, FullBackupJob.class.getName());

    @GuardedBy("mParamsForUser")
    private final SparseArray<JobParameters> mParamsForUser = new SparseArray<>();
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.server.backup;

import static com.android.server.backup.BackupManagerService.DEBUG_SCHEDULING;
import static com.android.server.pm.PackageManagerService.PLATFORM_PACKAGE_NAME;

import android.app.AlarmManager;
import android.app.job.JobInfo;
@@ -43,7 +44,7 @@ import java.util.Random;
public class KeyValueBackupJob extends JobService {
    private static final String TAG = "KeyValueBackupJob";
    private static ComponentName sKeyValueJobService =
            new ComponentName("android", KeyValueBackupJob.class.getName());
            new ComponentName(PLATFORM_PACKAGE_NAME, KeyValueBackupJob.class.getName());

    private static final String USER_ID_EXTRA_KEY = "userId";

+4 −3
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import static com.android.server.backup.UserBackupManagerService.SETTINGS_PACKAG
import static com.android.server.backup.internal.BackupHandler.MSG_BACKUP_RESTORE_STEP;
import static com.android.server.backup.internal.BackupHandler.MSG_RESTORE_OPERATION_TIMEOUT;
import static com.android.server.backup.internal.BackupHandler.MSG_RESTORE_SESSION_TIMEOUT;
import static com.android.server.pm.PackageManagerService.PLATFORM_PACKAGE_NAME;

import android.annotation.Nullable;
import android.app.ApplicationThreadConstants;
@@ -222,7 +223,7 @@ public class PerformUnifiedRestoreTask implements BackupRestoreTask {
                try {
                    PackageManager pm = backupManagerService.getPackageManager();
                    PackageInfo info = pm.getPackageInfoAsUser(filterSet[i], 0, mUserId);
                    if ("android".equals(info.packageName)) {
                    if (PLATFORM_PACKAGE_NAME.equals(info.packageName)) {
                        hasSystem = true;
                        continue;
                    }
@@ -241,7 +242,7 @@ public class PerformUnifiedRestoreTask implements BackupRestoreTask {
            if (hasSystem) {
                try {
                    mAcceptSet.add(0, backupManagerService.getPackageManager().getPackageInfoAsUser(
                                    "android", 0, mUserId));
                                    PLATFORM_PACKAGE_NAME, 0, mUserId));
                } catch (NameNotFoundException e) {
                    // won't happen; we know a priori that it's valid
                }
@@ -681,7 +682,7 @@ public class PerformUnifiedRestoreTask implements BackupRestoreTask {
        // an optimization: we know there's no widget data hosted/published by that
        // package, and this way we avoid doing a spurious copy of MB-sized wallpaper
        // data following the download.
        boolean staging = !packageName.equals("android");
        boolean staging = !packageName.equals(PLATFORM_PACKAGE_NAME);
        ParcelFileDescriptor stage;
        File downloadFile = (staging) ? mStageName : mBackupDataName;
        boolean startedAgentRestore = false;