Skip to content

Commit

Permalink
plugins: Rename plugins and lib
Browse files Browse the repository at this point in the history
  • Loading branch information
HrX03 committed Jun 15, 2020
1 parent 8e6e10f commit 44614f2
Show file tree
Hide file tree
Showing 83 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion AospPanel/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ android_app {
name: "AospPanel",

static_libs: [
"ResMini",
"VolumePluginCommon",
],

resource_dirs: ["res"],
Expand Down
8 changes: 4 additions & 4 deletions AospPanel/res/layout/volume_dialog_aosp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
android:translationZ="@dimen/volume_dialog_elevation"
android:clipToPadding="false"
android:background="@drawable/rounded_bg_full">
<co.potatoproject.systemui.resmini.AlphaOptimizedImageButton
<co.potatoproject.plugin.volume.common.AlphaOptimizedImageButton
android:id="@+id/ringer_icon"
style="@style/VolumeButtons"
android:background="@drawable/rounded_ripple"
Expand Down Expand Up @@ -94,7 +94,7 @@
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:background="@drawable/rounded_bg_bottom_background">
<co.potatoproject.systemui.resmini.ExpandableIndicator
<co.potatoproject.plugin.volume.common.ExpandableIndicator
android:id="@+id/expandable_indicator"
android:layout_width="@dimen/volume_dialog_tap_target_size"
android:layout_height="@dimen/volume_dialog_tap_target_size"
Expand All @@ -111,7 +111,7 @@
android:padding="16dp"
android:rotation="90" />

<co.potatoproject.systemui.resmini.AlphaOptimizedImageButton
<co.potatoproject.plugin.volume.common.AlphaOptimizedImageButton
android:id="@+id/media_output"
android:src="@drawable/ic_bluetooth_audio"
android:layout_width="@dimen/volume_dialog_tap_target_size"
Expand All @@ -138,7 +138,7 @@
android:clipToPadding="false"
android:translationZ="@dimen/volume_dialog_elevation"
android:background="@drawable/rounded_bg_full">
<co.potatoproject.systemui.resmini.CaptionsToggleImageButton
<co.potatoproject.plugin.volume.common.CaptionsToggleImageButton
android:id="@+id/odi_captions_icon"
android:src="@drawable/ic_volume_odi_captions_disabled"
style="@style/VolumeButtons"
Expand Down
2 changes: 1 addition & 1 deletion AospPanel/res/layout/volume_dialog_aosp_row.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
android:rotation="-90" />
</FrameLayout>

<co.potatoproject.systemui.resmini.AlphaOptimizedImageButton
<co.potatoproject.plugin.volume.common.AlphaOptimizedImageButton
android:id="@+id/volume_row_icon"
style="@style/VolumeButtons"
android:layout_width="@dimen/volume_dialog_tap_target_size"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import static android.view.View.VISIBLE;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;

import static co.potatoproject.systemui.resmini.Events.DISMISS_REASON_SETTINGS_CLICKED;
import static co.potatoproject.plugin.volume.common.Events.DISMISS_REASON_SETTINGS_CLICKED;

import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
Expand Down Expand Up @@ -94,7 +94,7 @@
import android.widget.TextView;
import android.widget.Toast;

import co.potatoproject.systemui.resmini.*;
import co.potatoproject.plugin.volume.common.*;

import co.potatoproject.plugin.volume.aosp.R;

Expand Down
4 changes: 2 additions & 2 deletions TogglePanel/Android.bp → CompactPanel/Android.bp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
android_app {

name: "TogglePanel",
name: "CompactPanel",

static_libs: ["ResMini"],
static_libs: ["VolumePluginCommon"],

resource_dirs: ["res"],

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="co.potatoproject.plugin.volume.toggle">
package="co.potatoproject.plugin.volume.compact">

<uses-permission android:name="com.android.systemui.permission.PLUGIN" />

Expand All @@ -32,7 +32,7 @@

<provider
android:name="androidx.lifecycle.ProcessLifecycleOwnerInitializer"
android:authorities="co.potatoproject.plugin.volume.toggle"
android:authorities="co.potatoproject.plugin.volume.compact"
tools:replace="android:authorities"
android:exported="false"
android:multiprocess="true" />
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
android:layout_width="@dimen/volume_dialog_caption_size"
android:layout_height="@dimen/volume_dialog_caption_size"
android:clipToPadding="false">
<co.potatoproject.systemui.resmini.CaptionsToggleImageButton
<co.potatoproject.plugin.volume.common.CaptionsToggleImageButton
android:id="@+id/odi_captions_icon"
android:src="@drawable/ic_volume_odi_captions_disabled"
style="@style/VolumeButtons"
Expand All @@ -122,7 +122,7 @@
android:layout_width="@dimen/volume_dialog_caption_size"
android:layout_height="@dimen/volume_dialog_caption_size"
android:clipToPadding="false">
<co.potatoproject.systemui.resmini.AlphaOptimizedImageButton
<co.potatoproject.plugin.volume.common.AlphaOptimizedImageButton
android:id="@+id/media_output"
android:src="@drawable/ic_bluetooth_audio"
android:layout_width="match_parent"
Expand All @@ -148,7 +148,7 @@
android:layout_width="@dimen/volume_dialog_ringer_size"
android:layout_height="@dimen/volume_dialog_ringer_size"
android:background="@drawable/rounded_bg_full">
<co.potatoproject.systemui.resmini.AlphaOptimizedImageButton
<co.potatoproject.plugin.volume.common.AlphaOptimizedImageButton
android:id="@+id/ringer_icon"
style="@style/VolumeButtons"
android:background="@drawable/rounded_ripple"
Expand All @@ -170,7 +170,7 @@
android:id="@+id/expandable_indicator_container"
android:layout_width="@dimen/volume_dialog_ringer_size"
android:layout_height="@dimen/volume_dialog_ringer_size">
<co.potatoproject.systemui.resmini.ExpandableIndicator
<co.potatoproject.plugin.volume.common.ExpandableIndicator
android:id="@+id/expandable_indicator"
android:layout_width="@dimen/volume_dialog_tap_target_size"
android:layout_height="@dimen/volume_dialog_tap_target_size"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
android:layout_gravity="center"
android:orientation="vertical"
android:animateLayoutChanges="true" >
<co.potatoproject.systemui.resmini.AlphaOptimizedImageButton
<co.potatoproject.plugin.volume.common.AlphaOptimizedImageButton
android:id="@+id/volume_row_icon"
style="@style/VolumeButtons"
android:layout_width="@dimen/volume_dialog_panel_mini_width"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>

<resources>
<string name="plugin_label">Toggle panel</string>
<string name="plugin_label">Compact panel</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package co.potatoproject.plugin.volume.fancy;
package co.potatoproject.plugin.volume.compact;

import static android.app.ActivityManager.LOCK_TASK_MODE_NONE;
import static android.media.AudioManager.RINGER_MODE_NORMAL;
Expand All @@ -30,7 +30,7 @@
import static android.view.View.INVISIBLE;
import static android.view.View.VISIBLE;

import static co.potatoproject.systemui.resmini.Events.DISMISS_REASON_SETTINGS_CLICKED;
import static co.potatoproject.plugin.volume.common.Events.DISMISS_REASON_SETTINGS_CLICKED;

import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
Expand Down Expand Up @@ -94,9 +94,9 @@
import android.widget.TextView;
import android.widget.Toast;

import co.potatoproject.systemui.resmini.*;
import co.potatoproject.plugin.volume.common.*;

import co.potatoproject.plugin.volume.fancy.R;
import co.potatoproject.plugin.volume.compact.R;

import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.PluginDependency;
Expand Down Expand Up @@ -240,7 +240,7 @@ private void initDialog() {
mWindowParams.type = WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY;
mWindowParams.format = PixelFormat.TRANSLUCENT;
mWindowParams.windowAnimations = -1;
mDialog = LayoutInflater.from(mContext).inflate(R.layout.volume_dialog_fancy,
mDialog = LayoutInflater.from(mContext).inflate(R.layout.volume_dialog_compact,
(ViewGroup) null, false);

mDialog.setOnTouchListener((v, event) -> {
Expand Down Expand Up @@ -495,7 +495,7 @@ private void initRow(final VolumeRow row, final int stream, int iconRes, int ico
row.iconMuteRes = iconMuteRes;
row.important = important;
row.defaultStream = defaultStream;
row.view = LayoutInflater.from(mContext).inflate(R.layout.volume_dialog_fancy_row, null);
row.view = LayoutInflater.from(mContext).inflate(R.layout.volume_dialog_compact_row, null);
row.view.setId(row.stream);
row.view.setTag(row);
row.header = row.view.findViewById(R.id.volume_row_header);
Expand Down
2 changes: 1 addition & 1 deletion OreoPanel/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ android_app {

name: "OreoPanel",

static_libs: ["ResMini"],
static_libs: ["VolumePluginCommon"],

resource_dirs: ["res"],

Expand Down
2 changes: 1 addition & 1 deletion OreoPanel/res/layout/volume_dialog_oreo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.Volume.Header" />
<co.potatoproject.systemui.resmini.ExpandableIndicator
<co.potatoproject.plugin.volume.common.ExpandableIndicator
android:id="@+id/volume_expand_button"
android:layout_width="@dimen/volume_button_size"
android:layout_height="@dimen/volume_button_size"
Expand Down
2 changes: 1 addition & 1 deletion OreoPanel/res/layout/volume_dialog_oreo_row.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:layout_height="@dimen/volume_oreo_row_slider_height"
android:orientation="horizontal"
android:paddingStart="@dimen/volume_row_padding_start" >
<co.potatoproject.systemui.resmini.AlphaOptimizedImageButton
<co.potatoproject.plugin.volume.common.AlphaOptimizedImageButton
android:id="@+id/volume_row_icon"
style="@style/VolumeButtons"
android:layout_width="@dimen/volume_button_size"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;

import co.potatoproject.systemui.resmini.*;
import co.potatoproject.plugin.volume.common.*;

import co.potatoproject.plugin.volume.oreo.R;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
import android.view.ViewGroup;
import android.view.animation.PathInterpolator;

import co.potatoproject.systemui.resmini.D;
import co.potatoproject.systemui.resmini.Utils;
import co.potatoproject.plugin.volume.common.D;
import co.potatoproject.plugin.volume.common.Utils;

public class VolumeDialogMotion {
private static final String TAG = Utils.logTag(VolumeDialogMotion.class);
Expand Down
4 changes: 2 additions & 2 deletions FancyPanel/Android.bp → TiledPanel/Android.bp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
android_app {

name: "FancyPanel",
name: "TiledPanel",

static_libs: ["ResMini"],
static_libs: ["VolumePluginCommon"],

resource_dirs: ["res"],

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="co.potatoproject.plugin.volume.fancy">
package="co.potatoproject.plugin.volume.tiled">

<uses-permission android:name="com.android.systemui.permission.PLUGIN" />

Expand All @@ -32,7 +32,7 @@

<provider
android:name="androidx.lifecycle.ProcessLifecycleOwnerInitializer"
android:authorities="co.potatoproject.plugin.volume.fancy"
android:authorities="co.potatoproject.plugin.volume.tiled"
tools:replace="android:authorities"
android:exported="false"
android:multiprocess="true" />
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
android:layout_marginLeft="@dimen/volume_dialog_spacer"
android:layout_marginRight="@dimen/volume_dialog_spacer"
android:background="@drawable/rounded_bg_full">
<co.potatoproject.systemui.resmini.AlphaOptimizedImageButton
<co.potatoproject.plugin.volume.common.AlphaOptimizedImageButton
android:id="@+id/os_icon"
style="@style/VolumeButtons"
android:background="@drawable/rounded_ripple"
Expand All @@ -78,7 +78,7 @@
android:translationZ="@dimen/volume_dialog_elevation"
android:clipToPadding="false"
android:background="@drawable/rounded_bg_full">
<co.potatoproject.systemui.resmini.AlphaOptimizedImageButton
<co.potatoproject.plugin.volume.common.AlphaOptimizedImageButton
android:id="@+id/ringer_icon"
style="@style/VolumeButtons"
android:background="@drawable/rounded_ripple"
Expand Down Expand Up @@ -163,7 +163,7 @@
android:clipToPadding="false"
android:translationZ="@dimen/volume_dialog_elevation"
android:background="@drawable/rounded_bg_full">
<co.potatoproject.systemui.resmini.CaptionsToggleImageButton
<co.potatoproject.plugin.volume.common.CaptionsToggleImageButton
android:id="@+id/odi_captions_icon"
android:src="@drawable/ic_volume_odi_captions_disabled"
style="@style/VolumeButtons"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
android:rotation="-90" />
</FrameLayout>

<co.potatoproject.systemui.resmini.AlphaOptimizedImageButton
<co.potatoproject.plugin.volume.common.AlphaOptimizedImageButton
android:id="@+id/volume_row_icon"
style="@style/VolumeButtons"
android:layout_width="@dimen/volume_dialog_tap_target_size"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
android:clipToPadding="false"
android:theme="@style/qs_theme">

<co.potatoproject.systemui.resmini.AlphaOptimizedImageButton
<co.potatoproject.plugin.volume.common.AlphaOptimizedImageButton
android:id="@+id/button"
style="@style/VolumeButtons"
android:layout_width="@dimen/volume_dialog_ringer_size"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>

<resources>
<string name="plugin_label">Fancy panel</string>
<string name="plugin_label">Tiled panel</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package co.potatoproject.plugin.volume.toggle;
package co.potatoproject.plugin.volume.tiled;

import static android.app.ActivityManager.LOCK_TASK_MODE_NONE;
import static android.media.AudioManager.RINGER_MODE_NORMAL;
Expand All @@ -31,7 +31,7 @@
import static android.view.View.VISIBLE;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;

import static co.potatoproject.systemui.resmini.Events.DISMISS_REASON_SETTINGS_CLICKED;
import static co.potatoproject.plugin.volume.common.Events.DISMISS_REASON_SETTINGS_CLICKED;

import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
Expand Down Expand Up @@ -93,9 +93,9 @@
import android.widget.TextView;
import android.widget.Toast;

import co.potatoproject.systemui.resmini.*;
import co.potatoproject.plugin.volume.common.*;

import co.potatoproject.plugin.volume.toggle.R;
import co.potatoproject.plugin.volume.tiled.R;

import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.PluginDependency;
Expand Down Expand Up @@ -249,7 +249,7 @@ private void initDialog() {
mWindow.setAttributes(lp);
mWindow.setLayout(WRAP_CONTENT, WRAP_CONTENT);

mDialog.setContentView(R.layout.volume_dialog_toggle);
mDialog.setContentView(R.layout.volume_dialog_tiled);
mDialogView = mDialog.findViewById(R.id.volume_dialog);
mDialogView.setAlpha(0);
mDialog.setCanceledOnTouchOutside(true);
Expand Down Expand Up @@ -516,7 +516,7 @@ private void initRow(final VolumeRow row, final int stream, int iconRes, int ico
row.iconMuteRes = iconMuteRes;
row.important = important;
row.defaultStream = defaultStream;
row.view = mDialog.getLayoutInflater().inflate(R.layout.volume_dialog_toggle_row, null);
row.view = mDialog.getLayoutInflater().inflate(R.layout.volume_dialog_tiled_row, null);
row.view.setId(row.stream);
row.view.setTag(row);
row.header = row.view.findViewById(R.id.volume_row_header);
Expand Down Expand Up @@ -607,7 +607,7 @@ private void initStreamButton(final StreamSwitchButton button, final VolumeRow r
button.iconRes = iconRes;
button.iconMuteRes = iconMuteRes;

button.view = mDialog.getLayoutInflater().inflate(R.layout.volume_dialog_toggle_stream_button, null);
button.view = mDialog.getLayoutInflater().inflate(R.layout.volume_dialog_tiled_stream_button, null);
button.view.setId(stream);
button.view.setTag(button);

Expand Down
2 changes: 1 addition & 1 deletion ResMini/Android.bp → VolumePluginCommon/Android.bp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
android_library {
name: "ResMini",
name: "VolumePluginCommon",
static_libs: [
"SystemUIPluginLib",
"androidx.appcompat_appcompat",
Expand Down
Loading

0 comments on commit 44614f2

Please sign in to comment.