[android] add missed menu/setting cases without any action

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn 2024-09-26 18:04:03 +04:00 committed by Roman Tsisyk
parent 2ceb10c297
commit ed38ab11c7
3 changed files with 13 additions and 1 deletions

View file

@ -6,7 +6,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.SOURCE)
@IntDef({RequestType.INCORRECT, RequestType.MAP, RequestType.ROUTE, RequestType.SEARCH, RequestType.CROSSHAIR, RequestType.OAUTH2})
@IntDef({RequestType.INCORRECT, RequestType.MAP, RequestType.ROUTE, RequestType.SEARCH, RequestType.CROSSHAIR, RequestType.OAUTH2, RequestType.MENU, RequestType.SETTINGS})
public @interface RequestType
{
// Represents url_scheme::ParsedMapApi::UrlType from c++ part.
@ -16,4 +16,6 @@ public @interface RequestType
public static final int SEARCH = 3;
public static final int CROSSHAIR = 4;
public static final int OAUTH2 = 5;
public static final int MENU = 6;
public static final int SETTINGS = 7;
}

View file

@ -96,6 +96,12 @@ public final class IntentUtils
return;
case RequestType.CROSSHAIR:
Logger.e(TAG, "Crosshair API is not supported by Android Auto: " + uri);
return;
case RequestType.MENU:
Logger.e(TAG, "Menu API is not supported by Android Auto: " + uri);
return;
case RequestType.SETTINGS:
Logger.e(TAG, "Settings API is not supported by Android Auto: " + uri);
}
}

View file

@ -141,6 +141,10 @@ public class Factory
return true;
}
// Menu and Settings url types should be implemented to support deeplinking.
case RequestType.MENU:
case RequestType.SETTINGS:
}
return false;