• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


Commit MetaInfo

Revision601f20325b08b93a42db6a1405fc4077a88d4dc8 (tree)
Zeit2021-07-06 17:17:51
AutorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Android 9.0.0 Release 61 (6780336)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCX3utTwAKCRDorT+BmrEO
eEfbAJ9KZLhYcVqTLBt6s31GMvgm0pPpRgCePqd1bpcuSZ/ZL0RNPUX+clsKbhE=
=WB9A
-----END PGP SIGNATURE-----

Merge tag 'android-9.0.0_r61' into pie-x86

Android 9.0.0 Release 61 (6780336)

Ändern Zusammenfassung

Diff

--- a/res/xml/app_ops_permissions_details.xml
+++ b/res/xml/app_ops_permissions_details.xml
@@ -17,7 +17,7 @@
1717 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
1818 xmlns:settings="http://schemas.android.com/apk/res-auto">
1919
20- <SwitchPreference
20+ <com.android.settings.widget.FilterTouchesSwitchPreference
2121 android:key="app_ops_settings_switch" />
2222
2323 <Preference
--- a/res/xml/change_wifi_state_details.xml
+++ b/res/xml/change_wifi_state_details.xml
@@ -18,7 +18,7 @@
1818 android:key="change_wifi_state"
1919 android:title="@string/change_wifi_state_title">
2020
21- <SwitchPreference
21+ <com.android.settings.widget.FilterTouchesSwitchPreference
2222 android:key="app_ops_settings_switch"
2323 android:title="@string/change_wifi_state_app_detail_switch"/>
2424
--- a/res/xml/draw_overlay_permissions_details.xml
+++ b/res/xml/draw_overlay_permissions_details.xml
@@ -18,7 +18,7 @@
1818 android:key="draw_overlay_permission_detail_settings"
1919 android:title="@string/draw_overlay">
2020
21- <SwitchPreference
21+ <com.android.settings.widget.FilterTouchesSwitchPreference
2222 android:key="app_ops_settings_switch"
2323 android:title="@string/permit_draw_overlay"/>
2424
--- a/res/xml/external_sources_details.xml
+++ b/res/xml/external_sources_details.xml
@@ -17,7 +17,7 @@
1717 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
1818 android:title="@string/install_other_apps">
1919
20- <com.android.settingslib.RestrictedSwitchPreference
20+ <com.android.settings.widget.FilterTouchesRestrictedSwitchPreference
2121 android:key="external_sources_settings_switch"
2222 android:title="@string/external_source_switch_title" />
2323
--- a/res/xml/picture_in_picture_permissions_details.xml
+++ b/res/xml/picture_in_picture_permissions_details.xml
@@ -18,7 +18,7 @@
1818 android:key="picture_in_picture_permission_detail_settings"
1919 android:title="@string/picture_in_picture_app_detail_title">
2020
21- <SwitchPreference
21+ <com.android.settings.widget.FilterTouchesSwitchPreference
2222 android:key="app_ops_settings_switch"
2323 android:title="@string/picture_in_picture_app_detail_switch"/>
2424
--- a/res/xml/write_system_settings_permissions_details.xml
+++ b/res/xml/write_system_settings_permissions_details.xml
@@ -18,7 +18,7 @@
1818 android:key="write_system_settings_permission_detail_settings"
1919 android:title="@string/write_settings">
2020
21- <SwitchPreference
21+ <com.android.settings.widget.FilterTouchesSwitchPreference
2222 android:key="app_ops_settings_switch"
2323 android:title="@string/permit_write_settings"/>
2424
--- a/src/com/android/settings/accounts/AccountTypePreferenceLoader.java
+++ b/src/com/android/settings/accounts/AccountTypePreferenceLoader.java
@@ -196,14 +196,7 @@ public class AccountTypePreferenceLoader {
196196 ActivityInfo resolvedActivityInfo = resolveInfo.activityInfo;
197197 ApplicationInfo resolvedAppInfo = resolvedActivityInfo.applicationInfo;
198198 try {
199- if (resolvedActivityInfo.exported) {
200- if (resolvedActivityInfo.permission == null) {
201- return true; // exported activity without permission.
202- } else if (pm.checkPermission(resolvedActivityInfo.permission,
203- authDesc.packageName) == PackageManager.PERMISSION_GRANTED) {
204- return true;
205- }
206- }
199+ // Allows to launch only authenticator owned activities.
207200 ApplicationInfo authenticatorAppInf = pm.getApplicationInfo(authDesc.packageName, 0);
208201 return resolvedAppInfo.uid == authenticatorAppInf.uid;
209202 } catch (NameNotFoundException e) {
--- a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
@@ -26,6 +26,8 @@ import android.content.IntentFilter;
2626 import android.os.Bundle;
2727 import android.support.annotation.VisibleForTesting;
2828
29+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
30+
2931 /**
3032 * BluetoothPairingDialog asks the user to enter a PIN / Passkey / simple confirmation
3133 * for pairing with a remote Bluetooth device. It is an activity that appears as a dialog.
@@ -63,6 +65,8 @@ public class BluetoothPairingDialog extends Activity {
6365 @Override
6466 protected void onCreate(@Nullable Bundle savedInstanceState) {
6567 super.onCreate(savedInstanceState);
68+
69+ getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
6670 Intent intent = getIntent();
6771 mBluetoothPairingController = new BluetoothPairingController(intent, this);
6872 // build the dialog fragment
--- a/src/com/android/settings/bluetooth/RequestPermissionActivity.java
+++ b/src/com/android/settings/bluetooth/RequestPermissionActivity.java
@@ -37,6 +37,8 @@ import com.android.settingslib.bluetooth.BluetoothDiscoverableTimeoutReceiver;
3737 import com.android.settingslib.bluetooth.LocalBluetoothAdapter;
3838 import com.android.settingslib.bluetooth.LocalBluetoothManager;
3939
40+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
41+
4042 /**
4143 * RequestPermissionActivity asks the user whether to enable discovery. This is
4244 * usually started by an application wanted to start bluetooth and or discovery
@@ -72,6 +74,8 @@ public class RequestPermissionActivity extends Activity implements
7274 protected void onCreate(Bundle savedInstanceState) {
7375 super.onCreate(savedInstanceState);
7476
77+ getWindow().addPrivateFlags(PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
78+
7579 setResult(Activity.RESULT_CANCELED);
7680
7781 // Note: initializes mLocalAdapter and returns true on error
--- a/src/com/android/settings/widget/AppSwitchPreference.java
+++ b/src/com/android/settings/widget/AppSwitchPreference.java
@@ -37,5 +37,11 @@ public class AppSwitchPreference extends SwitchPreference {
3737
3838 view.findViewById(R.id.summary_container)
3939 .setVisibility(TextUtils.isEmpty(getSummary()) ? View.GONE : View.VISIBLE);
40+
41+ final View switchView = view.findViewById(android.R.id.switch_widget);
42+ if (switchView != null) {
43+ final View rootView = switchView.getRootView();
44+ rootView.setFilterTouchesWhenObscured(true);
45+ }
4046 }
4147 }
--- /dev/null
+++ b/src/com/android/settings/widget/FilterTouchesRestrictedSwitchPreference.java
@@ -0,0 +1,58 @@
1+/*
2+ * Copyright (C) 2020 The Android Open Source Project
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+package com.android.settings.widget;
17+
18+import android.content.Context;
19+import android.support.v7.preference.PreferenceViewHolder;
20+import android.util.AttributeSet;
21+import android.view.View;
22+
23+import com.android.settingslib.RestrictedSwitchPreference;
24+
25+/**
26+ * This widget with enabled filterTouchesWhenObscured attribute use to replace
27+ * the {@link RestrictedSwitchPreference} in the Special access app pages for
28+ * security.
29+ */
30+public class FilterTouchesRestrictedSwitchPreference extends RestrictedSwitchPreference {
31+ public FilterTouchesRestrictedSwitchPreference(Context context, AttributeSet attrs,
32+ int defStyleAttr, int defStyleRes) {
33+ super(context, attrs, defStyleAttr, defStyleRes);
34+ }
35+
36+ public FilterTouchesRestrictedSwitchPreference(Context context, AttributeSet attrs,
37+ int defStyleAttr) {
38+ super(context, attrs, defStyleAttr);
39+ }
40+
41+ public FilterTouchesRestrictedSwitchPreference(Context context, AttributeSet attrs) {
42+ super(context, attrs);
43+ }
44+
45+ public FilterTouchesRestrictedSwitchPreference(Context context) {
46+ super(context);
47+ }
48+
49+ @Override
50+ public void onBindViewHolder(PreferenceViewHolder holder) {
51+ super.onBindViewHolder(holder);
52+ final View switchView = holder.findViewById(android.R.id.switch_widget);
53+ if (switchView != null) {
54+ final View rootView = switchView.getRootView();
55+ rootView.setFilterTouchesWhenObscured(true);
56+ }
57+ }
58+}
--- /dev/null
+++ b/src/com/android/settings/widget/FilterTouchesSwitchPreference.java
@@ -0,0 +1,56 @@
1+/*
2+ * Copyright (C) 2020 The Android Open Source Project
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+package com.android.settings.widget;
17+
18+import android.content.Context;
19+import android.support.v14.preference.SwitchPreference;
20+import android.support.v7.preference.PreferenceViewHolder;
21+import android.util.AttributeSet;
22+import android.view.View;
23+
24+/**
25+ * This widget with enabled filterTouchesWhenObscured attribute use to replace
26+ * the {@link SwitchPreference} in the Special access app pages for security.
27+ */
28+public class FilterTouchesSwitchPreference extends SwitchPreference {
29+
30+ public FilterTouchesSwitchPreference(Context context, AttributeSet attrs, int defStyleAttr,
31+ int defStyleRes) {
32+ super(context, attrs, defStyleAttr, defStyleRes);
33+ }
34+
35+ public FilterTouchesSwitchPreference(Context context, AttributeSet attrs, int defStyleAttr) {
36+ super(context, attrs, defStyleAttr);
37+ }
38+
39+ public FilterTouchesSwitchPreference(Context context, AttributeSet attrs) {
40+ super(context, attrs);
41+ }
42+
43+ public FilterTouchesSwitchPreference(Context context) {
44+ super(context);
45+ }
46+
47+ @Override
48+ public void onBindViewHolder(PreferenceViewHolder holder) {
49+ super.onBindViewHolder(holder);
50+ final View switchView = holder.findViewById(android.R.id.switch_widget);
51+ if (switchView != null) {
52+ final View rootView = switchView.getRootView();
53+ rootView.setFilterTouchesWhenObscured(true);
54+ }
55+ }
56+}