Merge "Pipe through featureId from caller to permission checks in telephony code"
This commit is contained in:
committed by
Android (Google) Code Review
commit
28c7e9c2ea
@@ -161,7 +161,7 @@ public class Build {
|
||||
try {
|
||||
Application application = ActivityThread.currentApplication();
|
||||
String callingPackage = application != null ? application.getPackageName() : null;
|
||||
return service.getSerialForPackage(callingPackage);
|
||||
return service.getSerialForPackage(callingPackage, null);
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
}
|
||||
|
||||
@@ -21,5 +21,5 @@ package android.os;
|
||||
*/
|
||||
interface IDeviceIdentifiersPolicyService {
|
||||
String getSerial();
|
||||
String getSerialForPackage(in String callingPackage);
|
||||
}
|
||||
String getSerialForPackage(in String callingPackage, String callingFeatureId);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package android.telephony;
|
||||
|
||||
import android.annotation.CallbackExecutor;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.SystemApi;
|
||||
import android.content.Context;
|
||||
@@ -23,8 +22,6 @@ import android.net.LinkProperties;
|
||||
import android.net.NetworkCapabilities;
|
||||
import android.os.Binder;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerExecutor;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
import android.telephony.Annotation.ApnType;
|
||||
@@ -37,19 +34,12 @@ import android.telephony.Annotation.PreciseCallStates;
|
||||
import android.telephony.Annotation.RadioPowerState;
|
||||
import android.telephony.Annotation.SimActivationState;
|
||||
import android.telephony.Annotation.SrvccState;
|
||||
import android.telephony.CallQuality;
|
||||
import android.telephony.CellInfo;
|
||||
import android.telephony.DisconnectCause;
|
||||
import android.telephony.PhoneCapability;
|
||||
import android.telephony.ServiceState;
|
||||
import android.telephony.SignalStrength;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.telephony.data.ApnSetting;
|
||||
import android.telephony.ims.ImsReasonInfo;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.internal.telephony.ITelephonyRegistry;
|
||||
import com.android.internal.telephony.IOnSubscriptionsChangedListener;
|
||||
import com.android.internal.telephony.ITelephonyRegistry;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -120,7 +110,8 @@ public class TelephonyRegistryManager {
|
||||
};
|
||||
mSubscriptionChangedListenerMap.put(listener, callback);
|
||||
try {
|
||||
sRegistry.addOnSubscriptionsChangedListener(mContext.getOpPackageName(), callback);
|
||||
sRegistry.addOnSubscriptionsChangedListener(mContext.getOpPackageName(),
|
||||
mContext.getFeatureId(), callback);
|
||||
} catch (RemoteException ex) {
|
||||
// system server crash
|
||||
}
|
||||
@@ -179,7 +170,7 @@ public class TelephonyRegistryManager {
|
||||
mOpportunisticSubscriptionChangedListenerMap.put(listener, callback);
|
||||
try {
|
||||
sRegistry.addOnOpportunisticSubscriptionsChangedListener(mContext.getOpPackageName(),
|
||||
callback);
|
||||
mContext.getFeatureId(), callback);
|
||||
} catch (RemoteException ex) {
|
||||
// system server crash
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user