[DO NOT MERGE] Check CellInfoCallback Detail for Null
In cases where the source of the CellInfo fails but does not generate a Throwable, the detail info will not be provided and should be null. Inside the user process, we need to check for null before dereferencing the detail object. Oops. :-( Bug: 142706765 Bug: 142421696 Test: manual Change-Id: I1307d1d7aacef0bbd33bfc73700ee774e12e64c1
This commit is contained in:
@@ -5435,7 +5435,8 @@ public class TelephonyManager {
|
|||||||
public void onError(int errorCode, android.os.ParcelableException detail) {
|
public void onError(int errorCode, android.os.ParcelableException detail) {
|
||||||
Binder.withCleanCallingIdentity(() ->
|
Binder.withCleanCallingIdentity(() ->
|
||||||
executor.execute(() -> callback.onError(
|
executor.execute(() -> callback.onError(
|
||||||
errorCode, detail.getCause())));
|
errorCode,
|
||||||
|
detail == null ? null : detail.getCause())));
|
||||||
}
|
}
|
||||||
}, getOpPackageName());
|
}, getOpPackageName());
|
||||||
|
|
||||||
@@ -5475,7 +5476,8 @@ public class TelephonyManager {
|
|||||||
public void onError(int errorCode, android.os.ParcelableException detail) {
|
public void onError(int errorCode, android.os.ParcelableException detail) {
|
||||||
Binder.withCleanCallingIdentity(() ->
|
Binder.withCleanCallingIdentity(() ->
|
||||||
executor.execute(() -> callback.onError(
|
executor.execute(() -> callback.onError(
|
||||||
errorCode, detail.getCause())));
|
errorCode,
|
||||||
|
detail == null ? null : detail.getCause())));
|
||||||
}
|
}
|
||||||
}, getOpPackageName(), workSource);
|
}, getOpPackageName(), workSource);
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
|
|||||||
Reference in New Issue
Block a user