Skip to content

Commit

Permalink
Merge pull request #89 from StepicOrg/release/1.41
Browse files Browse the repository at this point in the history
Release/1.41
  • Loading branch information
KirillMakarov authored Aug 24, 2017
2 parents 5505fef + afebd22 commit 401080f
Show file tree
Hide file tree
Showing 327 changed files with 3,777 additions and 3,209 deletions.
37 changes: 22 additions & 15 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ apply plugin: 'kotlin-android-extensions'
def globalConf = rootProject.ext
android {

compileSdkVersion 25
buildToolsVersion "25.0.1"
compileSdkVersion 26
buildToolsVersion "26.0.1"

signingConfigs {
debug {
Expand Down Expand Up @@ -36,9 +36,10 @@ android {
applicationId "org.stepic.droid"
minSdkVersion rootProject.androidMinSdkVersion
targetSdkVersion rootProject.androidTargetSdkVersion
versionCode 165
versionName "1.39"
versionCode 168
versionName "1.41.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}

flavorDimensions "type", "instance"
Expand Down Expand Up @@ -154,18 +155,18 @@ dependencies {
provided 'org.glassfish:javax.annotation:10.0-b28'
//needed to resolve compilation errors, thanks to tutplus.org for finding the dependency

compile 'com.jakewharton:butterknife:8.5.1'
kapt 'com.jakewharton:butterknife-compiler:8.5.1'
compile 'com.jakewharton:butterknife:8.8.1'
kapt 'com.jakewharton:butterknife-compiler:8.8.1'
//</DI>

compile 'com.google.code.gson:gson:2.7'

compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'de.hdodenhof:circleimageview:2.1.0'

compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.android.support:recyclerview-v7:25.0.1'
compile 'com.android.support:cardview-v7:25.0.1'
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.android.support:recyclerview-v7:26.0.1'
compile 'com.android.support:cardview-v7:26.0.1'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'

compile 'joda-time:joda-time:2.8'
Expand Down Expand Up @@ -202,9 +203,9 @@ dependencies {

compile 'com.github.chrisbanes:PhotoView:1.3.1'

compile('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.10.2@aar') {
transitive = true
}
compile 'com.github.h6ah4i:android-advancedrecyclerview:feature~support_libraries_v26-SNAPSHOT'

compile 'com.android.support.constraint:constraint-layout:1.0.2'

compile project(':androidsvg')

Expand All @@ -214,14 +215,20 @@ dependencies {
//add echo player for video (change playback speed supported)
compile 'com.google.android.exoplayer:exoplayer-core:r2.4.1'

oldReleaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.2'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.2'
androidTestCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.2'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.2'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.2'

// Required -- JUnit 4 framework
testCompile 'junit:junit:4.12'
// Optional -- Mockito framework
testCompile 'org.mockito:mockito-core:2.7.21'

androidTestCompile 'org.hamcrest:hamcrest-library:1.3'

androidTestCompile 'com.android.support:support-annotations:25.3.1'
androidTestCompile 'com.android.support:support-annotations:26.0.1'

androidTestCompile('com.android.support.test:runner:0.5') {
exclude group: 'com.android.support'
Expand Down
7 changes: 6 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,9 @@
#keep configs names
-keep class org.stepic.droid.configuration.** { *; }
-keep interface org.stepic.droid.configuration.** { *; }
-dontwarn org.stepic.droid.configuration.**
-dontwarn org.stepic.droid.configuration.**

#BottomNavigationHelper uses reflection for changing this field (watch support updates for removing the reflection)
-keepclassmembers class android.support.design.internal.BottomNavigationMenuView {
boolean mShiftingMode;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


import android.support.test.espresso.ViewInteraction;
import android.support.test.espresso.contrib.DrawerActions;
import android.support.test.filters.LargeTest;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
Expand Down Expand Up @@ -55,8 +54,8 @@ public void loginActivityTest() {
onView(withId(R.id.loginButton))
.perform(scrollTo(), click());

onView(withId(R.id.drawer))
.perform(DrawerActions.open());
// onView(withId(R.id.drawer))
// .perform(DrawerActions.open());

ViewInteraction checkedTextView = onView(
allOf(withId(R.id.design_menu_item_text),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ class LaunchActivity : BackToExitActivityBase(), LoginView {
}

if (VKSdk.onActivityResult(requestCode, resultCode, data, object : VKCallback<VKAccessToken> {
override fun onResult(res: VKAccessToken) {
loginPresenter.loginWithNativeProviderCode(res.accessToken, SocialManager.SocialType.vk)
override fun onResult(result: VKAccessToken) {
loginPresenter.loginWithNativeProviderCode(result.accessToken, SocialManager.SocialType.vk, result.email)
}

override fun onError(error: VKError) {
Expand Down Expand Up @@ -323,7 +323,7 @@ class LaunchActivity : BackToExitActivityBase(), LoginView {

override fun onBackPressed() {
val fromMainFeed = intent?.extras?.getBoolean(AppConstants.FROM_MAIN_FEED_FLAG) ?: false
val index = intent?.extras?.getInt(MainFeedActivity.KEY_CURRENT_INDEX) ?: MainFeedActivity.DEFAULT_START_INDEX
val index = intent?.extras?.getInt(MainFeedActivity.currentIndexKey) ?: MainFeedActivity.defaultIndex

if (fromMainFeed) {
screenManager.showMainFeed(this, index)
Expand Down
25 changes: 20 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
android:manageSpaceActivity=".ui.activities.StoreManagementActivity"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="false"
android:theme="@style/AppTheme"
android:theme="@style/StepikTheme"
tools:replace="allowBackup, supportsRtl">

<meta-data
Expand Down Expand Up @@ -60,7 +60,7 @@
<activity
android:name="org.stepic.droid.ui.activities.LaunchActivity"
android:launchMode="singleTask"
android:theme="@style/AppTheme.LoginLaunchRegistration">
android:theme="@style/StepikTheme.LoginLaunchRegistration">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>

Expand All @@ -77,16 +77,17 @@

<activity
android:name="org.stepic.droid.ui.activities.RegisterActivity"
android:theme="@style/AppTheme.LoginLaunchRegistration"/>
android:theme="@style/StepikTheme.LoginLaunchRegistration"/>

<activity
android:name="org.stepic.droid.ui.activities.LoginActivity"
android:launchMode="singleTop"
android:theme="@style/AppTheme.LoginLaunchRegistration"/>
android:theme="@style/StepikTheme.LoginLaunchRegistration"/>

<activity
android:name="org.stepic.droid.ui.activities.MainFeedActivity"
android:launchMode="singleTask">
android:launchMode="singleTask"
android:windowSoftInputMode="adjustPan">
<meta-data
android:name="android.app.default_searchable"
android:value=".ui.activities.CourseSearchResultActivity"/>
Expand Down Expand Up @@ -379,6 +380,20 @@
</intent-filter>
</activity>

<activity
android:name=".ui.activities.NotificationsActivity">
</activity>

<activity
android:name=".ui.activities.DownloadsActivity">
</activity>


<activity
android:name=".ui.activities.CertificatesActivity">
</activity>


<receiver
android:name=".receivers.BootCompletedReceiver"
android:enabled="true"
Expand Down
Binary file added app/src/main/assets/fonts/Roboto-Light.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions app/src/main/java/org/stepic/droid/analytic/Analytic.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ interface Error {
String NO_VIDEO_ON_STEP_SHOWING = "illegal_state_video_no_video";
String CANT_PARSE_QUALITY = "cant_parse_quality";
String JOIN_FAILED = "error_join_failed"; //#Apps-580
String UNIT_CACHED_LESSON_NO = "error_unit_cached_lesson_not";
}

interface Web {
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/java/org/stepic/droid/base/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.content.Context
import com.facebook.FacebookSdk
import com.facebook.appevents.AppEventsLogger
import com.facebook.stetho.Stetho
import com.squareup.leakcanary.LeakCanary
import com.vk.sdk.VKSdk
import com.yandex.metrica.YandexMetrica
import org.stepic.droid.BuildConfig
Expand Down Expand Up @@ -50,6 +51,12 @@ class App : Application() {

override fun onCreate() {
super.onCreate()
if (LeakCanary.isInAnalyzerProcess(this)) {
// This process is dedicated to LeakCanary for heap analysis.
// You should not init your app in this process.
return
}
LeakCanary.install(this)
init()
}

Expand Down
Loading

0 comments on commit 401080f

Please sign in to comment.