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

Commit 288b71c8 authored by Chen Xu's avatar Chen Xu
Browse files

new TelephonyRegistryManager

today telephonyRegistry lives in system process
this is intended to persists all telephony listeners when
phone process crash. Telephony today notify system server by
using AIDL APIs directly. Instead, we are exposing a proper API
surface: telephonyRegistryManager where only phone app and
carrier privileged apps are allowed to use APIs in
TelephonyRegistryManger to notify telephony related status update.

Bug: 140908357
Test: Build & Manaul
Change-Id: I1b750751148925b4a7bd94553318907654012fc1
parent 15348e69
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1382,6 +1382,7 @@ package android.content {
    field public static final String STATS_MANAGER = "stats";
    field public static final String STATUS_BAR_SERVICE = "statusbar";
    field public static final String SYSTEM_UPDATE_SERVICE = "system_update";
    field public static final String TELEPHONY_REGISTRY_SERVICE = "telephony_registry";
    field public static final String VR_SERVICE = "vrmanager";
    field @Deprecated public static final String WIFI_RTT_SERVICE = "rttmanager";
    field public static final String WIFI_SCANNING_SERVICE = "wifiscanner";
@@ -5680,6 +5681,14 @@ package android.os.storage {
}
package android.os.telephony {
  public class TelephonyRegistryManager {
    method public void notifyCarrierNetworkChange(boolean);
  }
}
package android.permission {
  public final class PermissionControllerManager {
+0 −1
Original line number Diff line number Diff line
@@ -4838,7 +4838,6 @@ com.android.internal.telephony.PhoneConstantConversions
com.android.internal.telephony.PhoneConstants$DataState
com.android.internal.telephony.PhoneConstants$State
com.android.internal.telephony.PhoneFactory
com.android.internal.telephony.PhoneInternalInterface$DataActivityState
com.android.internal.telephony.PhoneInternalInterface
com.android.internal.telephony.PhoneNotifier
com.android.internal.telephony.PhoneStateIntentReceiver
+8 −0
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ import android.os.health.SystemHealthManager;
import android.os.image.DynamicSystemManager;
import android.os.image.IDynamicSystemService;
import android.os.storage.StorageManager;
import android.os.telephony.TelephonyRegistryManager;
import android.permission.PermissionControllerManager;
import android.permission.PermissionManager;
import android.print.IPrintManager;
@@ -606,6 +607,13 @@ public final class SystemServiceRegistry {
                return new TelephonyManager(ctx.getOuterContext());
            }});

        registerService(Context.TELEPHONY_REGISTRY_SERVICE, TelephonyRegistryManager.class,
            new CachedServiceFetcher<TelephonyRegistryManager>() {
                @Override
                public TelephonyRegistryManager createService(ContextImpl ctx) {
                    return new TelephonyRegistryManager();
                }});

        registerService(Context.TELEPHONY_SUBSCRIPTION_SERVICE, SubscriptionManager.class,
                new CachedServiceFetcher<SubscriptionManager>() {
            @Override
+8 −0
Original line number Diff line number Diff line
@@ -4707,6 +4707,14 @@ public abstract class Context {
     */
    public static final String DYNAMIC_SYSTEM_SERVICE = "dynamic_system";

    /**
     * Use with {@link #getSystemService(String)} to retrieve an
     * {@link android.os.telephony.TelephonyRegistryManager}.
     * @hide
     */
    @SystemApi
    public static final String TELEPHONY_REGISTRY_SERVICE = "telephony_registry";

    /**
     * Determine whether the given permission is allowed for a particular
     * process and user ID running in the system.
+546 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading