forked from andixlm/android_build-tools
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
312 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,3 +199,36 @@ index 25a77d0..3881994 100644 | |
-- | ||
1.9.3 (Apple Git-50) | ||
|
||
|
||
From bf53c48383092b0de7f7e15958511f70b218074b Mon Sep 17 00:00:00 2001 | ||
From: Pawit Pornkitprasan <[email protected]> | ||
Date: Wed, 10 Dec 2014 17:38:10 +0700 | ||
Subject: [PATCH 6/6] AudioFlinger: i9082: HACK: force audio to 48 KHz | ||
|
||
Let surfaceflinger do all the resampling instead of the audio HAL | ||
|
||
Don't know if it fixes anything, but worth a try | ||
|
||
Change-Id: I0113831464f2f64c26a9c93bba8fe6b8229b09b4 | ||
--- | ||
services/audioflinger/AudioFlinger.cpp | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp | ||
index 3881994..036b6c9 100644 | ||
--- a/services/audioflinger/AudioFlinger.cpp | ||
+++ b/services/audioflinger/AudioFlinger.cpp | ||
@@ -2236,8 +2236,9 @@ sp<AudioFlinger::RecordThread> AudioFlinger::openInput_l(audio_module_handle_t m | ||
audio_stream_in_t *inStream = NULL; | ||
|
||
#ifdef CAPRI_HWC | ||
- ALOGD("Forcing channel mask to mono on capri"); | ||
+ ALOGD("Forcing input to mono 48K on capri"); | ||
halconfig.channel_mask = AUDIO_CHANNEL_IN_MONO; | ||
+ halconfig.sample_rate = 48000; | ||
#endif | ||
|
||
status_t status = inHwHal->open_input_stream(inHwHal, *input, device, &halconfig, | ||
-- | ||
1.9.3 (Apple Git-50) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,237 @@ | ||
From 183cb6af393196fbb55191311a3e84299c766903 Mon Sep 17 00:00:00 2001 | ||
From: Pawit Pornkitprasan <[email protected]> | ||
Date: Wed, 10 Dec 2014 12:13:16 +0700 | ||
Subject: [PATCH] HACK: use values-330dp for values | ||
|
||
Fixes crash until proper fix comes out | ||
|
||
Change-Id: I0e8e9c3cc141ce943cf601df7f8480ae7743a892 | ||
--- | ||
res/layout/music_main.xml | 195 ++++++++++++++++++++++++++++++++-------------- | ||
1 file changed, 138 insertions(+), 57 deletions(-) | ||
|
||
diff --git a/res/layout/music_main.xml b/res/layout/music_main.xml | ||
index ffedd23..da5334f 100644 | ||
--- a/res/layout/music_main.xml | ||
+++ b/res/layout/music_main.xml | ||
@@ -15,79 +15,160 @@ | ||
--> | ||
|
||
<LinearLayout | ||
- xmlns:android="http://schemas.android.com/apk/res/android" | ||
- xmlns:custom="http://schemas.android.com/apk/res/org.cyanogenmod.audiofx" | ||
- android:orientation="vertical" | ||
- android:layout_width="match_parent" | ||
- android:layout_height="match_parent"> | ||
+ xmlns:android="http://schemas.android.com/apk/res/android" | ||
+ xmlns:custom="http://schemas.android.com/apk/res/org.cyanogenmod.audiofx" | ||
+ android:orientation="vertical" | ||
+ android:layout_width="match_parent" | ||
+ android:layout_height="match_parent"> | ||
|
||
<TextView | ||
- android:id="@+id/noEffectsTextView" | ||
- android:layout_width="wrap_content" | ||
- android:layout_height="wrap_content" | ||
- android:textAppearance="?android:attr/textAppearanceLarge" | ||
- android:ellipsize="marquee" | ||
- android:fadingEdge="horizontal" | ||
- android:layout_gravity="center" | ||
- android:gravity="center" | ||
- android:text="@string/no_effects" | ||
- android:layout_weight="1" | ||
- android:visibility="gone" /> | ||
+ android:id="@+id/noEffectsTextView" | ||
+ android:layout_width="wrap_content" | ||
+ android:layout_height="wrap_content" | ||
+ android:textAppearance="?android:attr/textAppearanceLarge" | ||
+ android:ellipsize="marquee" | ||
+ android:fadingEdge="horizontal" | ||
+ android:layout_gravity="center" | ||
+ android:gravity="center" | ||
+ android:text="@string/no_effects" | ||
+ android:layout_weight="1" | ||
+ android:visibility="gone"/> | ||
|
||
<org.cyanogenmod.audiofx.widget.InterceptableLinearLayout | ||
- android:id="@+id/contentSoundEffects" | ||
- android:orientation="vertical" | ||
- android:layout_width="match_parent" | ||
- android:layout_height="match_parent" | ||
- android:layout_marginTop="48dip"> | ||
+ android:id="@+id/contentSoundEffects" | ||
+ android:orientation="vertical" | ||
+ android:layout_width="match_parent" | ||
+ android:layout_weight="1" | ||
+ android:layout_height="0dp"> | ||
+ | ||
+ <include | ||
+ layout="@layout/equalizer" | ||
+ android:layout_width="match_parent" | ||
+ android:layout_height="0dip" | ||
+ android:layout_weight="2"/> | ||
+ | ||
+ <View | ||
+ android:layout_width="match_parent" | ||
+ android:layout_height="20dp" | ||
+ android:background="#cc191919" | ||
+ /> | ||
+ | ||
+ <TextView | ||
+ android:id="@+id/eq_preset_label" | ||
+ android:layout_width="match_parent" | ||
+ android:layout_height="wrap_content" | ||
+ android:textColor="#ff808080" | ||
+ android:layout_gravity="center" | ||
+ android:gravity="center" | ||
+ android:textSize="10sp" | ||
+ android:background="#cc191919" | ||
+ android:text="@string/eq_preset" | ||
+ android:textAllCaps="true"/> | ||
|
||
<org.cyanogenmod.audiofx.widget.Gallery | ||
- android:id="@+id/eqPresets" | ||
- android:layout_width="match_parent" | ||
- android:layout_height="0dip" | ||
- android:layout_weight="11" | ||
- android:padding="0dip" | ||
- android:fadingEdgeLength="70dip" | ||
- android:requiresFadingEdge="horizontal" | ||
- android:gravity="center_vertical" | ||
- android:background="@drawable/preset_bar" /> | ||
+ android:id="@+id/eqPresets" | ||
+ android:layout_width="match_parent" | ||
+ android:layout_height="48dip" | ||
+ android:background="#cc191919" | ||
+ android:gravity="center_vertical"/> | ||
|
||
|
||
- <include layout="@layout/equalizer" | ||
- android:layout_width="match_parent" | ||
- android:layout_height="0dip" | ||
- android:layout_weight="26" /> | ||
+ <View | ||
+ android:layout_width="match_parent" | ||
+ android:layout_height="20dp" | ||
+ /> | ||
+ | ||
+ <!--<FrameLayout--> | ||
+ <!--android:layout_width="match_parent"--> | ||
+ <!--android:layout_height="0dip"--> | ||
+ <!--android:layout_weight="23">--> | ||
+ | ||
+ <!--<com.pheelicks.visualizer.VisualizerView--> | ||
+ <!--android:id="@+id/visualizerView"--> | ||
+ <!--android:layout_width="match_parent"--> | ||
+ <!--android:layout_height="match_parent">--> | ||
+ <!--</com.pheelicks.visualizer.VisualizerView>--> | ||
+ | ||
+ <!--<LinearLayout--> | ||
+ <!--android:layout_width="match_parent"--> | ||
+ <!--android:layout_height="0dp"--> | ||
+ <!--android:orientation="vertical"--> | ||
+ <!--android:layout_weight="1">--> | ||
|
||
<LinearLayout | ||
- android:layout_width="match_parent" | ||
- android:layout_height="0dip" | ||
- android:layout_weight="23" | ||
- android:gravity="center" | ||
- android:orientation="horizontal"> | ||
+ android:layout_width="match_parent" | ||
+ android:layout_height="wrap_content" | ||
+ android:gravity="center" | ||
+ android:orientation="horizontal"> | ||
+ | ||
+ <Space | ||
+ android:layout_weight="1" | ||
+ android:layout_width="0dp" | ||
+ android:layout_height="match_parent" | ||
+ /> | ||
|
||
<org.cyanogenmod.audiofx.widget.Knob | ||
- android:id="@+id/bBStrengthKnob" | ||
- android:layout_width="wrap_content" | ||
- android:layout_height="wrap_content" | ||
- custom:label="@string/bass_boost_strength" | ||
- custom:foreground="@drawable/knob" /> | ||
+ android:id="@+id/bBStrengthKnob" | ||
+ android:layout_width="wrap_content" | ||
+ android:layout_height="wrap_content" | ||
+ custom:label="@string/bass_boost_strength" | ||
+ custom:foreground="@drawable/knob_large"/> | ||
+ | ||
+ <Space | ||
+ android:layout_weight="2" | ||
+ android:layout_width="0dp" | ||
+ android:layout_height="match_parent" | ||
+ /> | ||
|
||
<org.cyanogenmod.audiofx.widget.Knob | ||
- android:id="@+id/vIStrengthKnob" | ||
- android:layout_width="wrap_content" | ||
- android:layout_height="wrap_content" | ||
- android:layout_marginStart="10dip" | ||
- custom:label="@string/virtualizer_strength" | ||
- custom:foreground="@drawable/knob" /> | ||
+ android:id="@+id/vIStrengthKnob" | ||
+ android:layout_width="wrap_content" | ||
+ android:layout_height="wrap_content" | ||
+ android:layout_marginStart="10dip" | ||
+ custom:label="@string/virtualizer_strength" | ||
+ custom:foreground="@drawable/knob_large"/> | ||
+ | ||
+ <Space | ||
+ android:layout_weight="1" | ||
+ android:layout_width="0dp" | ||
+ android:layout_height="match_parent" | ||
+ /> | ||
</LinearLayout> | ||
|
||
- <Spinner android:id="@+id/prSpinner" | ||
- android:layout_width="fill_parent" | ||
- android:layout_height="wrap_content" | ||
- android:layout_gravity="bottom" | ||
- android:minHeight="?android:attr/listPreferredItemHeight" | ||
- android:drawSelectorOnTop="true" | ||
- /> | ||
+ | ||
+ <!--<View--> | ||
+ <!--android:layout_width="match_parent"--> | ||
+ <!--android:layout_height="1dp"--> | ||
+ <!--android:background="@color/disabled"/>--> | ||
+ | ||
+ <View | ||
+ android:layout_width="match_parent" | ||
+ android:layout_height="20dp" | ||
+ /> | ||
+ | ||
+ <TextView | ||
+ android:id="@+id/reverb_label" | ||
+ android:layout_width="match_parent" | ||
+ android:layout_height="wrap_content" | ||
+ android:textColor="#ff808080" | ||
+ android:layout_gravity="center" | ||
+ android:gravity="center" | ||
+ android:background="#cc191919" | ||
+ android:paddingTop="8dp" | ||
+ android:textSize="10sp" | ||
+ android:text="@string/reverb" | ||
+ android:textAllCaps="true"/> | ||
+ | ||
+ | ||
+ <org.cyanogenmod.audiofx.widget.Gallery | ||
+ android:id="@+id/reverb_gallery" | ||
+ android:layout_width="match_parent" | ||
+ android:layout_height="40dip" | ||
+ android:background="#cc191919" | ||
+ android:gravity="center_vertical"/> | ||
+ | ||
+ | ||
+ <!--</FrameLayout>--> | ||
|
||
</org.cyanogenmod.audiofx.widget.InterceptableLinearLayout> | ||
</LinearLayout> | ||
-- | ||
1.9.3 (Apple Git-50) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
From 982e181bf6c06a1ea40bc799cada20a2bc04b354 Mon Sep 17 00:00:00 2001 | ||
From: Pawit Pornkitprasan <[email protected]> | ||
Date: Wed, 10 Dec 2014 17:35:17 +0700 | ||
Subject: [PATCH] sepolicy: allow system apps to access ASEC | ||
|
||
Required for Settings to show name/icon of apps on sd card | ||
|
||
(permission copied from untrusted_app) | ||
|
||
Change-Id: Ib2b3bee4dfb54ad5e45b392fd9bfd65add4a00bf | ||
--- | ||
sepolicy/sepolicy.mk | 1 + | ||
sepolicy/system_app.te | 3 +++ | ||
2 files changed, 4 insertions(+) | ||
create mode 100644 sepolicy/system_app.te | ||
|
||
diff --git a/sepolicy/sepolicy.mk b/sepolicy/sepolicy.mk | ||
index 1a9b343..d916a04 100644 | ||
--- a/sepolicy/sepolicy.mk | ||
+++ b/sepolicy/sepolicy.mk | ||
@@ -25,6 +25,7 @@ BOARD_SEPOLICY_UNION += \ | ||
su.te \ | ||
sysinit.te \ | ||
system.te \ | ||
+ system_app.te \ | ||
ueventd.te \ | ||
vold.te \ | ||
mac_permissions.xml | ||
diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te | ||
new file mode 100644 | ||
index 0000000..05907f1 | ||
--- /dev/null | ||
+++ b/sepolicy/system_app.te | ||
@@ -0,0 +1,3 @@ | ||
+# ASEC | ||
+allow system_app asec_apk_file:dir { getattr }; | ||
+allow system_app asec_apk_file:file r_file_perms; | ||
-- | ||
1.9.3 (Apple Git-50) | ||
|