Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing deprecated and unused features from 0.x versions. #157

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,27 @@ public static Intent newIntent(
return newIntent(context, new ArrayList<SupportedAppType>(), sessionConfiguration, responseType, forceWebview, false, false);
}

/**
* Create an {@link Intent} to pass to this activity
*
* @param context the {@link Context} for the intent
* @param sessionConfiguration to be used for gather clientId
* @param responseType that is expected
* @param forceWebview Forced to use old webview instead of chrometabs
* @return an intent that can be passed to this activity
*/
@NonNull
public static Intent newIntent(
@NonNull Context context,
@NonNull ArrayList<SupportedAppType> productPriority,
@NonNull SessionConfiguration sessionConfiguration,
@NonNull ResponseType responseType,
boolean forceWebview) {

return newIntent(context, productPriority, sessionConfiguration, responseType, forceWebview, false, false);
}


/**
* Create an {@link Intent} to pass to this activity
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public void loginForImplicitGrant(@NonNull Activity activity) {
return;
}

Intent intent = LoginActivity.newIntent(activity, sessionConfiguration,
Intent intent = LoginActivity.newIntent(activity, productFlowPriority, sessionConfiguration,
ResponseType.TOKEN, legacyUriRedirectHandler.isLegacyMode());
activity.startActivityForResult(intent, requestCode);
}
Expand All @@ -222,7 +222,7 @@ public void loginForAuthorizationCode(@NonNull Activity activity) {
return;
}

Intent intent = LoginActivity.newIntent(activity, sessionConfiguration,
Intent intent = LoginActivity.newIntent(activity, productFlowPriority, sessionConfiguration,
ResponseType.CODE, legacyUriRedirectHandler.isLegacyMode());
activity.startActivityForResult(intent, requestCode);
}
Expand All @@ -240,7 +240,7 @@ private void loginForImplicitGrantWithFallback(@NonNull Activity activity) {

Intent intent = LoginActivity.newIntent(
activity,
new ArrayList<SupportedAppType>(),
productFlowPriority,
sessionConfiguration,
ResponseType.TOKEN,
legacyUriRedirectHandler.isLegacyMode(),
Expand Down
33 changes: 0 additions & 33 deletions core-android/src/main/res/layout/ub__login_view.xml

This file was deleted.

2 changes: 0 additions & 2 deletions core-android/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
<resources>
<dimen name="ub__text_size">20sp</dimen>
<dimen name="ub__secondary_text_size">14sp</dimen>
<dimen name="ub__estimates_text_size">12sp</dimen>
<dimen name="ub__standard_padding">16dp</dimen>
<dimen name="ub__small_padding">8dp</dimen>

<dimen name="ub__signin_margin">48dp</dimen>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public class UberButtonTest extends RobolectricTestBase {

private static final String ANDROID_COLOR_BLACK = "@android:color/black";
private static final String ANDROID_COLOR_WHITE = "@android:color/white";
private static final String DRAWABLE_UBER_BADGE = "@drawable/uber_badge";
private static final String GRAVITY_END = "end";
private static final String STYLE_ITALIC = "italic";
private static final String ONE_SP = "1sp";
Expand All @@ -60,8 +59,6 @@ public class UberButtonTest extends RobolectricTestBase {
private static final String FOUR_SP = "4sp";
private static final String TEXT = "test";

private static final String UBER_PACKAGE_NAME = "com.uber.sdk.android.core";

private Context context;

@Before
Expand All @@ -81,19 +78,10 @@ public void onCreate_whenBackgroundAttributeSet_shouldSetBackground() {
@Test
public void onCreate_whenCompoundDrawablesAndPaddingSet_shouldSetCompoundDrawableAttributes() {
AttributeSet attributeSet = Robolectric.buildAttributeSet()
.addAttribute(android.R.attr.drawableLeft, DRAWABLE_UBER_BADGE)
.addAttribute(android.R.attr.drawableTop, DRAWABLE_UBER_BADGE)
.addAttribute(android.R.attr.drawableRight, DRAWABLE_UBER_BADGE)
.addAttribute(android.R.attr.drawableBottom, DRAWABLE_UBER_BADGE)
.addAttribute(android.R.attr.drawablePadding, ONE_SP)
.build();

UberButton uberButton = new UberButton(context, attributeSet, 0, 0) { };
Drawable[] drawables = uberButton.getCompoundDrawables();
assertNotNull(drawables[0]);
assertNotNull(drawables[1]);
assertNotNull(drawables[2]);
assertNotNull(drawables[3]);
assertEquals(1, uberButton.getCompoundDrawablePadding());
}

Expand Down
3 changes: 0 additions & 3 deletions rides-android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,5 @@
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<application>
<activity android:name=".RideRequestActivity"
android:exported="false"
android:screenOrientation="portrait"/>
</application>
</manifest>

This file was deleted.

This file was deleted.

Loading