universal7885: Add Material you reworked FM app
* UI and function improvements Change-Id: Ia1ea7aa0caf0ac3838e285952e9be7e79b946e80 Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
|
|
@ -10,15 +10,12 @@ android_app {
|
|||
static_libs: [
|
||||
"androidx.core_core",
|
||||
"androidx.appcompat_appcompat",
|
||||
"de.yanndroid.oneui",
|
||||
"com.google.android.material_material",
|
||||
],
|
||||
required: [
|
||||
"privapp_whitelist_com.eurekateam.fmradio.xml",
|
||||
"vendor.eureka.hardware.fmradio@1.2-service",
|
||||
],
|
||||
optimize: {
|
||||
proguard_flags_files: ["rules.pro"],
|
||||
},
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
|
|
|
|||
|
|
@ -1,26 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.eurekateam.fmradio"
|
||||
android:sharedUserId="android.uid.system">
|
||||
|
||||
android:sharedUserId="android.uid.system"
|
||||
package="com.eurekateam.fmradio">
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
|
||||
<application
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/OneUI4Theme">
|
||||
<activity
|
||||
android:name=".ErrorHandler"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.HEADSET_PLUG"/>
|
||||
<action android:name="com.eurekateam.fmradio.RADIO.IO" />
|
||||
<action android:name="com.eurekateam.fmradio.TRACKS" />
|
||||
<action android:name="com.eurekateam.fmradio.NO_HEADPHONE" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
android:theme="@style/Theme.Material3.DayNight.NoActionBar">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
|
|
@ -39,7 +26,6 @@
|
|||
<action android:name="com.eurekateam.fmradio.NEXT"/>
|
||||
<action android:name="com.eurekateam.fmradio.BEFORE"/>
|
||||
<action android:name="com.eurekateam.fmradio.QUIT"/>
|
||||
<action android:name="com.eurekateam.fmradio.STOPBG"/>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include <cerrno>
|
||||
#include <iostream>
|
||||
#include "s610_radio.h"
|
||||
#include "kernel_internal.h"
|
||||
#include "v4l2_api.h"
|
||||
#include <algorithm>
|
||||
#include <jni.h>
|
||||
#include <hardware/hardware.h>
|
||||
|
|
@ -452,7 +452,8 @@ extern "C"
|
|||
JNIEXPORT jint JNICALL
|
||||
Java_com_eurekateam_fmradio_NativeFMInterface_getBeforeChannel
|
||||
(__unused JNIEnv *env, __unused jobject thiz, jint fd) {
|
||||
long ret;sp<IFMRadio> service = IFMRadio::getService();
|
||||
long ret;
|
||||
sp<IFMRadio> service = IFMRadio::getService();
|
||||
bool mSysfs = service->isAvailable() == Status::YES;
|
||||
if (!mSysfs){
|
||||
fm_radio_channel_searching(fd, 0, 0, FM_CHANNEL_SPACING_100KHZ, &ret);
|
||||
|
|
@ -492,3 +493,10 @@ Java_com_eurekateam_fmradio_NativeFMInterface_closeFMDevice
|
|||
(__unused JNIEnv *env, __unused jobject thiz, jint fd) {
|
||||
close(fd);
|
||||
}
|
||||
extern "C"
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_com_eurekateam_fmradio_NativeFMInterface_getSysfsSupport
|
||||
(__unused JNIEnv *env, __unused jobject thiz) {
|
||||
sp<IFMRadio> service = IFMRadio::getService();
|
||||
return service->isAvailable() == Status::YES;
|
||||
}
|
||||
|
|
|
|||
BIN
universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_close.png
Normal file
|
After Width: | Height: | Size: 228 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_error.png
Normal file
|
After Width: | Height: | Size: 296 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_first.png
Normal file
|
After Width: | Height: | Size: 209 B |
|
After Width: | Height: | Size: 289 B |
|
After Width: | Height: | Size: 506 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_last.png
Normal file
|
After Width: | Height: | Size: 206 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_list.png
Normal file
|
After Width: | Height: | Size: 126 B |
|
After Width: | Height: | Size: 349 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_pause.png
Normal file
|
After Width: | Height: | Size: 123 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_play.png
Normal file
|
After Width: | Height: | Size: 225 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_power.png
Normal file
|
After Width: | Height: | Size: 641 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_radio.png
Normal file
|
After Width: | Height: | Size: 466 B |
|
After Width: | Height: | Size: 515 B |
|
After Width: | Height: | Size: 294 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-hdpi/ic_star.png
Normal file
|
After Width: | Height: | Size: 794 B |
|
After Width: | Height: | Size: 543 B |
|
After Width: | Height: | Size: 211 B |
|
After Width: | Height: | Size: 425 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_close.png
Normal file
|
After Width: | Height: | Size: 180 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_error.png
Normal file
|
After Width: | Height: | Size: 226 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_first.png
Normal file
|
After Width: | Height: | Size: 162 B |
|
After Width: | Height: | Size: 226 B |
|
After Width: | Height: | Size: 354 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_last.png
Normal file
|
After Width: | Height: | Size: 161 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_list.png
Normal file
|
After Width: | Height: | Size: 116 B |
|
After Width: | Height: | Size: 245 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_pause.png
Normal file
|
After Width: | Height: | Size: 104 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_play.png
Normal file
|
After Width: | Height: | Size: 183 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_power.png
Normal file
|
After Width: | Height: | Size: 441 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_radio.png
Normal file
|
After Width: | Height: | Size: 341 B |
|
After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 224 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-mdpi/ic_star.png
Normal file
|
After Width: | Height: | Size: 505 B |
|
After Width: | Height: | Size: 378 B |
|
After Width: | Height: | Size: 168 B |
|
After Width: | Height: | Size: 295 B |
|
After Width: | Height: | Size: 273 B |
|
After Width: | Height: | Size: 317 B |
|
After Width: | Height: | Size: 219 B |
|
After Width: | Height: | Size: 310 B |
|
After Width: | Height: | Size: 568 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_last.png
Normal file
|
After Width: | Height: | Size: 220 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_list.png
Normal file
|
After Width: | Height: | Size: 111 B |
|
After Width: | Height: | Size: 415 B |
|
After Width: | Height: | Size: 109 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_play.png
Normal file
|
After Width: | Height: | Size: 265 B |
|
After Width: | Height: | Size: 793 B |
|
After Width: | Height: | Size: 541 B |
|
After Width: | Height: | Size: 654 B |
|
After Width: | Height: | Size: 314 B |
BIN
universal7885-common/apps/FMRadio/res/drawable-xhdpi/ic_star.png
Normal file
|
After Width: | Height: | Size: 1 KiB |
|
After Width: | Height: | Size: 706 B |
|
After Width: | Height: | Size: 271 B |
|
After Width: | Height: | Size: 520 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 458 B |
|
After Width: | Height: | Size: 303 B |
|
After Width: | Height: | Size: 469 B |
|
After Width: | Height: | Size: 930 B |
|
After Width: | Height: | Size: 302 B |
|
After Width: | Height: | Size: 154 B |
|
After Width: | Height: | Size: 636 B |
|
After Width: | Height: | Size: 143 B |
|
After Width: | Height: | Size: 360 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 825 B |
|
After Width: | Height: | Size: 958 B |
|
After Width: | Height: | Size: 491 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1 KiB |
|
After Width: | Height: | Size: 352 B |
|
After Width: | Height: | Size: 842 B |
|
After Width: | Height: | Size: 442 B |
|
After Width: | Height: | Size: 524 B |
|
After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 538 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 839 B |
|
After Width: | Height: | Size: 127 B |
|
After Width: | Height: | Size: 437 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 519 B |
|
After Width: | Height: | Size: 2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 524 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@android:color/system_accent1_200"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108"
|
||||
android:tint="#FFFFFF">
|
||||
<group android:scaleX="2.1924"
|
||||
android:scaleY="2.1924"
|
||||
android:translateX="27.6912"
|
||||
android:translateY="27.6912">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M3.24,6.15C2.51,6.43 2,7.17 2,8v12c0,1.1 0.89,2 2,2h16c1.11,0 2,-0.9 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2L8.3,6l8.26,-3.34L15.88,1 3.24,6.15zM7,20c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM20,12h-2v-2h-2v2L4,12L4,8h16v4z"/>
|
||||
</group>
|
||||
</vector>
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape
|
||||
android:shape="line">
|
||||
<stroke
|
||||
android:color="@android:color/system_accent1_500"
|
||||
android:width="@dimen/seek_bar_thickness"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/secondaryProgress">
|
||||
<clip>
|
||||
<shape
|
||||
android:shape="line">
|
||||
<stroke
|
||||
android:color="@android:color/system_accent1_200"
|
||||
android:width="@dimen/seek_bar_thickness"/>
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape
|
||||
android:shape="line">
|
||||
<stroke
|
||||
android:color="@android:color/system_accent1_300"
|
||||
android:width="@dimen/seek_bar_thickness"/>
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size
|
||||
android:height="@dimen/seek_bar_thumb_size"
|
||||
android:width="@dimen/seek_bar_thumb_size"
|
||||
/>
|
||||
<solid android:color="@android:color/system_accent2_500"/>
|
||||
</shape>
|
||||
|
Before Width: | Height: | Size: 452 B |
|
|
@ -1,12 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24.0dp"
|
||||
android:height="24.0dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11,2h2v10h-2z"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M18.37,5.64l-1.41,1.41c2.73,2.73 2.72,7.16 -0.01,9.89c-2.73,2.73 -7.17,2.73 -9.89,0.01c-2.73,-2.73 -2.74,-7.18 -0.01,-9.91L5.64,5.64c-3.51,3.51 -3.51,9.21 0.01,12.73c3.51,3.51 9.21,3.51 12.72,-0.01C21.88,14.85 21.88,9.16 18.37,5.64z"/>
|
||||
</vector>
|
||||