[Large screen] Make slice deep linking to Settings show in 2-pane

- add a standalone home activity for slice deep link.
- add EXTRA_IS_FROM_SLICE to control the slice deep link flow.
- Intent#parseUri fails if the intent data schema is set.
  Add EXTRA_SETTINGS_LARGE_SCREEN_DEEP_LINK_INTENT_DATA to relay the
  data schema.

Bug: 201397123
Test: manual, robotest
      1.  Say 'Enable NFC'/'Enable Bluetooth'to Google assistant.
      2.  Click the the NFC/BT Slice.
Change-Id: Ia3216956328c32b2109cb2d70ad1105327661f26
This commit is contained in:
Arc Wang
2021-09-28 20:39:15 +08:00
committed by Jason Chiu
parent 929e577e1b
commit a63e9c625d
6 changed files with 126 additions and 28 deletions

View File

@@ -0,0 +1,27 @@
/*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings.homepage;
import android.content.ComponentName;
/** Activity for Slices to launch Settings deep link page */
public class SliceDeepLinkHomepageActivity extends SettingsHomepageActivity {
@Override
protected ComponentName getDeepLinkComponent() {
return new ComponentName(getApplicationContext(), getClass());
}
}