diff options
60 files changed, 434 insertions, 106 deletions
diff --git a/api/OWNERS b/api/OWNERS index 965093c9ab38..f2bcf13d2d2e 100644 --- a/api/OWNERS +++ b/api/OWNERS @@ -9,4 +9,4 @@ per-file *.go,go.mod,go.work,go.work.sum = file:platform/build/soong:/OWNERS per-file Android.bp = file:platform/build/soong:/OWNERS #{LAST_RESORT_SUGGESTION} # For metalava team to disable lint checks in platform -per-file Android.bp = aurimas@google.com,emberrose@google.com +per-file Android.bp = aurimas@google.com diff --git a/cmds/svc/src/com/android/commands/svc/OWNERS b/cmds/svc/src/com/android/commands/svc/OWNERS index d5a5d7b3b858..a901dfdeddfb 100644 --- a/cmds/svc/src/com/android/commands/svc/OWNERS +++ b/cmds/svc/src/com/android/commands/svc/OWNERS @@ -1,2 +1,2 @@ # Bug component: 48448 -per-file NfcCommand.java = file:platform/packages/apps/Nfc:/OWNERS +per-file NfcCommand.java = file:platform/packages/modules/Nfc:/OWNERS diff --git a/core/java/android/accessibilityservice/OWNERS b/core/java/android/accessibilityservice/OWNERS index 1265dfa2c441..dac64f47ba7e 100644 --- a/core/java/android/accessibilityservice/OWNERS +++ b/core/java/android/accessibilityservice/OWNERS @@ -1,4 +1,7 @@ -# Bug component: 44215 +# Bug component: 1530954 +# +# The above component is for automated test bugs. If you are a human looking to report +# a bug in this codebase then please use component 44215. # Android Accessibility Framework owners include /services/accessibility/OWNERS
\ No newline at end of file diff --git a/core/java/android/view/accessibility/OWNERS b/core/java/android/view/accessibility/OWNERS index f62b33f1f753..799ef0091f71 100644 --- a/core/java/android/view/accessibility/OWNERS +++ b/core/java/android/view/accessibility/OWNERS @@ -1,4 +1,7 @@ -# Bug component: 44215 +# Bug component: 1530954 +# +# The above component is for automated test bugs. If you are a human looking to report +# a bug in this codebase then please use component 44215. # Android Accessibility Framework owners include /services/accessibility/OWNERS diff --git a/core/java/com/android/internal/accessibility/OWNERS b/core/java/com/android/internal/accessibility/OWNERS index 1265dfa2c441..dac64f47ba7e 100644 --- a/core/java/com/android/internal/accessibility/OWNERS +++ b/core/java/com/android/internal/accessibility/OWNERS @@ -1,4 +1,7 @@ -# Bug component: 44215 +# Bug component: 1530954 +# +# The above component is for automated test bugs. If you are a human looking to report +# a bug in this codebase then please use component 44215. # Android Accessibility Framework owners include /services/accessibility/OWNERS
\ No newline at end of file diff --git a/core/java/com/android/internal/graphics/palette/OWNERS b/core/java/com/android/internal/graphics/palette/OWNERS index 731dca9b128f..df867252c01c 100644 --- a/core/java/com/android/internal/graphics/palette/OWNERS +++ b/core/java/com/android/internal/graphics/palette/OWNERS @@ -1,3 +1,2 @@ -# Bug component: 484670
-dupin@google.com
-jamesoleary@google.com
\ No newline at end of file +# Bug component: 484670 +dupin@google.com diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index e60879e02b4b..38dc198fa9f8 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -429,6 +429,27 @@ public class ZygoteInit { null /*dependentPackages*/, null /*dependencies*/, false /*isNative*/)); } + if (Flags.enableMediaAndLocationPreload()) { + // As these libraries are technically optional and not necessarily inherited from + // base_system.mk, only cache them if they exist. + final String mediaJarPath = "/system/framework/com.android.media.remotedisplay.jar"; + if (new File(mediaJarPath).exists()) { + libs.add(new SharedLibraryInfo( + mediaJarPath, null /*packageName*/, + null /*codePaths*/, null /*name*/, 0 /*version*/, + SharedLibraryInfo.TYPE_BUILTIN, null /*declaringPackage*/, + null /*dependentPackages*/, null /*dependencies*/, false /*isNative*/)); + } + final String locationJarPath = "/system/framework/com.android.location.provider.jar"; + if (new File(locationJarPath).exists()) { + libs.add(new SharedLibraryInfo( + locationJarPath, null /*packageName*/, + null /*codePaths*/, null /*name*/, 0 /*version*/, + SharedLibraryInfo.TYPE_BUILTIN, null /*declaringPackage*/, + null /*dependentPackages*/, null /*dependencies*/, false /*isNative*/)); + } + } + // WindowManager Extensions is an optional shared library that is required for WindowManager // Jetpack to fully function. Since it is a widely used library, preload it to improve apps // startup performance. diff --git a/core/java/com/android/internal/os/flags.aconfig b/core/java/com/android/internal/os/flags.aconfig index f82df859f49c..16d471b52b79 100644 --- a/core/java/com/android/internal/os/flags.aconfig +++ b/core/java/com/android/internal/os/flags.aconfig @@ -53,6 +53,13 @@ flag { } flag { + name: "enable_media_and_location_preload" + namespace: "system_performance" + description: "Enables zygote preload of non-BCP media and location libraries." + bug: "241474956" +} + +flag { name: "use_transaction_codes_for_unknown_methods" namespace: "stability" description: "Use transaction codes when the method names is unknown" diff --git a/core/java/com/android/internal/widget/remotecompose/OWNERS b/core/java/com/android/internal/widget/remotecompose/OWNERS index 54facab0c3f4..e163474bccb9 100644 --- a/core/java/com/android/internal/widget/remotecompose/OWNERS +++ b/core/java/com/android/internal/widget/remotecompose/OWNERS @@ -5,4 +5,3 @@ sihua@google.com sunnygoyal@google.com oscarad@google.com pinyaoting@google.com -zakcohen@google.com diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp index 1e92d3209d81..7f545164dbc3 100644 --- a/core/jni/android_util_Binder.cpp +++ b/core/jni/android_util_Binder.cpp @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#undef ANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION // TODO:remove this and fix code - #define LOG_TAG "JavaBinder" -//#define LOG_NDEBUG 0 +// #define LOG_NDEBUG 0 #include "android_util_Binder.h" @@ -479,7 +477,7 @@ public: if (b) return b; // b/360067751: constructor may trigger GC, so call outside lock - b = new JavaBBinder(env, obj); + b = sp<JavaBBinder>::make(env, obj); { AutoMutex _l(mLock); @@ -646,11 +644,17 @@ public: } else { mObject = env->NewGlobalRef(object); } + } + + void onFirstRef() override { + T::onFirstRef(); + + sp<RecipientList<T>> list = mList.promote(); // These objects manage their own lifetimes so are responsible for final bookkeeping. // The list holds a strong reference to this object. LOG_DEATH_FREEZE("%s Adding JavaRecipient %p to RecipientList %p", logPrefix<T>(), this, list.get()); - list->add(this); + list->add(sp<JavaRecipient>::fromExisting(this)); } void clearReference() { @@ -658,7 +662,7 @@ public: if (list != NULL) { LOG_DEATH_FREEZE("%s Removing JavaRecipient %p from RecipientList %p", logPrefix<T>(), this, list.get()); - list->remove(this); + list->remove(sp<JavaRecipient>::fromExisting(this)); } else { LOG_DEATH_FREEZE("%s clearReference() on JavaRecipient %p but RecipientList wp purged", logPrefix<T>(), this); @@ -940,7 +944,7 @@ struct BinderProxyNativeData { // Frozen state change callbacks for mObject. Reference counted only because // JavaFrozenStateChangeCallback hold a weak reference that can be // temporarily promoted. - sp<FrozenStateChangeCallbackList> mFrozenStateChangCallbackList; + sp<FrozenStateChangeCallbackList> mFrozenStateChangeCallbackList; }; BinderProxyNativeData* getBPNativeData(JNIEnv* env, jobject obj) { @@ -965,8 +969,8 @@ jobject javaObjectForIBinder(JNIEnv* env, const sp<IBinder>& val) } BinderProxyNativeData* nativeData = new BinderProxyNativeData(); - nativeData->mOrgue = new DeathRecipientList; - nativeData->mFrozenStateChangCallbackList = new FrozenStateChangeCallbackList; + nativeData->mOrgue = sp<DeathRecipientList>::make(); + nativeData->mFrozenStateChangeCallbackList = sp<FrozenStateChangeCallbackList>::make(); nativeData->mObject = val; jobject object = env->CallStaticObjectMethod(gBinderProxyOffsets.mClass, @@ -1572,8 +1576,8 @@ static void android_os_BinderProxy_linkToDeath(JNIEnv* env, jobject obj, LOG_DEATH_FREEZE("linkToDeath: binder=%p recipient=%p\n", target, recipient); if (!target->localBinder()) { - DeathRecipientList* list = nd->mOrgue.get(); - sp<JavaDeathRecipient> jdr = new JavaDeathRecipient(env, recipient, list); + sp<DeathRecipientList> list = nd->mOrgue; + sp<JavaDeathRecipient> jdr = sp<JavaDeathRecipient>::make(env, recipient, list); status_t err = target->linkToDeath(jdr, NULL, flags); if (err != NO_ERROR) { // Failure adding the death recipient, so clear its reference @@ -1649,7 +1653,7 @@ static void android_os_BinderProxy_addFrozenStateChangeCallback( LOG_DEATH_FREEZE("addFrozenStateChangeCallback: binder=%p callback=%p\n", target, callback); if (!target->localBinder()) { - FrozenStateChangeCallbackList* list = nd->mFrozenStateChangCallbackList.get(); + sp<FrozenStateChangeCallbackList> list = nd->mFrozenStateChangeCallbackList; auto jfscc = sp<JavaFrozenStateChangeCallback>::make(env, callback, list); status_t err = target->addFrozenStateChangeCallback(jfscc); if (err != NO_ERROR) { @@ -1683,7 +1687,7 @@ static jboolean android_os_BinderProxy_removeFrozenStateChangeCallback(JNIEnv* e status_t err = NAME_NOT_FOUND; // If we find the matching callback, proceed to unlink using that - FrozenStateChangeCallbackList* list = nd->mFrozenStateChangCallbackList.get(); + FrozenStateChangeCallbackList* list = nd->mFrozenStateChangeCallbackList.get(); sp<JavaRecipient<IBinder::FrozenStateChangeCallback> > origJFSCC = list->find(callback); LOG_DEATH_FREEZE(" removeFrozenStateChangeCallback found list %p and JFSCC %p", list, origJFSCC.get()); @@ -1712,7 +1716,7 @@ static void BinderProxy_destroy(void* rawNativeData) BinderProxyNativeData * nativeData = (BinderProxyNativeData *) rawNativeData; LOG_DEATH_FREEZE("Destroying BinderProxy: binder=%p drl=%p fsccl=%p\n", nativeData->mObject.get(), nativeData->mOrgue.get(), - nativeData->mFrozenStateChangCallbackList.get()); + nativeData->mFrozenStateChangeCallbackList.get()); delete nativeData; IPCThreadState::self()->flushCommands(); } diff --git a/core/proto/android/nfc/OWNERS b/core/proto/android/nfc/OWNERS index ca16721eacc1..36823aee4dbb 100644 --- a/core/proto/android/nfc/OWNERS +++ b/core/proto/android/nfc/OWNERS @@ -1 +1 @@ -include platform/packages/apps/Nfc:/OWNERS
\ No newline at end of file +include platform/packages/modules/Nfc:/OWNERS
\ No newline at end of file diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index c01a8a95e021..c735b2712aed 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -3183,6 +3183,14 @@ as private. {@see android.view.Display#FLAG_PRIVATE} --> <integer-array translatable="false" name="config_localPrivateDisplayPorts"></integer-array> + <!-- Controls if local secondary displays should be able to steal focus and become top display. + Value specified in the array represents physical port address of each display and displays + in this list due to flag dependencies will be marked with the following flags: + {@see android.view.Display#FLAG_STEAL_TOP_FOCUS_DISABLED} + {@see android.view.Display#FLAG_OWN_FOCUS} --> + <integer-array translatable="false" name="config_localNotStealTopFocusDisplayPorts"> + </integer-array> + <!-- The default mode for the default display. One of the following values (See Display.java): 0 - COLOR_MODE_DEFAULT 7 - COLOR_MODE_SRGB diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index a3d5be79cad2..cbdf5a1ecb1b 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -425,6 +425,7 @@ <java-symbol type="bool" name="config_enableProximityService" /> <java-symbol type="bool" name="config_enableVirtualDeviceManager" /> <java-symbol type="array" name="config_localPrivateDisplayPorts" /> + <java-symbol type="array" name="config_localNotStealTopFocusDisplayPorts" /> <java-symbol type="integer" name="config_defaultDisplayDefaultColorMode" /> <java-symbol type="bool" name="config_enableAppWidgetService" /> <java-symbol type="dimen" name="config_pictureInPictureMinAspectRatio" /> diff --git a/data/etc/OWNERS b/data/etc/OWNERS index 85dae631cac3..712042f6ff6b 100644 --- a/data/etc/OWNERS +++ b/data/etc/OWNERS @@ -5,7 +5,6 @@ hackbod@android.com hackbod@google.com jeffv@google.com jsharkey@android.com -jsharkey@google.com lorenzo@google.com yamasani@google.com diff --git a/data/fonts/script/test/test_commandline.py b/data/fonts/script/test/test_commandline.py index 75318cc10e68..dbcba417c5e1 100755 --- a/data/fonts/script/test/test_commandline.py +++ b/data/fonts/script/test/test_commandline.py @@ -75,20 +75,20 @@ class CommandlineTest(unittest.TestCase): functools.partial(CommandlineTest.fileread, filemap), ) - self.assertEquals("output.xml", args.outfile) + self.assertEqual("output.xml", args.outfile) - self.assertEquals(1, len(args.aliases)) - self.assertEquals("sans-serif-thin", args.aliases[0].name) - self.assertEquals("sans-serif", args.aliases[0].to) - self.assertEquals(100, args.aliases[0].weight) + self.assertEqual(1, len(args.aliases)) + self.assertEqual("sans-serif-thin", args.aliases[0].name) + self.assertEqual("sans-serif", args.aliases[0].to) + self.assertEqual(100, args.aliases[0].weight) - self.assertEquals(2, len(args.fallback)) + self.assertEqual(2, len(args.fallback)) # Order is not a part of expectation. Check the expected lang is included. langs = set(["und-Arab", "und-Ethi"]) self.assertTrue(args.fallback[0].lang in langs) self.assertTrue(args.fallback[1].lang in langs) - self.assertEquals(3, len(args.families)) + self.assertEqual(3, len(args.families)) # Order is not a part of expectation. Check the expected name is included. names = set(["sans-serif", "sans-serif-condensed", "roboto-flex"]) self.assertTrue(args.families[0].name in names) diff --git a/data/fonts/script/test/test_xml_builder.py b/data/fonts/script/test/test_xml_builder.py index 24a033b43cbc..f15c51379b46 100755 --- a/data/fonts/script/test/test_xml_builder.py +++ b/data/fonts/script/test/test_xml_builder.py @@ -328,16 +328,16 @@ class XmlBuilderTest(unittest.TestCase): self.expect_xml(xml) def expect_xml(self, xml): - self.assertEquals("sans-serif", xml.families[0].name) # _SANS_SERIF - self.assertEquals("serif", xml.families[1].name) # _SERIF - self.assertEquals("und-Arab", xml.families[2].lang) # __ARABIC - self.assertEquals("elegant", xml.families[2].variant) - self.assertEquals("und-Arab", xml.families[3].lang) # _ARABIC_UI - self.assertEquals("zh-Hans", xml.families[4].lang) # _HANS (_HANS_SERIF) - self.assertEquals(2, len(xml.families[4].fonts)) - self.assertEquals("serif", xml.families[4].fonts[1].fallback_for) - self.assertEquals("ja", xml.families[5].lang) # _HANS (_HANS_SERIF) - self.assertEquals("serif", xml.families[5].fonts[1].fallback_for) + self.assertEqual("sans-serif", xml.families[0].name) # _SANS_SERIF + self.assertEqual("serif", xml.families[1].name) # _SERIF + self.assertEqual("und-Arab", xml.families[2].lang) # __ARABIC + self.assertEqual("elegant", xml.families[2].variant) + self.assertEqual("und-Arab", xml.families[3].lang) # _ARABIC_UI + self.assertEqual("zh-Hans", xml.families[4].lang) # _HANS (_HANS_SERIF) + self.assertEqual(2, len(xml.families[4].fonts)) + self.assertEqual("serif", xml.families[4].fonts[1].fallback_for) + self.assertEqual("ja", xml.families[5].lang) # _HANS (_HANS_SERIF) + self.assertEqual("serif", xml.families[5].fonts[1].fallback_for) if __name__ == "__main__": diff --git a/libs/WindowManager/Shell/OWNERS b/libs/WindowManager/Shell/OWNERS index 394093c6ab30..ab2f3ef94eb6 100644 --- a/libs/WindowManager/Shell/OWNERS +++ b/libs/WindowManager/Shell/OWNERS @@ -1,7 +1,7 @@ -xutan@google.com +jorgegil@google.com pbdr@google.com pragyabajoria@google.com # Give submodule owners in shell resource approval -per-file res*/*/*.xml = atsjenk@google.com, hwwang@google.com, jorgegil@google.com, lbill@google.com, madym@google.com, vaniadesmonda@google.com, pbdr@google.com, tkachenkoi@google.com, mpodolian@google.com, liranb@google.com, pragyabajoria@google.com, uysalorhan@google.com, gsennton@google.com, mattsziklay@google.com, mdehaini@google.com +per-file res*/*/*.xml = atsjenk@google.com, hwwang@google.com, lbill@google.com, madym@google.com, vaniadesmonda@google.com, pbdr@google.com, mpodolian@google.com, liranb@google.com, pragyabajoria@google.com, uysalorhan@google.com, gsennton@google.com, mattsziklay@google.com, mdehaini@google.com per-file res*/*/tv_*.xml = bronger@google.com diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/OWNERS b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/OWNERS index afdda8ff865e..47b3ae8fc11b 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/OWNERS +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/OWNERS @@ -3,7 +3,6 @@ atsjenk@google.com jorgegil@google.com madym@google.com pbdr@google.com -tkachenkoi@google.com vaniadesmonda@google.com pragyabajoria@google.com uysalorhan@google.com diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/freeform/OWNERS b/libs/WindowManager/Shell/src/com/android/wm/shell/freeform/OWNERS index 83b5bf658459..44d46eea9c55 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/freeform/OWNERS +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/freeform/OWNERS @@ -4,7 +4,6 @@ jorgegil@google.com madym@google.com nmusgrave@google.com pbdr@google.com -tkachenkoi@google.com vaniadesmonda@google.com pragyabajoria@google.com uysalorhan@google.com diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/OWNERS b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/OWNERS index 3f828f547920..992402528f4f 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/OWNERS +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/OWNERS @@ -1,3 +1,2 @@ -jorgegil@google.com mattsziklay@google.com mdehaini@google.com diff --git a/libs/WindowManager/Shell/tests/OWNERS b/libs/WindowManager/Shell/tests/OWNERS index 65e50f86e8fe..5ba90ac66e78 100644 --- a/libs/WindowManager/Shell/tests/OWNERS +++ b/libs/WindowManager/Shell/tests/OWNERS @@ -11,7 +11,6 @@ atsjenk@google.com jorgegil@google.com vaniadesmonda@google.com pbdr@google.com -tkachenkoi@google.com mpodolian@google.com jeremysim@google.com peanutbutter@google.com diff --git a/libs/hwui/OWNERS b/libs/hwui/OWNERS index bc174599a4d3..70d13ab8b3e5 100644 --- a/libs/hwui/OWNERS +++ b/libs/hwui/OWNERS @@ -4,7 +4,6 @@ alecmouri@google.com djsollen@google.com jreck@google.com njawad@google.com -scroggo@google.com sumir@google.com # For text, e.g. Typeface, Font, Minikin, etc. diff --git a/nfc-extras/OWNERS b/nfc-extras/OWNERS index 35e9713f5715..2b82bc8ad073 100644 --- a/nfc-extras/OWNERS +++ b/nfc-extras/OWNERS @@ -1,2 +1,2 @@ # Bug component: 48448 -include platform/packages/apps/Nfc:/OWNERS +include platform/packages/modules/Nfc:/OWNERS diff --git a/nfc-non-updatable/OWNERS b/nfc-non-updatable/OWNERS index f46dccd97974..47f209ffa9fa 100644 --- a/nfc-non-updatable/OWNERS +++ b/nfc-non-updatable/OWNERS @@ -1,2 +1,2 @@ # Bug component: 48448 -include platform/packages/apps/Nfc:/OWNERS
\ No newline at end of file +include platform/packages/modules/Nfc:/OWNERS
\ No newline at end of file diff --git a/nfc-non-updatable/java/android/nfc/cardemulation/ApduServiceInfo.java b/nfc-non-updatable/java/android/nfc/cardemulation/ApduServiceInfo.java index e83b9f1afddb..d0de1fc14b0e 100644 --- a/nfc-non-updatable/java/android/nfc/cardemulation/ApduServiceInfo.java +++ b/nfc-non-updatable/java/android/nfc/cardemulation/ApduServiceInfo.java @@ -817,7 +817,7 @@ public final class ApduServiceInfo implements Parcelable { if (!mOnHost && !autoTransact) { return; } - mAutoTransact.put(pollingLoopFilter, autoTransact); + mAutoTransact.put(pollingLoopFilter.toUpperCase(Locale.ROOT), autoTransact); } /** @@ -845,7 +845,8 @@ public final class ApduServiceInfo implements Parcelable { if (!mOnHost && !autoTransact) { return; } - mAutoTransactPatterns.put(Pattern.compile(pollingLoopPatternFilter), autoTransact); + mAutoTransactPatterns.put(Pattern.compile( + pollingLoopPatternFilter.toUpperCase(Locale.ROOT)), autoTransact); } /** diff --git a/omapi/OWNERS b/omapi/OWNERS index 39c5c5bdeb09..375d643f7ed1 100644 --- a/omapi/OWNERS +++ b/omapi/OWNERS @@ -1,2 +1,2 @@ # Bug component: 456592 -include platform/packages/apps/Nfc:/OWNERS +include platform/packages/modules/Nfc:/OWNERS diff --git a/omapi/java/android/se/OWNERS b/omapi/java/android/se/OWNERS index 39c5c5bdeb09..375d643f7ed1 100644 --- a/omapi/java/android/se/OWNERS +++ b/omapi/java/android/se/OWNERS @@ -1,2 +1,2 @@ # Bug component: 456592 -include platform/packages/apps/Nfc:/OWNERS +include platform/packages/modules/Nfc:/OWNERS diff --git a/omapi/java/android/se/omapi/OWNERS b/omapi/java/android/se/omapi/OWNERS index 39c5c5bdeb09..375d643f7ed1 100644 --- a/omapi/java/android/se/omapi/OWNERS +++ b/omapi/java/android/se/omapi/OWNERS @@ -1,2 +1,2 @@ # Bug component: 456592 -include platform/packages/apps/Nfc:/OWNERS +include platform/packages/modules/Nfc:/OWNERS diff --git a/packages/SettingsLib/src/com/android/settingslib/media/OWNERS b/packages/SettingsLib/src/com/android/settingslib/media/OWNERS index d58add4bb5eb..a34876dd1e0e 100644 --- a/packages/SettingsLib/src/com/android/settingslib/media/OWNERS +++ b/packages/SettingsLib/src/com/android/settingslib/media/OWNERS @@ -3,5 +3,8 @@ ethibodeau@google.com michaelmikhil@google.com apotapov@google.com +# Output Switcher OWNERS +file:/packages/SystemUI/src/com/android/systemui/media/dialog/OWNERS + #Android Media - For minor changes and renames only. aquilescanta@google.com #{LAST_RESORT_SUGGESTION} diff --git a/packages/SystemUI/OWNERS b/packages/SystemUI/OWNERS index 7fadcc4e6065..09c0cf7a2ac1 100644 --- a/packages/SystemUI/OWNERS +++ b/packages/SystemUI/OWNERS @@ -13,7 +13,6 @@ alexflo@google.com andonian@google.com amiko@google.com austindelgado@google.com -aroederer@google.com arteiro@google.com asc@google.com awickham@google.com @@ -103,7 +102,6 @@ stwu@google.com syeonlee@google.com sunnygoyal@google.com thiruram@google.com -tkachenkoi@google.com tracyzhou@google.com tsuji@google.com twickham@google.com diff --git a/packages/SystemUI/plugin_core/proguard.flags b/packages/SystemUI/plugin_core/proguard.flags index 6240898b3b93..8b78ba47fdfc 100644 --- a/packages/SystemUI/plugin_core/proguard.flags +++ b/packages/SystemUI/plugin_core/proguard.flags @@ -8,4 +8,7 @@ -keep interface com.android.systemui.plugins.annotations.** { *; } --keep,allowshrinking,allowoptimization,allowobfuscation,allowaccessmodification @com.android.systemui.plugins.annotations.** class * +# TODO(b/373579455): Evaluate if <init> needs to be kept. +-keep,allowshrinking,allowoptimization,allowobfuscation,allowaccessmodification @com.android.systemui.plugins.annotations.** class * { + void <init>(); +} diff --git a/packages/SystemUI/proguard_common.flags b/packages/SystemUI/proguard_common.flags index 02b2bcf8e40d..2224837748a1 100644 --- a/packages/SystemUI/proguard_common.flags +++ b/packages/SystemUI/proguard_common.flags @@ -12,8 +12,14 @@ # Note that we restrict this to SysUISingleton classes, as other registering # classes should either *always* unregister or *never* register from their # constructor. We also keep callback class names for easier debugging. --keepnames @com.android.systemui.util.annotations.WeaklyReferencedCallback class * --keepnames class * extends @com.android.systemui.util.annotations.WeaklyReferencedCallback ** +# TODO(b/373579455): Evaluate if <init> needs to be kept. +-keepnames @com.android.systemui.util.annotations.WeaklyReferencedCallback class * { + void <init>(); +} +# TODO(b/373579455): Evaluate if <init> needs to be kept. +-keepnames class * extends @com.android.systemui.util.annotations.WeaklyReferencedCallback ** { + void <init>(); +} -if @com.android.systemui.util.annotations.WeaklyReferencedCallback class * -keepclassmembers,allowaccessmodification @com.android.systemui.dagger.SysUISingleton class * { <1> *; @@ -23,10 +29,16 @@ <1> *; } --keep class androidx.core.app.CoreComponentFactory +# TODO(b/373579455): Evaluate if <init> needs to be kept. +-keep class androidx.core.app.CoreComponentFactory { + void <init>(); +} # Keep the wm shell lib --keep class com.android.wm.shell.* +# TODO(b/373579455): Evaluate if <init> needs to be kept. +-keep class com.android.wm.shell.* { + void <init>(); +} # Keep the protolog group methods that are called by the generated code -keepclassmembers class com.android.wm.shell.protolog.ShellProtoLogGroup { *; diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/OWNERS b/packages/SystemUI/src/com/android/systemui/accessibility/OWNERS index 1ed8c068f974..5a59b7aaef56 100644 --- a/packages/SystemUI/src/com/android/systemui/accessibility/OWNERS +++ b/packages/SystemUI/src/com/android/systemui/accessibility/OWNERS @@ -1,4 +1,7 @@ -# Bug component: 44215 +# Bug component: 1530954 +# +# The above component is for automated test bugs. If you are a human looking to report +# a bug in this codebase then please use component 44215. include /core/java/android/view/accessibility/OWNERS jonesriley@google.com
\ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/ailabs/OWNERS b/packages/SystemUI/src/com/android/systemui/ailabs/OWNERS index b65d29c6a0bb..429b4b0fccab 100644 --- a/packages/SystemUI/src/com/android/systemui/ailabs/OWNERS +++ b/packages/SystemUI/src/com/android/systemui/ailabs/OWNERS @@ -5,5 +5,4 @@ linyuh@google.com pauldpong@google.com praveenj@google.com vicliang@google.com -mfolkerts@google.com yuklimko@google.com diff --git a/packages/SystemUI/src/com/android/systemui/notetask/OWNERS b/packages/SystemUI/src/com/android/systemui/notetask/OWNERS index 0ec996be72de..9b4902a9e7b2 100644 --- a/packages/SystemUI/src/com/android/systemui/notetask/OWNERS +++ b/packages/SystemUI/src/com/android/systemui/notetask/OWNERS @@ -6,5 +6,4 @@ madym@google.com mgalhardo@google.com petrcermak@google.com stevenckng@google.com -tkachenkoi@google.com -vanjan@google.com
\ No newline at end of file +vanjan@google.com diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS b/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS index 5558ab1e2af2..d284cde2356f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/OWNERS @@ -3,7 +3,6 @@ set noparent # Bug component: 78010 aioana@google.com -aroederer@google.com iyz@google.com jeffdq@google.com juliacr@google.com diff --git a/packages/SystemUI/src/com/android/systemui/stylus/OWNERS b/packages/SystemUI/src/com/android/systemui/stylus/OWNERS index 0ec996be72de..9b4902a9e7b2 100644 --- a/packages/SystemUI/src/com/android/systemui/stylus/OWNERS +++ b/packages/SystemUI/src/com/android/systemui/stylus/OWNERS @@ -6,5 +6,4 @@ madym@google.com mgalhardo@google.com petrcermak@google.com stevenckng@google.com -tkachenkoi@google.com -vanjan@google.com
\ No newline at end of file +vanjan@google.com diff --git a/packages/SystemUI/tests/src/com/android/systemui/notetask/OWNERS b/packages/SystemUI/tests/src/com/android/systemui/notetask/OWNERS index 0ec996be72de..9b4902a9e7b2 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/notetask/OWNERS +++ b/packages/SystemUI/tests/src/com/android/systemui/notetask/OWNERS @@ -6,5 +6,4 @@ madym@google.com mgalhardo@google.com petrcermak@google.com stevenckng@google.com -tkachenkoi@google.com -vanjan@google.com
\ No newline at end of file +vanjan@google.com diff --git a/packages/SystemUI/tests/src/com/android/systemui/stylus/OWNERS b/packages/SystemUI/tests/src/com/android/systemui/stylus/OWNERS index 0ec996be72de..9b4902a9e7b2 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/stylus/OWNERS +++ b/packages/SystemUI/tests/src/com/android/systemui/stylus/OWNERS @@ -6,5 +6,4 @@ madym@google.com mgalhardo@google.com petrcermak@google.com stevenckng@google.com -tkachenkoi@google.com -vanjan@google.com
\ No newline at end of file +vanjan@google.com diff --git a/services/accessibility/OWNERS b/services/accessibility/OWNERS index 4e1175034b5b..ab1e9ffe3bfe 100644 --- a/services/accessibility/OWNERS +++ b/services/accessibility/OWNERS @@ -1,4 +1,7 @@ -# Bug component: 44215 +# Bug component: 1530954 +# +# The above component is for automated test bugs. If you are a human looking to report +# a bug in this codebase then please use component 44215. # Android Accessibility Framework owners danielnorman@google.com diff --git a/services/accessibility/java/com/android/server/accessibility/magnification/OWNERS b/services/accessibility/java/com/android/server/accessibility/magnification/OWNERS new file mode 100644 index 000000000000..ff812ad7e7e6 --- /dev/null +++ b/services/accessibility/java/com/android/server/accessibility/magnification/OWNERS @@ -0,0 +1,8 @@ +# Bug component: 1530954 +# +# The above component is for automated test bugs. If you are a human looking to report +# a bug in this codebase then please use component 770744. + +juchengchou@google.com +chenjean@google.com +chihtinglo@google.com diff --git a/services/core/Android.bp b/services/core/Android.bp index 47c600e398c3..1f22f086284c 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp @@ -275,9 +275,15 @@ java_genrule { out: ["services.core.priorityboosted.jar"], } +java_genrule_combiner { + name: "services.core.combined", + static_libs: ["services.core.priorityboosted"], + headers: ["services.core.unboosted"], +} + java_library { name: "services.core", - static_libs: ["services.core.priorityboosted"], + static_libs: ["services.core.combined"], } java_library_host { diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index ca8dadde3bea..8d0118173030 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -14678,11 +14678,13 @@ public class AudioService extends IAudioService.Stub final String key = "additional_output_device_delay"; final String reply = AudioSystem.getParameters( key + "=" + device.getInternalType() + "," + device.getAddress()); - long delayMillis; - try { - delayMillis = Long.parseLong(reply.substring(key.length() + 1)); - } catch (NullPointerException e) { - delayMillis = 0; + long delayMillis = 0; + if (reply.contains(key)) { + try { + delayMillis = Long.parseLong(reply.substring(key.length() + 1)); + } catch (NullPointerException e) { + delayMillis = 0; + } } return delayMillis; } @@ -14708,11 +14710,13 @@ public class AudioService extends IAudioService.Stub final String key = "max_additional_output_device_delay"; final String reply = AudioSystem.getParameters( key + "=" + device.getInternalType() + "," + device.getAddress()); - long delayMillis; - try { - delayMillis = Long.parseLong(reply.substring(key.length() + 1)); - } catch (NullPointerException e) { - delayMillis = 0; + long delayMillis = 0; + if (reply.contains(key)) { + try { + delayMillis = Long.parseLong(reply.substring(key.length() + 1)); + } catch (NullPointerException e) { + delayMillis = 0; + } } return delayMillis; } diff --git a/services/core/java/com/android/server/display/LocalDisplayAdapter.java b/services/core/java/com/android/server/display/LocalDisplayAdapter.java index 0570b2ab510b..34d59d86bead 100644 --- a/services/core/java/com/android/server/display/LocalDisplayAdapter.java +++ b/services/core/java/com/android/server/display/LocalDisplayAdapter.java @@ -725,6 +725,11 @@ final class LocalDisplayAdapter extends DisplayAdapter { if (isDisplayPrivate(physicalAddress)) { mInfo.flags |= DisplayDeviceInfo.FLAG_PRIVATE; } + + if (isDisplayStealTopFocusDisabled(physicalAddress)) { + mInfo.flags |= DisplayDeviceInfo.FLAG_OWN_FOCUS; + mInfo.flags |= DisplayDeviceInfo.FLAG_STEAL_TOP_FOCUS_DISABLED; + } } if (DisplayCutout.getMaskBuiltInDisplayCutout(res, mInfo.uniqueId)) { @@ -1395,6 +1400,23 @@ final class LocalDisplayAdapter extends DisplayAdapter { } return false; } + + private boolean isDisplayStealTopFocusDisabled(DisplayAddress.Physical physicalAddress) { + if (physicalAddress == null) { + return false; + } + final Resources res = getOverlayContext().getResources(); + int[] ports = res.getIntArray(R.array.config_localNotStealTopFocusDisplayPorts); + if (ports != null) { + int port = physicalAddress.getPort(); + for (int p : ports) { + if (p == port) { + return true; + } + } + } + return false; + } } private boolean hdrTypesEqual(int[] modeHdrTypes, int[] recordHdrTypes) { diff --git a/services/core/java/com/android/server/logcat/OWNERS b/services/core/java/com/android/server/logcat/OWNERS index 33e1873d91fa..2913cc9bf19e 100644 --- a/services/core/java/com/android/server/logcat/OWNERS +++ b/services/core/java/com/android/server/logcat/OWNERS @@ -3,6 +3,5 @@ cbrubaker@google.com eunjeongshin@google.com georgechan@google.com -jsharkey@google.com wenhaowang@google.com xiaozhenl@google.com diff --git a/services/core/java/com/android/server/notification/OWNERS b/services/core/java/com/android/server/notification/OWNERS index 9f16662fd749..43c68d10b3ce 100644 --- a/services/core/java/com/android/server/notification/OWNERS +++ b/services/core/java/com/android/server/notification/OWNERS @@ -2,8 +2,7 @@ juliacr@google.com yurilin@google.com -aroederer@google.com matiashe@google.com valiiftime@google.com jeffdq@google.com -dsandler@android.com
\ No newline at end of file +dsandler@android.com diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 2a03dcbdfbc5..6f9d53d1320a 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -1476,7 +1476,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService ArchiveState archiveState; synchronized (mLock) { PackageSetting ps = mSettings.getPackageLPr(packageName); - if (ps == null) { + if (ps == null || snapshot.shouldFilterApplication(ps, binderUid, userId)) { return null; } var psi = ps.getUserStateOrDefault(userId); diff --git a/services/core/java/com/android/server/security/OWNERS b/services/core/java/com/android/server/security/OWNERS index fa4bf228c683..7a31a0006bb9 100644 --- a/services/core/java/com/android/server/security/OWNERS +++ b/services/core/java/com/android/server/security/OWNERS @@ -3,5 +3,6 @@ include /core/java/android/security/OWNERS per-file *AttestationVerification* = file:/core/java/android/security/attestationverification/OWNERS +per-file *CertificateRevocationStatus* = file:/core/java/android/security/attestationverification/OWNERS per-file FileIntegrity*.java = victorhsieh@google.com per-file KeyChainSystemService.java = file:platform/packages/apps/KeyChain:/OWNERS diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 4f9b1ccce6b1..1a3f54ae9a18 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -723,8 +723,14 @@ public class WindowManagerService extends IWindowManager.Stub new WallpaperVisibilityListeners(); IDisplayChangeWindowController mDisplayChangeController = null; - private final DeathRecipient mDisplayChangeControllerDeath = - () -> mDisplayChangeController = null; + private final DeathRecipient mDisplayChangeControllerDeath = new DeathRecipient() { + @Override + public void binderDied() { + synchronized (mGlobalLock) { + mDisplayChangeController = null; + } + } + }; final DisplayWindowListenerController mDisplayNotificationController; final TaskSystemBarsListenerController mTaskSystemBarsListenerController; diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 7972d9c6fba3..e4ab7685d787 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -875,6 +875,17 @@ public final class SystemServer implements Dumpable { SystemServiceRegistry.sEnableServiceNotFoundWtf = true; + // Prepare the thread pool for init tasks that can be parallelized + SystemServerInitThreadPool tp = SystemServerInitThreadPool.start(); + mDumper.addDumpable(tp); + + if (android.server.Flags.earlySystemConfigInit()) { + // SystemConfig init is expensive, so enqueue the work as early as possible to allow + // concurrent execution before it's needed (typically by ActivityManagerService). + // As native library loading is also expensive, this is a good place to start. + startSystemConfigInit(t); + } + // Initialize native services. System.loadLibrary("android_servers"); @@ -907,9 +918,6 @@ public final class SystemServer implements Dumpable { mDumper.addDumpable(mSystemServiceManager); LocalServices.addService(SystemServiceManager.class, mSystemServiceManager); - // Prepare the thread pool for init tasks that can be parallelized - SystemServerInitThreadPool tp = SystemServerInitThreadPool.start(); - mDumper.addDumpable(tp); // Lazily load the pre-installed system font map in SystemServer only if we're not doing // the optimized font loading in the FontManagerService. @@ -1057,6 +1065,14 @@ public final class SystemServer implements Dumpable { } } + private void startSystemConfigInit(TimingsTraceAndSlog t) { + Slog.i(TAG, "Reading configuration..."); + final String tagSystemConfig = "ReadingSystemConfig"; + t.traceBegin(tagSystemConfig); + SystemServerInitThreadPool.submit(SystemConfig::getInstance, tagSystemConfig); + t.traceEnd(); + } + private void createSystemContext() { ActivityThread activityThread = ActivityThread.systemMain(); mSystemContext = activityThread.getSystemContext(); @@ -1095,11 +1111,11 @@ public final class SystemServer implements Dumpable { mDumper.addDumpable(watchdog); t.traceEnd(); - Slog.i(TAG, "Reading configuration..."); - final String TAG_SYSTEM_CONFIG = "ReadingSystemConfig"; - t.traceBegin(TAG_SYSTEM_CONFIG); - SystemServerInitThreadPool.submit(SystemConfig::getInstance, TAG_SYSTEM_CONFIG); - t.traceEnd(); + // Legacy entry point for starting SystemConfig init, only needed if the early init flag is + // disabled and we haven't already triggered init before bootstrap services. + if (!android.server.Flags.earlySystemConfigInit()) { + startSystemConfigInit(t); + } // Orchestrates some ProtoLogging functionality. if (android.tracing.Flags.clientSideProtoLogging()) { diff --git a/services/java/com/android/server/flags.aconfig b/services/java/com/android/server/flags.aconfig index ec74ef191b81..7ab209aa5efb 100644 --- a/services/java/com/android/server/flags.aconfig +++ b/services/java/com/android/server/flags.aconfig @@ -10,6 +10,13 @@ flag { } flag { + namespace: "system_performance" + name: "early_system_config_init" + description: "Perform earlier initialization of SystemConfig in system server startup." + bug: "383869534" +} + +flag { name: "remove_text_service" namespace: "wear_frameworks" description: "Remove TextServiceManagerService on Wear" diff --git a/services/proguard.flags b/services/proguard.flags index cdd41abf6c7c..1ab10dcd847b 100644 --- a/services/proguard.flags +++ b/services/proguard.flags @@ -15,7 +15,10 @@ # APIs referenced by dependent JAR files and modules # TODO(b/300514883): Pull @SystemApi keep rules from system-api.pro. --keep interface android.annotation.SystemApi +# TODO(b/373579455): Evaluate if <init> needs to be kept. +-keep interface android.annotation.SystemApi { + void <init>(); +} -keep @android.annotation.SystemApi class * { public protected *; } diff --git a/services/tests/displayservicetests/src/com/android/server/display/LocalDisplayAdapterTest.java b/services/tests/displayservicetests/src/com/android/server/display/LocalDisplayAdapterTest.java index 120cc84193cd..0dd645587cc7 100644 --- a/services/tests/displayservicetests/src/com/android/server/display/LocalDisplayAdapterTest.java +++ b/services/tests/displayservicetests/src/com/android/server/display/LocalDisplayAdapterTest.java @@ -250,6 +250,34 @@ public class LocalDisplayAdapterTest { PORT_C, false); } + /** + * Confirm that display is marked as trusted, has own focus, disables steal top focus when it + * is listed in com.android.internal.R.array.config_localNotStealTopFocusDisplayPorts. + */ + @Test + public void testStealTopFocusDisabledDisplay() throws Exception { + setUpDisplay(new FakeDisplay(PORT_A)); + setUpDisplay(new FakeDisplay(PORT_B)); + setUpDisplay(new FakeDisplay(PORT_C)); + updateAvailableDisplays(); + + doReturn(new int[]{ PORT_B }).when(mMockedResources).getIntArray( + com.android.internal.R.array.config_localNotStealTopFocusDisplayPorts); + mAdapter.registerLocked(); + + waitForHandlerToComplete(mHandler, HANDLER_WAIT_MS); + + // This should not have the flags + assertNotStealTopFocusFlag(mListener.addedDisplays.get(0).getDisplayDeviceInfoLocked(), + PORT_A, false); + // This should have the flags + assertNotStealTopFocusFlag(mListener.addedDisplays.get(1).getDisplayDeviceInfoLocked(), + PORT_B, true); + // This should not have the flags + assertNotStealTopFocusFlag(mListener.addedDisplays.get(2).getDisplayDeviceInfoLocked(), + PORT_C, false); + } + @Test public void testSupportedDisplayModesGetOverriddenWhenDisplayIsUpdated() throws InterruptedException { @@ -314,6 +342,42 @@ public class LocalDisplayAdapterTest { } /** + * Confirm that all local displays are not trusted, do not have their own focus, and do not + * steal top focus when config_localNotStealTopFocusDisplayPorts is empty: + */ + @Test + public void testDisplayFlagsForNoConfigLocalNotStealTopFocusDisplayPorts() throws Exception { + setUpDisplay(new FakeDisplay(PORT_A)); + setUpDisplay(new FakeDisplay(PORT_C)); + updateAvailableDisplays(); + + // config_localNotStealTopFocusDisplayPorts is null + mAdapter.registerLocked(); + + waitForHandlerToComplete(mHandler, HANDLER_WAIT_MS); + + // This should not have the flags + assertNotStealTopFocusFlag(mListener.addedDisplays.get(0).getDisplayDeviceInfoLocked(), + PORT_A, false); + // This should not have the flags + assertNotStealTopFocusFlag(mListener.addedDisplays.get(1).getDisplayDeviceInfoLocked(), + PORT_C, false); + } + + private static void assertNotStealTopFocusFlag( + DisplayDeviceInfo info, int expectedPort, boolean shouldHaveFlags) { + final DisplayAddress.Physical address = (DisplayAddress.Physical) info.address; + assertNotNull(address); + assertEquals(expectedPort, address.getPort()); + assertEquals(DISPLAY_MODEL, address.getModel()); + assertEquals(shouldHaveFlags, + (info.flags & DisplayDeviceInfo.FLAG_STEAL_TOP_FOCUS_DISABLED) != 0); + assertEquals(shouldHaveFlags, (info.flags & DisplayDeviceInfo.FLAG_OWN_FOCUS) != 0); + // display is always trusted since it is created by the system + assertEquals(true, (info.flags & DisplayDeviceInfo.FLAG_TRUSTED) != 0); + } + + /** * Confirm that external display uses physical density. */ @Test diff --git a/services/tests/ondeviceintelligencetests/OWNERS b/services/tests/ondeviceintelligencetests/OWNERS index a4fc7582a785..d08d34ad3108 100644 --- a/services/tests/ondeviceintelligencetests/OWNERS +++ b/services/tests/ondeviceintelligencetests/OWNERS @@ -1,3 +1,2 @@ shiqing@google.com sandeepbandaru@google.com -shivanker@google.com diff --git a/services/tests/servicestests/src/com/android/server/accessibility/OWNERS b/services/tests/servicestests/src/com/android/server/accessibility/OWNERS index c824c3948e2d..c7c23f081044 100644 --- a/services/tests/servicestests/src/com/android/server/accessibility/OWNERS +++ b/services/tests/servicestests/src/com/android/server/accessibility/OWNERS @@ -1,3 +1,6 @@ -# Bug component: 44215 +# Bug component: 1530954 +# +# The above component is for automated test bugs. If you are a human looking to report +# a bug in this codebase then please use component 44215. include /core/java/android/view/accessibility/OWNERS diff --git a/services/tests/servicestests/src/com/android/server/accessibility/magnification/OWNERS b/services/tests/servicestests/src/com/android/server/accessibility/magnification/OWNERS new file mode 100644 index 000000000000..9592bfdfa73b --- /dev/null +++ b/services/tests/servicestests/src/com/android/server/accessibility/magnification/OWNERS @@ -0,0 +1,6 @@ +# Bug component: 1530954 +# +# The above component is for automated test bugs. If you are a human looking to report +# a bug in this codebase then please use component 770744. + +include /services/accessibility/java/com/android/server/accessibility/magnification/OWNERS diff --git a/services/usb/java/com/android/server/usb/UsbPortManager.java b/services/usb/java/com/android/server/usb/UsbPortManager.java index 55a89239b864..86468b0cf821 100644 --- a/services/usb/java/com/android/server/usb/UsbPortManager.java +++ b/services/usb/java/com/android/server/usb/UsbPortManager.java @@ -200,7 +200,11 @@ public class UsbPortManager implements IBinder.DeathRecipient { mHandler.sendEmptyMessage(MSG_SYSTEM_READY); } - private void updateContaminantNotification() { + private void updateContaminantNotificationLocked() { + if (mNotificationManager == null) { + return; + } + PortInfo currentPortInfo = null; Resources r = mContext.getResources(); int contaminantStatus = UsbPortStatus.CONTAMINANT_DETECTION_NOT_DETECTED; @@ -1171,7 +1175,7 @@ public class UsbPortManager implements IBinder.DeathRecipient { private void handlePortLocked(PortInfo portInfo, IndentingPrintWriter pw) { sendPortChangedBroadcastLocked(portInfo); logToStatsd(portInfo, pw); - updateContaminantNotification(); + updateContaminantNotificationLocked(); } private void handlePortAddedLocked(PortInfo portInfo, IndentingPrintWriter pw) { @@ -1433,6 +1437,9 @@ public class UsbPortManager implements IBinder.DeathRecipient { case MSG_SYSTEM_READY: { mNotificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); + synchronized (mLock) { + updateContaminantNotificationLocked(); + } break; } } diff --git a/tests/SharedLibrary/lib/Android.bp b/tests/SharedLibrary/lib/Android.bp index 0595cb1e116a..abfd0e869b45 100644 --- a/tests/SharedLibrary/lib/Android.bp +++ b/tests/SharedLibrary/lib/Android.bp @@ -15,6 +15,7 @@ android_app { export_package_resources: true, privileged: true, optimize: { + keep_runtime_invisible_annotations: true, proguard_flags_files: ["proguard.proguard"], }, } diff --git a/tests/SharedLibrary/lib/proguard.proguard b/tests/SharedLibrary/lib/proguard.proguard index e5dfbe1c453d..699fbdaaadad 100644 --- a/tests/SharedLibrary/lib/proguard.proguard +++ b/tests/SharedLibrary/lib/proguard.proguard @@ -1,6 +1,8 @@ -keepparameternames -keepattributes Exceptions,InnerClasses,Signature,Deprecated, - SourceFile,LineNumberTable,*Annotation*,EnclosingMethod + SourceFile,LineNumberTable,EnclosingMethod, + RuntimeVisibleAnnotations,RuntimeVisibleParameterAnnotations, + RuntimeVisibleTypeAnnotations,AnnotationDefault -keep public class * { public protected *; diff --git a/tools/aosp/upload_aosp.sh b/tools/aosp/upload_aosp.sh new file mode 100755 index 000000000000..c36057b302cb --- /dev/null +++ b/tools/aosp/upload_aosp.sh @@ -0,0 +1,116 @@ +#!/bin/bash + +set -eu + +DRYRUN=false +VERBOSE=false +DEST_BRANCH_NAME="main" +AOSP_URL="" + +function log_info() { + echo -e "\033[32m$1\033[m" +} + +function log_warn() { + echo -e "\033[33m$1\033[m" +} + +function log_fatal() { + echo -e "\033[31mERROR: $1\033[m" > /dev/stderr + exit 1 +} + +while [[ $# -gt 0 ]]; do + case $1 in + -b|--branch) + DEST_BRANCH_NAME=$2 + shift + shift + ;; + -v|--verbose) + set -x + VERBOSE=true + shift + ;; + -n|--dryrun) + DRYRUN=true + shift + ;; + -u|--url) + AOSP_URL=$2 + shift + shift + ;; + --help) + echo "$0 <options>" + echo + echo "Options:" + echo " -b, --branch <branch> : destination AOSP branch, default is $DEST_BRANCH_NAME" + echo " -n, --dryrun : do not upload CL" + echo " -u, --url : AOSP repo URL. Default is to use existing 'aosp' remote or guess the URL." + echo " -v, --verbose : show verbose output" + echo + exit 0 + ;; + -*|--*) + echo "Unknown option $i" + exit 1 + ;; + *) + ;; + esac +done + +if $VERBOSE; then + log_info "DRYRUN=$DRYRUN" + log_info "DEST_BRANCH_NAME=$DEST_BRANCH_NAME" +fi + +current_branch=$(git branch --no-color --show-current) +if [ -z "$current_branch" ]; then + log_fatal "use 'repo start' first" +fi + +tmp_branch="aosp_$current_branch" + +if [ -z "$AOSP_URL" ]; then + AOSP_URL=$(git config --get remote.goog.url | sed 's/googleplex-//') +fi + +if $VERBOSE; then + log_info "AOSP_URL=$AOSP_URL" + log_info "current_branch=$current_branch" + log_info "tmp_branch=$tmp_branch" +fi + +log_info "Running repo hooks..." +repo upload -c . -n -y + +log_info "Setting up AOSP repo..." +existing_aosp_url=$(git config --get remote.aosp.url 2>/dev/null || true) +if [ -z "$existing_aosp_url" ]; then + git remote add aosp $AOSP_URL +elif [ "$existing_aosp_url" != "$AOSP_URL"]; then + log_warn "Remote 'aosp' uses $existing_aosp_url. Expected $AOSP_URL" +fi + +log_info "Fetching '$DEST_BRANCH_NAME'" +git fetch aosp $DEST_BRANCH_NAME + +log_info "Creating $tmp_branch and cherry-picking..." +git branch -D $tmp_branch 2>/dev/null || true +git checkout -b $tmp_branch +git branch --set-upstream-to aosp/$DEST_BRANCH_NAME +git reset --hard aosp/$DEST_BRANCH_NAME +git cherry-pick goog/$DEST_BRANCH_NAME..$current_branch + +if $DRYRUN; then + log_info "Dryrun specified, skipping CL upload" +else + log_info "Pushing to AOSP..." + git push aosp HEAD:refs/for/$DEST_BRANCH_NAME +fi + +log_info "Cleaning up..." +git checkout $current_branch +git branch -D $tmp_branch
\ No newline at end of file |