Make all comparisons using startsWith for partition checks more
robust by appending a forward flash.
Also add a test.
Bug: 80741439
Test: atest FrameworksServicesTests:PackageManagerServiceTest
Change-Id: Ibe085d0edec44bf8b49f313209f9aec22b70aec1
Adds an option to mask the cutout by effectively shrinking the logical display
such that developers can test apps as if the device did not have a notch.
Bug: 112876936
Test: Go to Settings > Developer Options > Simulate display with cutout > "No cutout". Cutout should be hidden. Rotate screen, take screenshots, screenrecord, screen off animation should all work as expected.
Change-Id: I5cdb201734d238bf3785ab55843114e4b5b4ee41
- If the user has already updated whether DND should
block notifications or not, the dnd upgrade dialog should
never appear
Change-Id: Icd3ab7568caf17d8d6c92de605b879e785e365c8
Fixes: 112584967
Test: ZenModeHelperTest, manual
ag/3915086 modified AccountManagerService to use the PackageManagerInternal returned from
LocalServices. However when AccountManagerServiceTest runs tests against AccountManagerService
it is using a local instance of the object which does not have access to system's local
PackageManagerInternal. To resolve this a mock PackageManagerInternal is added to the LocalServices
with a mocked hasSignatureCapability that returns an appropriate response based on the test. This
fix also exposed an issue that appears to be introduced by ag/2959363; with the change in
checkKeyIntent to no longer throw a SecurityException the expected return code for error paths
is now AccountManager.ERROR_CODE_REMOTE_EXCEPTION.
A small change was also added to AccountsDbTest to skip testCeNotAvailableInitially on eng builds
as the Log.wtf would crash the test process when invoked on eng builds.
Test: adb shell am instrument -w -e package com.android.server.accounts \
com.android.frameworks.servicestests/\
android.support.test.runner.AndroidJUnitRunner
Bug: 80380639
Change-Id: I9438550d1c19cc86ec56991da766d71e068784ab
Merged-In: I9438550d1c19cc86ec56991da766d71e068784ab
This CL makes sure that the start-up process of an activity has
completed and ActivityStack#mResumedActivity is set as the activity
before removing the activity in TaskStackChangedListenerTest.
Otherwise, onTaskRemovalStarted, which is a callback expected to be
called in TaskStackChangedListenerTest is not called because of the
following logic in ActivityStack#finishActivityLocked().
if (mResumedActivity == r) {
mService.getTaskChangeNotificationController().notifyTaskRemovalStarted(task.taskId);
}
Currently, whether mResumeActivity is set before removing the
activity is not guaranteed, which causes flakiness in some
environments such as ARC. (it's 50/50 whether it's set properly or
not. ) This CL guarantees this and make the tests pass all the time.
Bug: 110908055
Test: atest TaskStackChangedListenerTest
Change-Id: Ieb9f2ffe40de4e79ef2bf43c4036625ce0b63304
ag/3915086 modified AccountManagerService to use the PackageManagerInternal returned from
LocalServices. However when AccountManagerServiceTest runs tests against AccountManagerService
it is using a local instance of the object which does not have access to system's local
PackageManagerInternal. To resolve this a mock PackageManagerInternal is added to the LocalServices
with a mocked hasSignatureCapability that returns an appropriate response based on the test. This
fix also exposed an issue that appears to be introduced by ag/2959363; with the change in
checkKeyIntent to no longer throw a SecurityException the expected return code for error paths
is now AccountManager.ERROR_CODE_REMOTE_EXCEPTION.
A small change was also added to AccountsDbTest to skip testCeNotAvailableInitially on eng builds
as the Log.wtf would crash the test process when invoked on eng builds.
Test: adb shell am instrument -w -e package com.android.server.accounts \
com.android.frameworks.servicestests/\
android.support.test.runner.AndroidJUnitRunner
Bug: 80380639
Change-Id: I9438550d1c19cc86ec56991da766d71e068784ab
Implementations of HIDL interfaces are intended to extend
from the Stub class, not the core interface class.
Test: m FrameworksServicesTests
Test: frameworks/base/services/tests/runtests.py -e package "com.android.server.locksettings"
OK (454 tests)
Bug: 112334405
Change-Id: Ib060560fd74f0092544096210f52e1f7fcba6c06
System components (like MediaProvider) will live in a mount namespace
that has a view of the "real" shared storage device, and normal apps
will have "sandboxed" views of the shared storage device. (Parallel
changes are implementing these namespaces in vold and installd.)
The system components mentioned above will need to translate between
the two namespaces, so this change introduces methods that perform
that translation, along with a nice batch of tests to verify.
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/StorageManagerServiceTest.java
Bug: 111893193, 111892833, 111268862
Change-Id: Iae91a44ce09eb33d6cd9b90f6c7b4f88c8cd12f0
- onRestore, the ZEN_MODE_CONFIG_ETAG shouldn't change
even though creationTime for zen automatic rules are updated
Test: ZenModeHelperTest.java
Change-Id: If241143f6759553b3297e5d7f12e3a3caddbd17d
Fixes: 111415419
See go/jetpack-test-android-migration
cherrypicked from ag/4608401
Test: atest FrameworksServicesTests
Change-Id: I2d9641c681489135aa3167bb4c9b1296a1a6a4f7
Allow the notification assistant to block or silence
incoming notifications, or demote notifications after they
are posted
Also temporarily silence everything by default
Plus: bonus refactoring of the cancel notification runnable so I could
write just one of those tests :)
Bug: 111475013
Test: manual, runtest systemui-notification
Change-Id: Ifa04a21919f60d06080cd63e7d7747180b641308
- Clear the stack task list before each fetch and don't re-add all of them.
There is no functional change since the tasks are added to the same set
which will dedupe them.
Bug: 112467578
Test: atest FrameworksServicesTests:RunningTasksTest
Change-Id: I9c65771429b30d8e1d357843235b1a6deebfd402
This changes the global sort string such these notifications can bypass all others
Design doc linked in the bug
Bug:111793232
Test: unit tests added
Change-Id: If47019ecf79f71caba6f4984d4cc745fd0d40da0
Logging activity starts to TRON, but only if the caller app
doesn't have any foreground activity present.
Example event:
08-03 15:21:30.813 1231 3220 I sysui_multi_action: [757,1513,758,4,805,1533306090812,1514,10147,1515,com.google.android.talk,1516,1018,1517,0,1518,1000,1519,1000,1520,0,1521,10147,1522,com.google.android.talk,1523,1018,1524,0,1525,pendingintent:u0a12:com.google.android.talk/com.google.android.apps.hangouts.phone.ConversationActivity,1526,com.google.android.talk/com.google.android.apps.hangouts.phone.BabelHomeActivity,1527,1,1528,com.google.android.apps.hangouts.phone.conversationlist,1540,1,1541,com.google.android.apps.hangouts.phone.BabelHomeActivity,1542,3146240,1543,{com.google.android.talk/com.google.android.apps.hangouts.phone.BabelHomeActivity},1544,com.google.android.talk/com.google.android.apps.hangouts.phone.BabelHomeActivity,1545,com.google.android.talk,1546,1,1547,0,1551,0,1552,0]
(cherry-picked from 201bc0c14e)
Bug: b/111866309
Context: go/activity-starts-logging-tron
Test: 1) enable logging with: adb shell settings put global activity_starts_logging_enabled 1
2) open some activities and observe: adb logcat -b events | grep "sysui_multi_action: \[757,1513"
Test: atest FrameworksServicesTests:ActivityStarterTests
Change-Id: Ie7dee51c574e544d12e83d279afda46b336f2013
Logging activity starts to TRON, but only if the caller app
doesn't have any foreground activity present.
Example event:
08-03 15:21:30.813 1231 3220 I sysui_multi_action: [757,1513,758,4,805,1533306090812,1514,10147,1515,com.google.android.talk,1516,1018,1517,0,1518,1000,1519,1000,1520,0,1521,10147,1522,com.google.android.talk,1523,1018,1524,0,1525,pendingintent:u0a12:com.google.android.talk/com.google.android.apps.hangouts.phone.ConversationActivity,1526,com.google.android.talk/com.google.android.apps.hangouts.phone.BabelHomeActivity,1527,1,1528,com.google.android.apps.hangouts.phone.conversationlist,1540,1,1541,com.google.android.apps.hangouts.phone.BabelHomeActivity,1542,3146240,1543,{com.google.android.talk/com.google.android.apps.hangouts.phone.BabelHomeActivity},1544,com.google.android.talk/com.google.android.apps.hangouts.phone.BabelHomeActivity,1545,com.google.android.talk,1546,1,1547,0,1551,0,1552,0]
Bug: b/111866309
Context: go/activity-starts-logging-tron
Test: 1) enable logging with: adb shell settings put global activity_starts_logging_enabled 1
2) open some activities and observe: adb logcat -b events | grep "sysui_multi_action: \[757,1513"
Test: atest FrameworksServicesTests:ActivityStarterTests
Change-Id: Id63806a2d08a50f404268194a05c6e94bd7e9724