Commit Graph

219 Commits

Author SHA1 Message Date
Evan Laird
2bcdbe0bce Remove test for battery percent paint being equal to bolt paint
BatteryMeterView used to draw both the charging bolt and the powersave
'+' symbol as the same color. However the plus sign is drawn as
colorError now, so the test isn't needed anymore.

Test: runtest  -x packages/SettingsLib/tests/integ/src/com/android/settingslib/graph/BatteryMeterDrawableBaseTest.java
Change-Id: I014fbc65d96bed727e880ac492913c2e5d50f405
Fixes: 112205156
2018-08-06 17:48:51 -04:00
Fan Zhang
23baea9b5f Remove unused fields and move ProfileSelect to Settings
Bug: 77600770
Test: rebuild
Change-Id: I34bbf888324901f707fba13274196a4b1ca846da
2018-08-02 13:53:33 -07:00
Fan Zhang
83dde97b30 Add activityInfo and getIcon() method in Tile class.
Moved loading icon logic from TileUtils into Tile#getIcon().

TileUtils only load things once and cache forever but getIcon()
loads a fresh icon every time to avoid any caching issue.

Bug: 77600770
Test: robotests
Change-Id: I706225e382ebd5b72e91edef43bfc7427fa64590
2018-07-25 14:53:32 -07:00
Fan Zhang
416dd57fa2 Delete SettingsDrawerActivity entirely.
Bug: 77600770
Bug: 110259478
Test: rebuild
Change-Id: I48e6c3c96b3e708719e21eac3cc6c12b9dc54177
2018-07-20 10:28:49 -07:00
pastychang
a2998fc3ee Remove TtsSpan from Ssid
Telephone type span caused talkback stop to read next texture in Setupwizard wifi page. Remove it and doesn't impact previous issue ag/1468171.
New Google TTS can recognize work and doesn't only spell words.

Test: atest
Bug: b/110104543
Change-Id: I4f37a6280294446e5f33ea3620366803b6d30a4e
2018-06-27 02:45:45 +00:00
Fan Zhang
cd63e94186 Merge "Update misc settingslib icons" into pi-dev am: ee555d5f90
am: 2f8f73e98c

Change-Id: I1db25982e492ae94c5d950bb030af5e0bf1569c3
2018-05-15 20:02:10 -07:00
Fan Zhang
eb0c976995 Update misc settingslib icons
- new icon size for edit pencil
- removed home.xml, it's not needed by anything except test

Bug: 77982107
Test: visual
Change-Id: I451bc12c4a57e5f61e7c561c394b00bd95e7228d
2018-05-16 01:38:39 +00:00
android-build-team Robot
aab0b2f06b Merge "Make isValidSystemNonAuxAsciiCapableIme stateless" 2018-04-27 22:49:40 +00:00
Yohei Yukawa
4faac7d9ef Make isValidSystemNonAuxAsciiCapableIme stateless
This CL simplifies SettingsLib by making
isValidSystemNonAuxAsciiCapableIme() method stateless.

Although this can be a minor user-visible behavior change, we believe
it is acceptable because the behavior we are going to drop is a
fallback rule in case there is no system IME that could be considered
ASCII capable without actual AsciiCapable attribute..  Even without
this fallback rule the System Settings does not fall into a bad state.
It only affects the sort order of the IME enabler page and minor
optional cosmetic behavior.

The bottom line is that if a pre-installed IME is ASCII capable, it
really should annotate itself to be so, rather than relying on some
heuristic logic that we have had.

With this CL, SettingsLib no longer depends on InputMethodUtils.

Fix: 77730201
Test: atest InputMethodPreferenceTest
Test: make RunSettingsLibRoboTests -j
Change-Id: I1352bf42dcb9219a370a16a381ea39c43c57637a
2018-04-27 14:00:06 -07:00
Jovana Knezevic
317f7de44c Merge "Fixes null-ref when trying to start Guest session." into pi-dev am: 8491304cf6
am: 9df8e55021

Change-Id: Ie1b89ca436d97718d01b7d9382e8a68513736f44
2018-04-26 13:07:56 -07:00
jovanak
6639c4dfa1 Fixes null-ref when trying to start Guest session.
CarUserSwitchingDialog threw null-ref because Guest didn't have
a default avatar.

1. Adds null guard in case default avatar is not set.
2. Populates default Guest avatar correctly.

Fixes:77546931
Fixes:78588087
Test: Manual, observing the default icon when starting a guest session.
       Manual, observing the switching dialog icon without a default icon.

Change-Id: Iacbfcc65147fdbc5515c0d96eb613fb17543f6b3
2018-04-25 16:10:59 -07:00
TreeHugger Robot
a47c03960b Merge "Make getLanguageFromLocaleString private" 2018-04-18 19:01:05 +00:00
Yohei Yukawa
e9eff660e0 Make getLanguageFromLocaleString private
As part of effort to lock down the use of InputMethodUtils only within
the core system components, this CL removes the dependency on
InputMethodUtils#getLanguageFromLocaleString() from the Settings UI
code.

At high level, there should be no user visible behavior change.

Bug: 77730201
Test: atest SettingsLibTests:com.android.settingslib.inputmethod.InputMethodSubtypePreferenceTest
Change-Id: I92cc0b0808f3e40ab92b60ec783ad218141f2bbd
2018-04-13 16:28:20 -07:00
Nader Jawad
6a8727ebce Updated UserIconDrawable#shouldUpdateColorFilter to return true if
current ColorFilter was not an instance of PorterDuffColorFilter

Fixed issue where UserIcondrawable#shouldUpdateColorFilter would
mistakenly return false if the current ColorFilter was not a
PorterDuffColor filter leading to color tints to not be applied if no
ColorFilter was applied previously.

Change-Id: I463932403723b2542cb79e4d996b5ffdc4c32f98
Fixes: 77907724
Test: Re-ran atest on UserIcondrawable
2018-04-12 16:18:00 -07:00
Jovana Knezevic
ccb8eb3858 Merge "Adds user broadcasts to UserManagerHelper." into pi-dev 2018-04-11 22:20:33 +00:00
jovanak
82029aedff Separates current process user and foreground user
User switcher wrongly called methods on the current process user,
which is always User 0 for SysUI.

Instead, user switcher requires knowledge about foreground user.
The process of user switching = changing the foreground
user.

Split tests between unit and robolectric.
Robolectric tests enable shadowing ActivityManager and UserHandle.

Fixes:77485524
Test: Unit and robolectric tests.
Change-Id: I20cc32f132ce48b4507a6907bdc9d103c04f4a30
2018-04-11 11:45:09 -07:00
jovanak
5e523fa378 Adds user broadcasts to UserManagerHelper.
Same broadcasts supported by UserSwitcherController.

Car User switcher listens to user changes.
Switcher needs to hear when the user is switched to dismiss the
keyguard,which causes the switching animation to terminate.

Bug:77653809
Test: Unit tests.
Change-Id: I633cbd9045e7254dcc173ca0e1118fca06c669df
2018-04-11 17:18:19 +00:00
Nicolas Geoffray
b0284fb5de Exempt tests for hidden APIs.
Bug: 64382372
Bug: 74963051
Test: m
Change-Id: I5234dd6230f2bdd6ffccbf12b25a02d929d20161
2018-04-06 14:54:39 +01:00
jovanak
12f105e54a Adding user accessor functions to UserManagerHelper.
Fixing a failing test. Currently unable to test removing current user, since current user is system user.

Fixes: 73415209
Test: unit tests
Change-Id: Ie374aa97383e3dd8ec4ef96b0d680fa8a04172b5
2018-03-29 15:28:31 -07:00
Jovana Knezevic
c7034f7ab1 Merge "Adding UserManagerHelper class to SettingsLib." into pi-dev 2018-03-21 19:34:32 +00:00
jovanak
10a5d7fe22 Adding UserManagerHelper class to SettingsLib.
It's a simple wrapper for adding/removing/switching users.

It provides an interface to register listeners for user changes.

Moving it here to be used in CarSettings and SystemUI for the car.

It's not car-specific, so it could be used by anyone who needs it.

Fixes: 74456332
Bug: 74456744
Test: Unit tests in UserManagerHelperTest.java.
Change-Id: I94b3051ed1e4f96d98e5ab2a7a5a7fa75bc5cade
2018-03-20 13:51:35 -07:00
Sundeep Ghuman
93d591bccb Prevent callbacks after onStop is called.
Bug: 74196862
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: Idab27f7d493fdd097d55aac40750912e454addb2
2018-03-19 16:31:48 -07:00
Sundeep Ghuman
5fde6405f8 Add tests to prevent NPE regression.
Bug: 73484770
Test: runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: Idd909dc3ac78ba9ed75ff06040b2c0842a7c74b8
2018-03-12 12:59:24 -07:00
Anton Hansson
d137c872cd frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Exempt-From-Owner-Approval: Global cleanup
Change-Id: I26458e41ecb84de91ac9a356a5d4bafb44f463c1
2018-03-07 11:42:04 +00:00
TreeHugger Robot
008c4dbcf9 Merge "Display connected AP when there are no scanresults" 2018-02-26 21:23:12 +00:00
Andreas Gampe
7dbcb8fc87 SettingsLib: Fix assertThat in test
Truth.assertThat is a fluent-style API. Fix the tests to actually
do something.

Found by errorprone.

Bug: 73513670
Test: atest WifiTrackerTest
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Ic16cded73ad5192d6c32033e41e72e39277729c6
2018-02-26 11:36:41 -08:00
Sundeep Ghuman
06ec3bed0e Display connected AP when there are no scanresults
Bug: 68030053
Test: runtest --path
    frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
1. Visual verification of UI when opening WifiSettings directly from
screen off longer than 5 minutes (no scan results scenario).

Change-Id: I7e4d9a3abb861b485b0a952a1a4b822f2460bdc2
2018-02-21 16:44:51 -08:00
Sundeep Ghuman
f34217408a Convert forceUpdate to 'onStart' lifecycle event.
Although the AccessPointControllerImpl class is modified, there is no
longer a wifi picker in QuickSettings.

Bug: 68030053
Test: runtest --path
      frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Manual testing of WifiSettings cold start / resumption scenarios for UI
jank

Change-Id: Ib28edebb0acf4160cc9eda7c1620c1b4280dcdc4
2018-02-15 15:03:53 -08:00
Sundeep Ghuman
dc67f4d26c Change WifiListenerWrapper to WifiListenExecutor.
The executor no longer instantiates it's on main thread handler, and
instead uses ThreadUtils.postOnMainThread.

Also clean up WifiTracker tests, since the custom Handlers have been
removed, and the broadcast receiver method is invoked directly in the
tests, it is no longer necessary to wait for handlers to finish processing
messages.

Although the only asynchronous source code (invocation of WifiListener
methods) is now mockable via WifiListenerExecutor injection,
CountDownLatches used in cases where verifying multiple mock invocations
would be confusing due to test setup behavior.

Bug: 68030053
Test: runtest --path
    frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: I485c62d81ec2cdd3d53ed3e258ae6b40837cdc51
2018-02-15 15:03:52 -08:00
Sundeep Ghuman
bcb5373c8b Delete the WorkHandler class.
All work is still performed on the given workThread, just without the
need for a custom Handler class.

Bug: 68030053
Test: runtest --path
    frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: Id4509821e51a1a8e1b171710b33b83212f2a506a
2018-02-15 15:03:52 -08:00
Sundeep Ghuman
c5bbecb35d Consolidate all work in the WorkHandler.
Fix flakey tests, and remove indeterminism in tests but asserting all
latches successfully countdown.

Bug: 68030053
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: I68f108929d563bc323a28bdfb3c9eb514630630b
2018-02-14 13:40:01 -08:00
Sundeep Ghuman
bb39991c52 Remove the double lists in WifiTracker.
This CL completes the final removal of the double handler, double list,
pending notification complexity that was introduced ag/1396615 as a
'fix' to improper API implementation of the AccessPointListener
callback. The implementation erroneously refetched the entire
WifiTracker list and then performed its own sorting everytime an
individual AccessPoint was updated, instead of waiting for WifiTracker's
WifiListener.onAccessPointsChanged (plural) method instead.

Those changes have now been reverted, and the underlying SetupWizard
code has changed since then such that it does not need to be modified to
prevent regressions.

Bug: 37674366
Test: 1. runtest --path
    frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
2. runtest --path
    frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
3. Manual testing of WifiSettings for visual jank
4. Startup and manual inspection of SetupWizard Wifi Picker.

Change-Id: Ia4079859a7a892983ecf55ba8eab13d20120ff99
2018-02-14 11:52:55 -08:00
Sundeep Ghuman
91f4ccb4b7 Delete the MainHandler and remaining code.
As of ag/3516264 this is no longer required. Next CL will remove the
double lists and pending notification structure.

Bug: 37674366
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
1. Manual testing of WifiSettings for visual jank
2. Start up and confirmation of SetupWizard wifi picker.

Change-Id: I3f2c649375f245295a00177f805d6d3e883fe656
2018-02-14 11:52:55 -08:00
Sundeep Ghuman
c0cf84845a Remove methods from MainHandler.
Followup from ag/3516264 where callbacks are now already invoked on the
main thread. There is no reason to execute this methods on the
MainThread. Removing UPDATE_ACCESS_POINTS in following CL as it has more logic
in that requires careful modification.

Also make changes to how verbose logging is determined (now respects
logging tag as well as developer option) and log callbacks.

Bug: 37674366
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: I373af3a65596d478ec25bd2c67a41fc3c7033beb
2018-02-14 11:52:55 -08:00
Fan Zhang
92a2613353 Use framework onNavigateUp() instead of simply finish().
- Simply finishing activity bypasses the entire nav-up chain, making
  taskAffinity/parentActivity defined in androidmanifest.xml no-op, which
  is bad.

- Also removed showMenu() logic, this is from drawer era and was only
  needed by mobile settings. We no longer need drawer so this method can
  be removed.

Bug: 72337421
Test: atest

Change-Id: Idee1b72751363b5162887a799197404a9498c83e
2018-02-07 10:50:03 -08:00
Sundeep Ghuman
0d492e8365 Clean up updateAccessPoints.
Remove obsolete logic, refactor for efficiency and readability. No
longer make redundant, duplicate IPCs.

Bug: b/68030053
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: I1a1077c1adaacbd759521451a994a7655befdf58
2018-01-26 18:19:31 -08:00
Sundeep Ghuman
8d157e38f2 Remove unused variables and resulting conditionals.
WifiTracker always is used in 'includeScans' mode, and is never used in
includeSaved mode. The former variable was not even referenced. The
original functionality of includeSaved true and includeScans mode was
for rendering the Saved Access Points page, which is now provided by
another utility. All calling apps currently filter out unreachable saved
networks they receive from WifiTracker.

Subsequent CLs will modify the updateAccessPointsLocked loop to simply
insert config data into existing APs, thus reducing the complexity of
thi class.

Bug: 68030053
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: I7adb6de2e700c48543d7a43419527052f2909cc0
2018-01-26 13:49:35 -08:00
Sundeep Ghuman
04f7f34a71 Remove double cache eviction logic.
WifiTracker and AccessPoint both maintain their own caches of
ScanResults and dictate their own grouping logic. This leads to various
issues, such as dropping APs during network selection. Remove the double
cache eviction logic, making WifiTracker the source of truth for
evicting and grouping ScanResults.

Consolidate on AccessPoint time based eviction logic. In place swap of
logic, with subsequent wifi tracker clean up and cache rekeying to
follow in later CLs. Logic was left as close to original location for
reviewer ease and will be rearranged in following CLs.

Moves existing key generation logic from AccessPointPreference into
AccessPoint.java

BUG: 64989100
Test: runtest runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
make RunSettingsLibRoboTests
make RunSettingsRoboTests
Manual inspection of WifiSettings jitter when changing networks / moving
across floors.

Change-Id: Id30a34b08e14fc8da2c9d29dfcb5d1e8973cc18c
2018-01-26 09:24:45 -08:00
jackqdyulei
9ee9b39eb4 Move debug log summary to WifiUtils
This cl is the first step to clean up the AccessPoint.

Bug: 70983952
Test: RunSettingsLibRoboTests
Change-Id: I23b5b4bee6f4533ea7e59ede3dc9c66af80bf0b6
2017-12-22 11:42:40 -08:00
Michael Plass
992588ca30 Fix flaky WifiTrackerTest
The rssiChangeBroadcastShouldUpdateConnectedAp uses two CountDownLatch instances to
synchronize the events on the main thread and the handler thread. The "latch" informs
the main thread that mockWifiManager.getConnectionInfo() has been called and allows it
to proceed, and "mAccessPointsChangedLatch" notes that onAccessPointsChanged is called.
But mAccessPointsChangedLatch was assigned after "latch" released the main thread,
so that on occasion the main thread could try to use it before this assignment, causing
the timeout.

Move the assignment of mAccessPointsChangedLatch to before the body of the test
to prevent this race.

Bug: 70163367
Test: runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I62c1ef9a2155ffbd08b5e07e94723b28102d1f6d
2017-12-14 05:44:28 +00:00
TreeHugger Robot
83297f29c0 Merge "Fix WifiTrackerTest stopTrackingShouldRemove . . ." 2017-12-14 01:10:07 +00:00
Philip P. Moltmann
68366073e4 Switch to modern ArgumentMatchers
Test: - adb shell am instrument -w -e class com.android.mediaframeworktest.unit.MediaInserterTest com.android.mediaframeworktest/android.support.test.runner.AndroidJUnitRunner
      - atest com.android.settingslib.users.AppRestrictionsHelperTest
      - atest com.android.server.NetworkScorerAppManagerTest com.android.server.accessibility.MotionEventInjectorTest com.android.server.webkit.WebViewUpdateServiceTest
Change-Id: I6d4c543541d3bebcd65e5aa9e3f4d9a0152d5583
2017-12-12 13:06:18 -08:00
Michael Plass
fd4a90db22 Fix WifiTrackerTest stopTrackingShouldRemove . . .
Fix a race condition in
com.android.settingslib.wifi.WifiTrackerTest#stopTrackingShouldRemoveWifiListenerCallbacks

Bug: 70171301
Test: runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Test: repeat the test lots of times - failure rate was < 1% before fix.
Change-Id: Ib9c9cb3dbfb3413484530be5fc0c2e20fd470b97
2017-12-11 22:59:52 +00:00
Paul Duffin
57e4f25f09 Merge "Stop statically including legacy-android-test" 2017-12-08 18:02:27 +00:00
Paul Duffin
b866307f99 Stop statically including legacy-android-test
Statically including legacy-android-test leads to duplicate classes
which causes build time problems (with Proguard) and runtime problems on
older SDK versions. This change:
* Stops statically including legacy-android-test.
* Adds compile time dependencies on andoid.test.base, android.test.mock
  and android.test.runner where necessary.
* Adds <uses-library android:name="android.test.runner"/> to any
  affected package to ensure that the classes that were included by
  legacy-android-test are still available at runtime. That also adds a
  dependency on android.test.base and android.test.mock.

The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* apct-tests/perftests/core/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in CorePerfTests results
    in duplicate classes which leads to build time and compile time
    issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CorePerfTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

* core/tests/ConnectivityManagerTest/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    ConnectivityManagerTest's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in ConnectivityManagerTest
    results in duplicate classes which leads to build time and compile
    time issues.

* core/tests/bandwidthtests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    BandwidthTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in BandwidthTests results
    in duplicate classes which leads to build time and compile time
    issues.

* core/tests/bluetoothtests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    BluetoothTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in BluetoothTests results
    in duplicate classes which leads to build time and compile time
    issues.

* core/tests/hosttests/test-apps/DownloadManagerTestApp/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in DownloadManagerTestApp
    results in duplicate classes which leads to build time and compile
    time issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    DownloadManagerTestApp's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path.

* core/tests/hosttests/test-apps/ExternalSharedPerms/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    ExternalSharedPermsTestApp results in duplicate classes which leads
    to build time and compile time issues.

* core/tests/hosttests/test-apps/ExternalSharedPermsBT/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    ExternalSharedPermsBTTestApp results in duplicate classes which
    leads to build time and compile time issues.

* core/tests/hosttests/test-apps/ExternalSharedPermsDiffKey/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    ExternalSharedPermsDiffKeyTestApp results in duplicate classes
    which leads to build time and compile time issues.

* core/tests/hosttests/test-apps/ExternalSharedPermsFL/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    ExternalSharedPermsFLTestApp results in duplicate classes which
    leads to build time and compile time issues.

* core/tests/notificationtests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    NotificationStressTests's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in NotificationStressTests
    results in duplicate classes which leads to build time and compile
    time issues.

* keystore/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in KeystoreTests results
    in duplicate classes which leads to build time and compile time
    issues.

* media/mca/tests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CameraEffectsTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in CameraEffectsTests
    results in duplicate classes which leads to build time and compile
    time issues.

* media/tests/MediaFrameworkTest/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    mediaframeworktest's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in mediaframeworktest
    results in duplicate classes which leads to build time and compile
    time issues.

* nfc-extras/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in NfcExtrasTests results
    in duplicate classes which leads to build time and compile time
    issues.

* packages/CarrierDefaultApp/tests/unit/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CarrierDefaultAppUnitTests's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    CarrierDefaultAppUnitTests results in duplicate classes which leads
    to build time and compile time issues.

* packages/ExtServices/tests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    ExtServicesUnitTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in ExtServicesUnitTests
    results in duplicate classes which leads to build time and compile
    time issues.

* packages/MtpDocumentsProvider/tests/Android.mk
    Added 'android.test.base' and 'android.test.mock' to
    LOCAL_JAVA_LIBRARIES because MtpDocumentsProviderTests's source
    depends on their classes and because of these changes they are no
    longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    MtpDocumentsProviderTests results in duplicate classes which leads
    to build time and compile time issues.

* packages/SettingsLib/tests/integ/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    SettingsLibTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SettingsLibTests
    results in duplicate classes which leads to build time and compile
    time issues.

* packages/SettingsProvider/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SettingsProvider
    results in duplicate classes which leads to build time and compile
    time issues.

* packages/SettingsProvider/AndroidManifest.xml
    Add uses-library for android.test.runner because otherwise this
    change would change the set of files available to SettingsProvider
    at runtime.

* packages/Shell/tests/Android.mk
    Added 'android.test.base' and 'android.test.mock' to
    LOCAL_JAVA_LIBRARIES because ShellTests's source depends on their
    classes and because of these changes they are no longer present on
    the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in ShellTests results in
    duplicate classes which leads to build time and compile time
    issues.

* packages/SystemUI/shared/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SystemUISharedLibTests
    results in duplicate classes which leads to build time and compile
    time issues.

* packages/SystemUI/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SystemUITests results
    in duplicate classes which leads to build time and compile time
    issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    SystemUITests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

* packages/WAPPushManager/tests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    WAPPushManagerTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in WAPPushManagerTests
    results in duplicate classes which leads to build time and compile
    time issues.

* sax/tests/saxtests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    FrameworksSaxTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in FrameworksSaxTests
    results in duplicate classes which leads to build time and compile
    time issues.

* tests/BrowserPowerTest/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    BrowserPowerTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in BrowserPowerTests
    results in duplicate classes which leads to build time and compile
    time issues.

* tests/CanvasCompare/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CanvasCompare's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in CanvasCompare results
    in duplicate classes which leads to build time and compile time
    issues.

* tests/CoreTests/android/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CoreTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in CoreTests results in
    duplicate classes which leads to build time and compile time
    issues.

* tests/DataIdleTest/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    DataIdleTest's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in DataIdleTest results in
    duplicate classes which leads to build time and compile time
    issues.

* tests/FrameworkPerf/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    FrameworkPerf's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in FrameworkPerf results
    in duplicate classes which leads to build time and compile time
    issues.

* tests/HierarchyViewerTest/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    HierarchyViewerTest's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in HierarchyViewerTest
    results in duplicate classes which leads to build time and compile
    time issues.

* tests/ImfTest/tests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    ImfTestTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in ImfTestTests results in
    duplicate classes which leads to build time and compile time
    issues.

* tests/Internal/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in InternalTests results
    in duplicate classes which leads to build time and compile time
    issues.

* tests/MemoryUsage/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    MemoryUsage's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in MemoryUsage results in
    duplicate classes which leads to build time and compile time
    issues.

* tests/NetworkSecurityConfigTest/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    NetworkSecurityConfigTests's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    NetworkSecurityConfigTests results in duplicate classes which leads
    to build time and compile time issues.

* tests/SoundTriggerTests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SoundTriggerTests
    results in duplicate classes which leads to build time and compile
    time issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    SoundTriggerTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

* tests/SurfaceComposition/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SurfaceComposition
    results in duplicate classes which leads to build time and compile
    time issues.

    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    SurfaceComposition's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

* tests/TtsTests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in TtsTests results in
    duplicate classes which leads to build time and compile time
    issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    TtsTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

* tests/WindowAnimationJank/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in WindowAnimationJank
    results in duplicate classes which leads to build time and compile
    time issues.

* tests/permission/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    FrameworkPermissionTests's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    FrameworkPermissionTests results in duplicate classes which leads
    to build time and compile time issues.

* tests/testables/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in TestablesTests results
    in duplicate classes which leads to build time and compile time
    issues.

    Added 'android.test.base' and 'android.test.mock' to
    LOCAL_JAVA_LIBRARIES because TestablesTests's source depends on
    their classes and because of these changes they are no longer
    present on the compilation path.

Bug: 30188076
Test: make checkbuild
Change-Id: Iacfc939c97415314366ed61c5f3b7aa1a40f0ec9
2017-12-08 00:07:17 +00:00
Aurimas Liutikas
41df109aca Move SettingsLib tests and EasterEgg to aapt2.
Test: make -j SettingsLibTests
Change-Id: I38fbd6af7eb5707d76fb930b4d685e30b26f45de
2017-12-07 23:25:48 +00:00
Tarandeep Singh
b360b995c9 Add new SystemApi InputMethod attr isVrOnly.
In order to support VR-only InputMethod, new attribute 'isVrOnly' is
added.

Bug: 63037786
Test: atest InputMethodInfoTest
Change-Id: Iab936df9972212f56277ef9c18d9e1f67f92a913
2017-12-05 13:37:14 -08:00
Fan Zhang
2c7a5288c1 Add method to show/hide preference in base controller
- Reformat AbstractPreferenceController
- Also drive by fix: move UserIconDrawableTest to integ test.

Bug: 68956750
Test: robotests
Test: atest UserIconDrawableTest
Change-Id: I9812f0e169b520e56c088b325b9267e94d7fbc29
2017-11-07 10:33:24 -08:00
Daniel Nishi
dbdc059d4d Merge "Fix a cache calculation regression." into oc-mr1-dev am: fcd9565ec5
am: aed0474a6d

Change-Id: If9b4497b41f2f917ac1d2da18beca53fb854a454
2017-10-03 20:41:59 +00:00
Daniel Nishi
13d875fb52 Fix a cache calculation regression.
Cache size was being double-counted for apps in their drilldown.

Change-Id: I44ec03470050dfbce392348c3336dd5e9bb54c36
Fixes: 67028136
Test: SettingsLib integ tests
2017-10-03 10:16:38 -07:00