Update output switcher behavior and UI design

- Remove media stream stuff, use active device info as header.
- Show the sub title of media device.
- Add new requirement, when user click disconnected bluetooth device,
  will auto connceted it.
- When bluetooth state is off, do not showing content of slice.

Bug: 127201385
Test: make -j42 RunSettingsRoboTests
Change-Id: Ie1880ba3ef9910a42caf0cca2b6502e54787f5a0
This commit is contained in:
hughchen
2019-03-06 16:55:21 +08:00
parent cf6757a72f
commit e13e09d1b4
5 changed files with 60 additions and 85 deletions

View File

@@ -16,13 +16,11 @@
package com.android.settings.panel;
import static com.android.settingslib.media.MediaOutputSliceConstants.ACTION_MEDIA_OUTPUT;
import static com.android.settingslib.media.MediaOutputSliceConstants.EXTRA_PACKAGE_NAME;
import android.app.settings.SettingsEnums;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.Gravity;
import android.view.MotionEvent;
@@ -75,15 +73,8 @@ public class SettingsPanelActivity extends FragmentActivity {
return;
}
final String mediaPackageName =
callingIntent.getStringExtra(EXTRA_PACKAGE_NAME);
if (TextUtils.equals(ACTION_MEDIA_OUTPUT, callingIntent.getAction())
&& TextUtils.isEmpty(mediaPackageName)) {
Log.e(TAG, "Missing EXTRA_PACKAGE_NAME, closing Panel Activity");
finish();
return;
}
// We will use it once media output switch panel support remote device.
final String mediaPackageName = callingIntent.getStringExtra(EXTRA_PACKAGE_NAME);
setContentView(R.layout.settings_panel);