Skip to content

Commit

Permalink
Merge with upstream project on 06.04.2018
Browse files Browse the repository at this point in the history
  • Loading branch information
dwi336 committed Apr 8, 2018
1 parent 7ff6508 commit ec6c2e2
Show file tree
Hide file tree
Showing 26 changed files with 107 additions and 82 deletions.
2 changes: 1 addition & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<classpathentry kind="con" path="org.eclipse.andmore.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="org.eclipse.andmore.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="org.eclipse.andmore.DEPENDENCIES"/>
<classpathentry kind="lib" path="/home/didi/Android/Sdk/tools/lib/guava-18.0.jar"/>
<classpathentry kind="lib" path="/home/didi/Android/Sdk/tools/lib/guava-20.0.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Eleven music player (CyanogenMod/LineageOS) - compatible with Android version >1
Copied from https://github.com/LineageOS/android_packages_apps_Eleven/archive/cm-14.1.zip (03.08.2017)

Moved to lineage-15.1 branch.
Merged with upstream project on 10.03.2018
Merged with upstream project on 06.04.2018

Made compatibility changes for android version >14 using as much material design as possible

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.1.0'
}
}

Expand Down
33 changes: 0 additions & 33 deletions res/anim/fade_out.xml

This file was deleted.

5 changes: 2 additions & 3 deletions res/layout-v21/artist_detail_album.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
android:layout_width="156dp"
android:layout_height="222dp"
android:layout_marginRight="8dp"
android:paddingBottom="8dp"
android:foreground="@drawable/selectable_background"
android:elevation="3dp"
card_view:cardElevation="4dp"
card_view:cardCornerRadius="2dp"
card_view:cardCornerRadius="4dp"
card_view:cardBackgroundColor="@color/cards_bg_color">

<RelativeLayout
Expand All @@ -47,7 +46,7 @@
android:layout_alignParentRight="true"
android:layout_marginBottom="1dp"
android:gravity="center_vertical"
card_view:srcCompat="@drawable/menu_button_light" />
card_view:srcCompat="@drawable/menu_button" />

<LinearLayout
android:layout_width="match_parent"
Expand Down
8 changes: 5 additions & 3 deletions res/layout-v21/grid_items_normal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
card_view:cardElevation="4dp"
card_view:cardCornerRadius="2dp"
card_view:cardCornerRadius="4dp"
card_view:cardBackgroundColor="@color/cards_bg_color" >

<LinearLayout
Expand Down Expand Up @@ -65,8 +67,8 @@
android:id="@+id/popup_menu_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingRight="@dimen/grid_item_padding_right"
card_view:srcCompat="@drawable/menu_button_light" />
android:layout_marginRight="@dimen/grid_item_padding_right"
card_view:srcCompat="@drawable/menu_button" />

</LinearLayout>

Expand Down
5 changes: 2 additions & 3 deletions res/layout/artist_detail_album.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
android:layout_width="156dp"
android:layout_height="222dp"
android:layout_marginRight="8dp"
android:paddingBottom="8dp"
android:foreground="@drawable/selectable_background"
android:elevation="3dp"
card_view:cardElevation="4dp"
card_view:cardCornerRadius="2dp"
card_view:cardCornerRadius="4dp"
card_view:cardBackgroundColor="@color/cards_bg_color">

<RelativeLayout
Expand All @@ -47,7 +46,7 @@
android:layout_alignParentRight="true"
android:layout_marginBottom="1dp"
android:gravity="center_vertical"
card_view:srcCompat="@drawable/menu_button_light" />
card_view:srcCompat="@drawable/menu_button" />

<LinearLayout
android:layout_width="match_parent"
Expand Down
8 changes: 5 additions & 3 deletions res/layout/grid_items_normal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
card_view:cardElevation="4dp"
card_view:cardCornerRadius="2dp"
card_view:cardCornerRadius="4dp"
card_view:cardBackgroundColor="@color/cards_bg_color" >

<LinearLayout
Expand Down Expand Up @@ -65,8 +67,8 @@
android:id="@+id/popup_menu_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingRight="@dimen/grid_item_padding_right"
card_view:srcCompat="@drawable/menu_button_light" />
android:layout_marginRight="@dimen/grid_item_padding_right"
card_view:srcCompat="@drawable/menu_button" />

</LinearLayout>

Expand Down
66 changes: 66 additions & 0 deletions res/values-ru/plurals.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,80 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Used to indicate the number of artists -->
<plurals name="Nartists">
<item quantity="one"><xliff:g id="count">%d</xliff:g> исполнитель</item>
<item quantity="few"><xliff:g id="count">%d</xliff:g> исполнителя</item>
<item quantity="many"><xliff:g id="count">%d</xliff:g> исполнителей</item>
<item quantity="other"><xliff:g id="count">%d</xliff:g> исполнителей</item>
</plurals>
<!-- Used to indicate the number of albums for an artist -->
<plurals name="Nalbums">
<item quantity="one"><xliff:g id="count">%d</xliff:g> альбом</item>
<item quantity="few"><xliff:g id="count">%d</xliff:g> альбома</item>
<item quantity="many"><xliff:g id="count">%d</xliff:g> альбомов</item>
<item quantity="other"><xliff:g id="count">%d</xliff:g> альбомов</item>
</plurals>
<!-- Used to indicate the number of songs for an album -->
<plurals name="Nsongs">
<item quantity="one"><xliff:g id="count">%d</xliff:g> трек</item>
<item quantity="few"><xliff:g id="count">%d</xliff:g> трека</item>
<item quantity="many"><xliff:g id="count">%d</xliff:g> треков</item>
<item quantity="other"><xliff:g id="count">%d</xliff:g> треков</item>
</plurals>
<!-- Used to indicate the number of genres -->
<plurals name="Ngenres">
<item quantity="one"><xliff:g id="count">%d</xliff:g> жанр</item>
<item quantity="few"><xliff:g id="count">%d</xliff:g> жанра</item>
<item quantity="many"><xliff:g id="count">%d</xliff:g> жанров</item>
<item quantity="other"><xliff:g id="count">%d</xliff:g> жанров</item>
</plurals>
<!-- Used to show a shortened version of hours-->
<plurals name="Nhours">
<item quantity="one"><xliff:g id="hours">%d</xliff:g> ч.</item>
<item quantity="few"><xliff:g id="hours">%d</xliff:g> ч.</item>
<item quantity="many"><xliff:g id="hours">%d</xliff:g>ч.</item>
<item quantity="other"><xliff:g id="hours">%d</xliff:g> ч.</item>
</plurals>
<!-- Used to show a shortened version of minutes -->
<plurals name="Nminutes">
<item quantity="one"><xliff:g id="minutes">%d</xliff:g> мин.</item>
<item quantity="few"><xliff:g id="minutes">%d</xliff:g> мин.</item>
<item quantity="many"><xliff:g id="minutes">%d</xliff:g> мин.</item>
<item quantity="other"><xliff:g id="minutes">%d</xliff:g> мин.</item>
</plurals>
<!-- Toasts after adding song(s) to playlists -->
<plurals name="NNNtrackstoplaylist">
<item quantity="one"><xliff:g id="number" example="1">%d</xliff:g> трек добавлен в плейлист.</item>
<item quantity="few"><xliff:g id="number" example="27">%d</xliff:g> трека добавлены в плейлист.</item>
<item quantity="many"><xliff:g id="number" example="27">%d</xliff:g> треков добавлены в плейлист.</item>
<item quantity="other"><xliff:g id="number" example="27">%d</xliff:g> треков добавлены в плейлист.</item>
</plurals>
<!-- Toasts after removing song(s) from playlists -->
<plurals name="NNNtracksfromplaylist">
<item quantity="one"><xliff:g id="number" example="1">%d</xliff:g> трек удалён из плейлиста.</item>
<item quantity="few"><xliff:g id="number" example="1">%d</xliff:g> трека удалены из плейлиста.</item>
<item quantity="many"><xliff:g id="number" example="1">%d</xliff:g> треков удалены из плейлиста.</item>
<item quantity="other"><xliff:g id="number" example="1">%d</xliff:g> треков удалены из плейлиста.</item>
</plurals>
<!-- Toasts after adding song(s) to queue -->
<plurals name="NNNtrackstoqueue">
<item quantity="one"><xliff:g id="number" example="1">%d</xliff:g> трек добавлен в очередь.</item>
<item quantity="few"><xliff:g id="number" example="27">%d</xliff:g> трека добавлены в очередь.</item>
<item quantity="many"><xliff:g id="number" example="27">%d</xliff:g> треков добавлены в очередь.</item>
<item quantity="other"><xliff:g id="number" example="27">%d</xliff:g> треков добавлены в очередь.</item>
</plurals>
<!-- Toasts after adding song(s) to the favorites list -->
<plurals name="NNNtrackstofavorites">
<item quantity="one"><xliff:g id="number" example="1">%d</xliff:g> трек добавлен в избранное.</item>
<item quantity="few"><xliff:g id="number" example="27">%d</xliff:g> трека добавлены в избранное.</item>
<item quantity="many"><xliff:g id="number" example="27">%d</xliff:g> треков добавлены в избранное.</item>
<item quantity="other"><xliff:g id="number" example="27">%d</xliff:g> треков добавлены в избранное.</item>
</plurals>
<!-- Toast confirming that song(s) was/were deleted. -->
<plurals name="NNNtracksdeleted">
<item quantity="one"><xliff:g id="songs_to_delete" example="1">%d</xliff:g> трек удален.</item>
<item quantity="few"><xliff:g id="songs_to_delete">%d</xliff:g> трека удалены.</item>
<item quantity="many"><xliff:g id="songs_to_delete">%d</xliff:g> треков удалены.</item>
<item quantity="other"><xliff:g id="songs_to_delete">%d</xliff:g> треков удалены.</item>
</plurals>
</resources>
12 changes: 6 additions & 6 deletions res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<color name="primary">#333333</color>
<color name="primary_pressed">#77607D8B</color>
<color name="primary_focused">#cc607D8B</color>
<color name="primary_dark">#282828</color>
<color name="primary_light">#444444</color>
<color name="accent">#009688</color>
<color name="primary_dark">#212121</color>
<color name="primary_light">#424242</color>
<color name="accent">#E91E63</color>

<color name="material_pesto">#00968c</color>

Expand Down Expand Up @@ -53,9 +53,9 @@
<color name="default_text_color_light">@color/white</color>

<!-- Cards -->
<color name="cards_bg_color">#273139</color>
<color name="cardOne">@color/white</color>
<color name="cardTwo">#e0e0e0</color>
<color name="cards_bg_color">#fefefe</color>
<color name="cardOne">@color/black</color>
<color name="cardTwo">#424242</color>

<!-- Transparent colors -->
<color name="transparent">#00000000</color>
Expand Down
8 changes: 4 additions & 4 deletions res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
<!-- List view fast scroll padding right -->
<dimen name="fast_scroll_padding_right">8dp</dimen>
<!-- grid view vertical and horizontal spacing -->
<dimen name="grid_item_horizontal_spacing">2dp</dimen>
<dimen name="grid_item_vertical_spacing">2dp</dimen>
<dimen name="grid_item_horizontal_spacing">8dp</dimen>
<dimen name="grid_item_vertical_spacing">8dp</dimen>
<!-- List item detailed height -->
<dimen name="list_item_detailed_height">128dp</dimen>
<!-- Top margin of "line_two" -->
<dimen name="list_item_line_two_margin_top">8dp</dimen>
<!-- Left padding in the grid text -->
<dimen name="grid_item_padding_left">16dp</dimen>
<dimen name="grid_item_padding_right">16dp</dimen>
<dimen name="grid_item_padding_left">8dp</dimen>
<dimen name="grid_item_padding_right">8dp</dimen>
<!-- Left padding in the grid text -->
<dimen name="grid_bottom_height">44dip</dimen>
<!-- Grid and list item normal height -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public void onCreate(final Bundle savedInstanceState) {

@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
mRootView = inflater.inflate(R.layout.album_art_fragment, null);
mRootView = inflater.inflate(R.layout.album_art_fragment, container, false);
return mRootView;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected int getBucketIndex(String s) {
if (s.isEmpty()) {
return UNKNOWN_BUCKET_INDEX;
}
int index = BUCKETS.indexOf(s.substring(0, 1).toUpperCase());
int index = BUCKETS.indexOf(s.substring(0, 1).toUpperCase(Locale.US));
if (index != -1) {
return index;
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/lineageos/eleven/locale/LocaleSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import java.util.Locale;

public class LocaleSet {
private static final String CHINESE_LANGUAGE = Locale.CHINESE.getLanguage().toLowerCase();
private static final String JAPANESE_LANGUAGE = Locale.JAPANESE.getLanguage().toLowerCase();
private static final String KOREAN_LANGUAGE = Locale.KOREAN.getLanguage().toLowerCase();
private static final String CHINESE_LANGUAGE = Locale.CHINESE.getLanguage().toLowerCase(Locale.US);
private static final String JAPANESE_LANGUAGE = Locale.JAPANESE.getLanguage().toLowerCase(Locale.US);
private static final String KOREAN_LANGUAGE = Locale.KOREAN.getLanguage().toLowerCase(Locale.US);

private static class LocaleWrapper {
private final Locale mLocale;
Expand All @@ -43,7 +43,7 @@ private static boolean isLanguageCJK(String language) {
public LocaleWrapper(Locale locale) {
mLocale = locale;
if (mLocale != null) {
mLanguage = mLocale.getLanguage().toLowerCase();
mLanguage = mLocale.getLanguage().toLowerCase(Locale.US);
mLocaleIsCJK = isLanguageCJK(mLanguage);
} else {
mLanguage = null;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/lineageos/eleven/locale/LocaleUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public static Iterator<String> getPinyinNameLookupKeys(String name) {
}
}

private static final String JAPANESE_LANGUAGE = Locale.JAPANESE.getLanguage().toLowerCase();
private static final String JAPANESE_LANGUAGE = Locale.JAPANESE.getLanguage().toLowerCase(Locale.US);
private static LocaleUtils sSingleton;

private final LocaleSet mLocales;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ public abstract class BaseActivity extends AppCompatActivity implements ServiceC
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Fade it in
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);

// Control the media volume
setVolumeControlStream(AudioManager.STREAM_MUSIC);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ private boolean parseIntentForFragment(Intent intent) {

if (targetFragment != null) {
targetFragment.setArguments(intent.getExtras());
transaction.setCustomAnimations(0, 0, 0, R.anim.fade_out);
// If we ever come back to this because of memory concerns because
// none of the fragments are being removed from memory, we can fix this
// by using "replace" instead of "add". The caveat is that the performance of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,6 @@ protected String getArtistName() {
}
};

// Fade it in
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);

// Control the media volume
setVolumeControlStream(AudioManager.STREAM_MUSIC);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ protected void onCreate(final Bundle savedInstanceState) {
getDelegate().onCreate(savedInstanceState);
super.onCreate(savedInstanceState);

// Fade it in
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);

// Calculate ActionBar height
TypedValue value = new TypedValue();
int height = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void onPopupMenuClicked(View v, int position) {
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
final Bundle savedInstanceState) {
mRootView = (ViewGroup)inflater.inflate(R.layout.grid_base, null);
mRootView = (ViewGroup)inflater.inflate(R.layout.grid_base, container, false);
initGridView();

// Register the music status listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void onPopupMenuClicked(View v, int position) {
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
final Bundle savedInstanceState) {
// The View for the fragment's UI
mRootView = (ViewGroup)inflater.inflate(R.layout.list_base, null);
mRootView = (ViewGroup)inflater.inflate(R.layout.list_base, container, false);
initListView();

// Register the music status listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void onActivityCreated(Bundle savedInstanceState) {
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
final Bundle savedInstanceState) {
// The View for the fragment's UI
mRootView = (ViewGroup) inflater.inflate(R.layout.activity_player_fragment, null);
mRootView = (ViewGroup) inflater.inflate(R.layout.activity_player_fragment, container, true);

// Header title values
initHeaderBar();
Expand Down
Loading

0 comments on commit ec6c2e2

Please sign in to comment.