This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- You can change the parent around to whatever you normally use --> | |
<style name="DebugColors" parent="Theme.AppCompat"> | |
<!-- System colors --> | |
<item name="android:windowBackground">@color/__debugWindowBackground</item> | |
<item name="android:colorPressedHighlight">#FF4400</item> | |
<item name="android:colorLongPressedHighlight">#FF0044</item> | |
<item name="android:colorFocusedHighlight">#44FF00</item> | |
<item name="android:colorActivatedHighlight">#00FF44</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.avs.express.android.interactor.common; | |
/** | |
* Базовый класс репозитория | |
*/ | |
public class BaseRepository { | |
private ConnectionQualityProvider connectionQualityProvider; | |
public BaseRepository(ConnectionQualityProvider connectionQualityProvider) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Осуществляет гибридный запрос, в методе происходит объединение данных приходящих с сервера и из кеша | |
* | |
* @param cacheRequest запрос к кешу | |
* @param networkRequestCreator функция, которая должна вернуть запрос к серверу, | |
* Integer параметр этой функции определяет {@link QueryMode} | |
* @param <T> тип возвращаемого значения | |
*/ | |
protected <T> Observable<T> hybridQuery(Observable<T> cacheRequest, | |
Func1<Integer, Observable<T>> networkRequestCreator) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.content.pm.PackageInfo; | |
import android.content.pm.PackageManager; | |
import android.content.pm.PackageManager.NameNotFoundException; | |
import android.content.pm.Signature; | |
public class TamperCheck { | |
//we store the hash of the signture for a little more protection | |
private static final String APP_SIGNATURE = "1038C0E34658923C4192E61B16846"; |