Fix notification panel not expanding and added user option to toggle
This commit is contained in:
parent
19c7b826f4
commit
e6fb122796
8 changed files with 30 additions and 13 deletions
|
@ -14,7 +14,7 @@ proguardDictionaries {
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 29
|
compileSdkVersion 29
|
||||||
buildToolsVersion = '29.0.2'
|
buildToolsVersion = '29.0.3'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
|
|
1
app/nofont/release/output.json
Normal file
1
app/nofont/release/output.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":10414,"versionName":"3.4.970_0301","enabled":true,"outputFile":"app-nofont-release.apk","fullName":"nofontRelease","baseName":"nofont-release","dirName":""},"path":"app-nofont-release.apk","properties":{}}]
|
|
@ -170,7 +170,7 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
||||||
registerReceiver(mBroadcastReceiver, mIntentFilter);
|
registerReceiver(mBroadcastReceiver, mIntentFilter);
|
||||||
PreferenceUtil.getInstance(this).registerOnSharedPreferenceChangedListener(this);
|
PreferenceUtil.getInstance(this).registerOnSharedPreferenceChangedListener(this);
|
||||||
|
|
||||||
if (getIntent().hasExtra(EXPAND_PANEL)) {
|
if (getIntent().hasExtra(EXPAND_PANEL) && PreferenceUtil.getInstance(this).isExpandPanel()) {
|
||||||
if (getIntent().getBooleanExtra(EXPAND_PANEL, false)) {
|
if (getIntent().getBooleanExtra(EXPAND_PANEL, false)) {
|
||||||
expandPanel();
|
expandPanel();
|
||||||
getIntent().putExtra(EXPAND_PANEL, false);
|
getIntent().putExtra(EXPAND_PANEL, false);
|
||||||
|
|
|
@ -54,7 +54,7 @@ class PlayingNotificationImpl : PlayingNotification() {
|
||||||
if (isFavorite) R.drawable.ic_favorite_white_24dp else R.drawable.ic_favorite_border_white_24dp
|
if (isFavorite) R.drawable.ic_favorite_white_24dp else R.drawable.ic_favorite_border_white_24dp
|
||||||
|
|
||||||
val action = Intent(service, MainActivity::class.java)
|
val action = Intent(service, MainActivity::class.java)
|
||||||
action.putExtra("expand", true)
|
action.putExtra(MainActivity.EXPAND_PANEL, true)
|
||||||
action.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
action.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||||
val clickIntent =
|
val clickIntent =
|
||||||
PendingIntent.getActivity(service, 0, action, PendingIntent.FLAG_UPDATE_CURRENT)
|
PendingIntent.getActivity(service, 0, action, PendingIntent.FLAG_UPDATE_CURRENT)
|
||||||
|
|
|
@ -73,7 +73,7 @@ class PlayingNotificationOreo : PlayingNotification() {
|
||||||
val notificationLayoutBig = getCombinedRemoteViews(false, song)
|
val notificationLayoutBig = getCombinedRemoteViews(false, song)
|
||||||
|
|
||||||
val action = Intent(service, MainActivity::class.java)
|
val action = Intent(service, MainActivity::class.java)
|
||||||
action.putExtra("expand", true)
|
action.putExtra(MainActivity.EXPAND_PANEL, true)
|
||||||
action.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
action.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||||
|
|
||||||
val clickIntent = PendingIntent
|
val clickIntent = PendingIntent
|
||||||
|
|
|
@ -216,6 +216,7 @@ public final class PreferenceUtil {
|
||||||
|
|
||||||
private static final String FILTER_SONG = "filter_song";
|
private static final String FILTER_SONG = "filter_song";
|
||||||
private static final String TAG = "PreferenceUtil";
|
private static final String TAG = "PreferenceUtil";
|
||||||
|
private static final String EXPAND_NOW_PLAYING_PANEL = "expand_now_playing_panel";
|
||||||
private static PreferenceUtil sInstance;
|
private static PreferenceUtil sInstance;
|
||||||
private final SharedPreferences mPreferences;
|
private final SharedPreferences mPreferences;
|
||||||
|
|
||||||
|
@ -974,4 +975,8 @@ public final class PreferenceUtil {
|
||||||
@NonNull OnSharedPreferenceChangeListener sharedPreferenceChangeListener) {
|
@NonNull OnSharedPreferenceChangeListener sharedPreferenceChangeListener) {
|
||||||
mPreferences.unregisterOnSharedPreferenceChangeListener(sharedPreferenceChangeListener);
|
mPreferences.unregisterOnSharedPreferenceChangeListener(sharedPreferenceChangeListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isExpandPanel() {
|
||||||
|
return mPreferences.getBoolean(EXPAND_NOW_PLAYING_PANEL, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -842,4 +842,6 @@
|
||||||
<string name="amount">Amount</string>
|
<string name="amount">Amount</string>
|
||||||
<string name="note">Note(Optional)</string>
|
<string name="note">Note(Optional)</string>
|
||||||
<string name="start_payment">Start payment</string>
|
<string name="start_payment">Start payment</string>
|
||||||
|
<string name="pref_title_expand_now_playing_panel">Show now playing screen</string>
|
||||||
|
<string name="pref_summary_expand_now_playing_panel">Clicking on the notification will show now playing screen instead of the home screen</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -62,16 +62,25 @@
|
||||||
app:key="toggle_volume"
|
app:key="toggle_volume"
|
||||||
app:summary="@string/pref_summary_toggle_volume"
|
app:summary="@string/pref_summary_toggle_volume"
|
||||||
app:title="@string/pref_title_toggle_volume" />
|
app:title="@string/pref_title_toggle_volume" />
|
||||||
|
|
||||||
|
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
||||||
|
android:layout="@layout/list_item_view_switch"
|
||||||
|
app:defaultValue="false"
|
||||||
|
app:icon="@drawable/ic_volume_up_white_24dp"
|
||||||
|
app:key="expand_now_playing_panel"
|
||||||
|
app:summary="@string/pref_summary_expand_now_playing_panel"
|
||||||
|
app:title="@string/pref_title_expand_now_playing_panel" />
|
||||||
|
|
||||||
|
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESeekBarPreference
|
||||||
|
android:defaultValue="12"
|
||||||
|
android:key="new_blur_amount"
|
||||||
|
android:layout="@layout/list_item_view_seekbar"
|
||||||
|
android:max="25"
|
||||||
|
android:summary="@string/pref_blur_amount_summary"
|
||||||
|
android:title="@string/pref_blur_amount_title"
|
||||||
|
app:icon="@drawable/ic_blur_on_white_24dp"
|
||||||
|
app:showSeekBarValue="true" />
|
||||||
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
|
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESeekBarPreference
|
|
||||||
android:defaultValue="12"
|
|
||||||
android:key="new_blur_amount"
|
|
||||||
android:layout="@layout/list_item_view_seekbar"
|
|
||||||
android:max="25"
|
|
||||||
android:summary="@string/pref_blur_amount_summary"
|
|
||||||
android:title="@string/pref_blur_amount_title"
|
|
||||||
app:icon="@drawable/ic_blur_on_white_24dp"
|
|
||||||
app:showSeekBarValue="true" />
|
|
||||||
|
|
||||||
</androidx.preference.PreferenceScreen>
|
</androidx.preference.PreferenceScreen>
|
Loading…
Reference in a new issue