Fix nullable annotation to match overriden method in super class

Bug: 156238511
Test: Treehugger
Change-Id: I349e8628ea77d3051f40f903c3438c3fc0a489ea
This commit is contained in:
Mocy Sheng
2020-05-11 10:16:24 -05:00
parent e9a5ad9884
commit ba61f71ff3
3 changed files with 14 additions and 10 deletions

View File

@@ -3987,7 +3987,7 @@ package android.app {
method public boolean startActivityIfNeeded(@NonNull @RequiresPermission android.content.Intent, int);
method public boolean startActivityIfNeeded(@NonNull @RequiresPermission android.content.Intent, int, @Nullable android.os.Bundle);
method public void startIntentSenderForResult(android.content.IntentSender, int, @Nullable android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
method public void startIntentSenderForResult(android.content.IntentSender, int, @Nullable android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method public void startIntentSenderForResult(android.content.IntentSender, int, @Nullable android.content.Intent, int, int, int, @Nullable android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method @Deprecated public void startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
method @Deprecated public void startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int, @Nullable android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method public void startLocalVoiceInteraction(android.os.Bundle);
@@ -10350,8 +10350,8 @@ package android.content {
method public void startActivity(android.content.Intent, android.os.Bundle);
method public android.content.ComponentName startForegroundService(android.content.Intent);
method public boolean startInstrumentation(android.content.ComponentName, String, android.os.Bundle);
method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
method public void startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method public void startIntentSender(android.content.IntentSender, @Nullable android.content.Intent, int, int, int) throws android.content.IntentSender.SendIntentException;
method public void startIntentSender(android.content.IntentSender, @Nullable android.content.Intent, int, int, int, @Nullable android.os.Bundle) throws android.content.IntentSender.SendIntentException;
method public android.content.ComponentName startService(android.content.Intent);
method public boolean stopService(android.content.Intent);
method public void unbindService(android.content.ServiceConnection);

View File

@@ -5371,7 +5371,7 @@ public class Activity extends ContextThemeWrapper
return mActivityTransitionState.isTransitionRunning();
}
private Bundle transferSpringboardActivityOptions(Bundle options) {
private Bundle transferSpringboardActivityOptions(@Nullable Bundle options) {
if (options == null && (mWindow != null && !mWindow.isActive())) {
final ActivityOptions activityOptions = getActivityOptions();
if (activityOptions != null &&
@@ -5539,7 +5539,7 @@ public class Activity extends ContextThemeWrapper
*/
public void startIntentSenderForResult(IntentSender intent, int requestCode,
@Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags,
Bundle options) throws IntentSender.SendIntentException {
@Nullable Bundle options) throws IntentSender.SendIntentException {
if (mParent == null) {
startIntentSenderForResultInner(intent, mEmbeddedID, requestCode, fillInIntent,
flagsMask, flagsValues, options);
@@ -5556,7 +5556,7 @@ public class Activity extends ContextThemeWrapper
private void startIntentSenderForResultInner(IntentSender intent, String who, int requestCode,
Intent fillInIntent, int flagsMask, int flagsValues,
Bundle options)
@Nullable Bundle options)
throws IntentSender.SendIntentException {
try {
options = transferSpringboardActivityOptions(options);
@@ -5717,6 +5717,7 @@ public class Activity extends ContextThemeWrapper
* <var>flagsMask</var>
* @param extraFlags Always set to 0.
*/
@Override
public void startIntentSender(IntentSender intent,
@Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags)
throws IntentSender.SendIntentException {
@@ -5744,9 +5745,10 @@ public class Activity extends ContextThemeWrapper
* have also been supplied by the IntentSender, options given here will
* override any that conflict with those given by the IntentSender.
*/
@Override
public void startIntentSender(IntentSender intent,
@Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags,
Bundle options) throws IntentSender.SendIntentException {
@Nullable Bundle options) throws IntentSender.SendIntentException {
if (options != null) {
startIntentSenderForResult(intent, -1, fillInIntent, flagsMask,
flagsValues, extraFlags, options);

View File

@@ -449,7 +449,8 @@ public class ContextWrapper extends Context {
@Override
public void startIntentSender(IntentSender intent,
Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags)
@Nullable Intent fillInIntent, int flagsMask, int flagsValues,
int extraFlags)
throws IntentSender.SendIntentException {
mBase.startIntentSender(intent, fillInIntent, flagsMask,
flagsValues, extraFlags);
@@ -457,8 +458,9 @@ public class ContextWrapper extends Context {
@Override
public void startIntentSender(IntentSender intent,
Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags,
Bundle options) throws IntentSender.SendIntentException {
@Nullable Intent fillInIntent, int flagsMask, int flagsValues,
int extraFlags, @Nullable Bundle options)
throws IntentSender.SendIntentException {
mBase.startIntentSender(intent, fillInIntent, flagsMask,
flagsValues, extraFlags, options);
}