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

Commit c6f99420 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add pending system update info system APIs."

parents 388090fb 07342dc1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ java_library {
        "core/java/android/os/ISchedulingPolicyService.aidl",
        "core/java/android/os/IStatsCompanionService.aidl",
        "core/java/android/os/IStatsManager.aidl",
        "core/java/android/os/ISystemUpdateManager.aidl",
        "core/java/android/os/IThermalEventListener.aidl",
        "core/java/android/os/IThermalService.aidl",
        "core/java/android/os/IUpdateLock.aidl",
+18 −0
Original line number Diff line number Diff line
@@ -131,6 +131,7 @@ package android {
    field public static final java.lang.String READ_PRIVILEGED_PHONE_STATE = "android.permission.READ_PRIVILEGED_PHONE_STATE";
    field public static final java.lang.String READ_RUNTIME_PROFILES = "android.permission.READ_RUNTIME_PROFILES";
    field public static final java.lang.String READ_SEARCH_INDEXABLES = "android.permission.READ_SEARCH_INDEXABLES";
    field public static final java.lang.String READ_SYSTEM_UPDATE_INFO = "android.permission.READ_SYSTEM_UPDATE_INFO";
    field public static final java.lang.String READ_WALLPAPER_INTERNAL = "android.permission.READ_WALLPAPER_INTERNAL";
    field public static final java.lang.String READ_WIFI_CREDENTIAL = "android.permission.READ_WIFI_CREDENTIAL";
    field public static final java.lang.String REAL_GET_TASKS = "android.permission.REAL_GET_TASKS";
@@ -761,6 +762,7 @@ package android.content {
    field public static final java.lang.String OEM_LOCK_SERVICE = "oem_lock";
    field public static final java.lang.String PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block";
    field public static final java.lang.String STATS_MANAGER = "stats";
    field public static final java.lang.String SYSTEM_UPDATE_SERVICE = "system_update";
    field public static final java.lang.String VR_SERVICE = "vrmanager";
    field public static final java.lang.String WIFI_RTT_SERVICE = "rttmanager";
    field public static final java.lang.String WIFI_SCANNING_SERVICE = "wifiscanner";
@@ -3503,6 +3505,22 @@ package android.os {
    method public abstract void onResult(android.os.Bundle);
  }

  public class SystemUpdateManager {
    method public android.os.Bundle retrieveSystemUpdateInfo();
    method public void updateSystemUpdateInfo(android.os.PersistableBundle);
    field public static final java.lang.String KEY_IS_SECURITY_UPDATE = "is_security_update";
    field public static final java.lang.String KEY_STATUS = "status";
    field public static final java.lang.String KEY_TARGET_BUILD_FINGERPRINT = "target_build_fingerprint";
    field public static final java.lang.String KEY_TARGET_SECURITY_PATCH_LEVEL = "target_security_patch_level";
    field public static final java.lang.String KEY_TITLE = "title";
    field public static final int STATUS_IDLE = 1; // 0x1
    field public static final int STATUS_IN_PROGRESS = 3; // 0x3
    field public static final int STATUS_UNKNOWN = 0; // 0x0
    field public static final int STATUS_WAITING_DOWNLOAD = 2; // 0x2
    field public static final int STATUS_WAITING_INSTALL = 4; // 0x4
    field public static final int STATUS_WAITING_REBOOT = 5; // 0x5
  }

  public class UpdateEngine {
    ctor public UpdateEngine();
    method public void applyPayload(java.lang.String, long, long, java.lang.String[]);
+13 −0
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ import android.os.IBinder;
import android.os.IHardwarePropertiesManager;
import android.os.IPowerManager;
import android.os.IRecoverySystem;
import android.os.ISystemUpdateManager;
import android.os.IUserManager;
import android.os.IncidentManager;
import android.os.PowerManager;
@@ -119,6 +120,7 @@ import android.os.Process;
import android.os.RecoverySystem;
import android.os.ServiceManager;
import android.os.ServiceManager.ServiceNotFoundException;
import android.os.SystemUpdateManager;
import android.os.SystemVibrator;
import android.os.UserHandle;
import android.os.UserManager;
@@ -485,6 +487,17 @@ final class SystemServiceRegistry {
                return new StorageStatsManager(ctx, service);
            }});

        registerService(Context.SYSTEM_UPDATE_SERVICE, SystemUpdateManager.class,
                new CachedServiceFetcher<SystemUpdateManager>() {
                    @Override
                    public SystemUpdateManager createService(ContextImpl ctx)
                            throws ServiceNotFoundException {
                        IBinder b = ServiceManager.getServiceOrThrow(
                                Context.SYSTEM_UPDATE_SERVICE);
                        ISystemUpdateManager service = ISystemUpdateManager.Stub.asInterface(b);
                        return new SystemUpdateManager(service);
                    }});

        registerService(Context.TELEPHONY_SERVICE, TelephonyManager.class,
                new CachedServiceFetcher<TelephonyManager>() {
            @Override
+13 −1
Original line number Diff line number Diff line
@@ -3024,7 +3024,8 @@ public abstract class Context {
            //@hide: INCIDENT_SERVICE,
            //@hide: STATS_COMPANION_SERVICE,
            COMPANION_DEVICE_SERVICE,
            CROSS_PROFILE_APPS_SERVICE
            CROSS_PROFILE_APPS_SERVICE,
            //@hide: SYSTEM_UPDATE_SERVICE,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface ServiceName {}
@@ -3240,6 +3241,17 @@ public abstract class Context {
     */
    public static final String RECOVERY_SERVICE = "recovery";

    /**
     * Use with {@link #getSystemService(String)} to retrieve a
     * {@link android.os.SystemUpdateManager} for accessing the system update
     * manager service.
     *
     * @see #getSystemService(String)
     * @hide
     */
    @SystemApi
    public static final String SYSTEM_UPDATE_SERVICE = "system_update";

    /**
     * Use with {@link #getSystemService(String)} to retrieve a
     * {@link android.view.WindowManager} for accessing the system's window
+27 −0
Original line number Diff line number Diff line
/* //device/java/android/android/os/ISystemUpdateInfo.aidl
**
** Copyright 2018, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/

package android.os;

import android.os.Bundle;
import android.os.PersistableBundle;

/** @hide */
interface ISystemUpdateManager {
    Bundle retrieveSystemUpdateInfo();
    void updateSystemUpdateInfo(in PersistableBundle data);
}
Loading