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

Commit 9de7952a authored by Tao Bao's avatar Tao Bao Committed by Android (Google) Code Review
Browse files

Merge "Add support for update-on-boot feature." into nyc-dev

parents ffd4c73a e8a403d5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -223,6 +223,8 @@ LOCAL_SRC_FILES += \
	core/java/android/os/IPermissionController.aidl \
	core/java/android/os/IProcessInfoService.aidl \
	core/java/android/os/IPowerManager.aidl \
	core/java/android/os/IRecoverySystem.aidl \
	core/java/android/os/IRecoverySystemProgressListener.aidl \
	core/java/android/os/IRemoteCallback.aidl \
	core/java/android/os/ISchedulingPolicyService.aidl \
	core/java/android/os/IUpdateLock.aidl \
+5 −0
Original line number Diff line number Diff line
@@ -31418,9 +31418,14 @@ package android.os {
  }
  public class RecoverySystem {
    method public static void cancelScheduledUpdate(android.content.Context) throws java.io.IOException;
    method public static void installPackage(android.content.Context, java.io.File) throws java.io.IOException;
    method public static void installPackage(android.content.Context, java.io.File, boolean) throws java.io.IOException;
    method public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener, android.os.Handler) throws java.io.IOException;
    method public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener) throws java.io.IOException;
    method public static void rebootWipeCache(android.content.Context) throws java.io.IOException;
    method public static void rebootWipeUserData(android.content.Context) throws java.io.IOException;
    method public static void scheduleUpdateOnBoot(android.content.Context, java.io.File) throws java.io.IOException;
    method public static void verifyPackage(java.io.File, android.os.RecoverySystem.ProgressListener, java.io.File) throws java.security.GeneralSecurityException, java.io.IOException;
  }
+14 −0
Original line number Diff line number Diff line
@@ -91,9 +91,11 @@ import android.os.HardwarePropertiesManager;
import android.os.IBinder;
import android.os.IHardwarePropertiesManager;
import android.os.IPowerManager;
import android.os.IRecoverySystem;
import android.os.IUserManager;
import android.os.PowerManager;
import android.os.Process;
import android.os.RecoverySystem;
import android.os.ServiceManager;
import android.os.SystemVibrator;
import android.os.UserHandle;
@@ -380,6 +382,18 @@ final class SystemServiceRegistry {
                        service, ctx.mMainThread.getHandler());
            }});

        registerService(Context.RECOVERY_SERVICE, RecoverySystem.class,
                new CachedServiceFetcher<RecoverySystem>() {
            @Override
            public RecoverySystem createService(ContextImpl ctx) {
                IBinder b = ServiceManager.getService(Context.RECOVERY_SERVICE);
                IRecoverySystem service = IRecoverySystem.Stub.asInterface(b);
                if (service == null) {
                    Log.wtf(TAG, "Failed to get recovery service.");
                }
                return new RecoverySystem(service);
            }});

        registerService(Context.SEARCH_SERVICE, SearchManager.class,
                new CachedServiceFetcher<SearchManager>() {
            @Override
+10 −0
Original line number Diff line number Diff line
@@ -2861,6 +2861,16 @@ public abstract class Context {
     */
    public static final String POWER_SERVICE = "power";

    /**
     * Use with {@link #getSystemService} to retrieve a
     * {@link android.os.RecoverySystem} for accessing the recovery system
     * service.
     *
     * @see #getSystemService
     * @hide
     */
    public static final String RECOVERY_SERVICE = "recovery";

    /**
     * Use with {@link #getSystemService} to retrieve a
     * {@link android.view.WindowManager} for accessing the system's window
+28 −0
Original line number Diff line number Diff line
/* //device/java/android/android/os/IRecoverySystem.aidl
**
** Copyright 2016, 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.IRecoverySystemProgressListener;

/** @hide */

interface IRecoverySystem {
    boolean uncrypt(in String packageFile, IRecoverySystemProgressListener listener);
    boolean setupBcb(in String command);
    boolean clearBcb();
}
Loading