Commit Graph

27 Commits

Author SHA1 Message Date
Aditya Choudhary
4f5c1ac5bc [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
go/new-android-ownership-model

Bug: 304529413
Test: N/A
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3f65505208d57fa18be353f815c44fdd6f004f4b)
Merged-In: I7fbd55a92f4302a6e03bcff0283737fd9295165d
Change-Id: I7fbd55a92f4302a6e03bcff0283737fd9295165d
2024-02-09 16:54:41 +00:00
Krzysztof Kosiński
c81fbcef2e Clean up obsolete aliases for Truth.
Bug: 255714762
Test: presubmit
Change-Id: I8aab463c74d5e869d949a2b712886a9cc4d15709
2023-10-11 19:39:33 +00:00
Fangqiu Su
38cf6857b5 Update uiautomator references in packages/apps/Settings/tests/anomaly-tester
* Remove unused dependencies.
* Replace "ub-uiautomator" (v2.2.0) with
  "androidx.test.uiautomator_uiautomator" (v2.3.0).

Bug: 235842600
Test: mmma .
Change-Id: I35dcf0166b233f0e371857ea1b650f5803ccc561
2023-04-24 17:33:03 +00:00
Jeff Sharkey
9e07eab08f Request new Bluetooth runtime permissions.
An upcoming platform change is introducing a new "Nearby devices"
runtime permission which contains the new BLUETOOTH_CONNECT and
BLUETOOTH_SCAN permissions.

We have logic in place to use <split-permission> to translate the
older BLUETOOTH and BLUETOOTH_ADMIN permissions into these new
runtime permissions, but modern apps will need to pivot to
requesting them directly as part of targeting Android S.

This change requests both the old and new permissions to avoid
breakage while the new permission enforcement is being phased in.

Bug: 181813006
Test: atest CtsPermission2TestCases
Test: atest CtsPermission3TestCases
Test: atest CtsStatsdAtomHostTestCases
Change-Id: I0a6ff040520deaa7c7a6fecd83e8608a9bf28c4a
2021-03-23 12:35:36 +00:00
Bob Badour
a73a67240c [LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Settings
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  protos/Android.bp
  tests/anomaly-tester/Android.bp
  tests/componenttests/Android.bp
  tests/legacy_unit/InstrumentedEntitlementApp/Android.bp
  tests/perftests/Android.bp
  tests/robotests/Android.bp
  tests/uitests/Android.bp
  tests/unit/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I58a85aced69923fa9a8e5a2b89ecfdd33de5e05c
2021-02-25 15:05:14 -08:00
Bob Badour
18e9723489 Revert "[LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Settings"
This reverts commit 0e73d05c74.

Change-Id: I627be6c5355eda9602b1cb201806fce4548fc951
2021-02-25 11:52:32 -08:00
Bob Badour
0e73d05c74 [LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Settings
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  protos/Android.bp
  tests/anomaly-tester/Android.bp
  tests/perftests/Android.bp
  tests/robotests/Android.bp
  tests/uitests/Android.bp
  tests/unit/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: I81f11a66b5977cb5096e262819084706af5fa54c
Merged-in: I81f11a66b5977cb5096e262819084706af5fa54c
2021-02-21 08:50:16 -08:00
Colin Cross
946a0fd964 Convert Settings to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Test: m RunSettingsRoboTests-jacoco
Change-Id: I267534c095c30833f77273dbdb1893b7830ed45d
2019-05-13 13:42:01 -07:00
Brett Chabot
031dcf5019 Migrate packages/apps/Settings to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: If67b124188fd4e303154eb11263d03abfb3718c6
2018-12-17 09:20:05 -08:00
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -07:00
Narayan Kamath
42614c6787 Merge "AnomalyTester: Remove dependency on bouncycastle." 2018-02-23 17:36:59 +00:00
hansson
a42bfa83df Merge "packages/apps/Settings: Set LOCAL_SDK_VERSION where possible." am: f5b75dd74d am: aa0812f42b
am: 685b923a1b

Change-Id: I39a6aad6f8bf21741de4feb838694ab43dc5d074
2018-02-23 07:35:31 +00:00
hansson
685b923a1b Merge "packages/apps/Settings: Set LOCAL_SDK_VERSION where possible." am: f5b75dd74d
am: aa0812f42b

Change-Id: I6ef97b4506cf656194090bcf9b0df543190f1e79
2018-02-23 07:30:14 +00:00
Anton Hansson
861554a2d9 packages/apps/Settings: 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
Change-Id: Ic906adbd670c4dbfe2cdf0b71cdbeaf9ac08a27e
2018-02-22 16:12:29 +00:00
Narayan Kamath
b5fa88039f AnomalyTester: Remove dependency on bouncycastle.
Not used by this package.

Note: This change is a no-op because this package links directly
against the boot classpath (which contains bouncycastle).

Test: make
Bug: 73635411
Change-Id: I9edf0c0445a63235f58a6cbfabeb90be14974474
2018-02-21 10:27:24 +00:00
Bill Yi
bf2ff34004 Import translations. DO NOT MERGE
Change-Id: I7e2bf66b896c6fab42a643a7c74535b354b0d94c
Auto-generated-cl: translation import
2017-12-22 15:05:08 -08:00
Bill Yi
b504e3c1dc Import translations. DO NOT MERGE
Change-Id: I7bbec8bd3d4424dfaeefc0770d3057993963ba86
Auto-generated-cl: translation import
2017-12-19 11:37:10 -08:00
Bill Yi
e55bc2b591 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 69925163
Change-Id: I4c880093e20e7178ce80006b158fefd490b4e061
2017-11-30 04:05:41 -08:00
Bill Yi
05fe7d0cd4 Import translations. DO NOT MERGE
Change-Id: I4578cba6e0521f8a6d7fea69c2ae2ab5dd0ea8bf
Auto-generated-cl: translation import
2017-11-20 11:38:20 -08:00
Fan Zhang
6438ee5466 Mark core unit tests for Presubmit
Bug: 68716631
Bug: 68720368
Test: rerun test
Change-Id: Ia8cca6aede824928fc358b005172bbe2ed670c8f
2017-10-31 14:09:31 -07:00
Bill Yi
ef8151c8b3 Import translations. DO NOT MERGE
Change-Id: If965ef4d51917904739ed4726b036a285adc6d6d
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-09-06 08:15:05 -07:00
jackqdyulei
d8bfc74256 Add functional test for wakelock anomaly detector
Bug: 63815938
Test: runtest -x WakelockAnomalyTest
Change-Id: I4d10d5be8b38264f29c67c2c945fdbbd1090430d
2017-08-25 14:02:39 -07:00
jackqdyulei
e4298941b4 Add functional test for bt anomaly detector
This cl:
Set up the environment for functional test
1. Update Android.mk by adding instrumentation and libs
2. Update AndroidManifest.xml by adding runner

Add functional test for bt anomaly, with the following workflow
1. reset battery stats
2. pretend unplug and screen off
3. Start AnomalyTester app, set values and click start button
4. Wait its running
5. Check anomaly preference in battery main page
6. reset all parameters

Bug: 63815938
Test: runtest -x BluetoothAnomalyTest
Change-Id: Ief02a314d21f6c32d70729047a1d4bdce9ad9920
2017-08-25 13:45:16 -07:00
jackqdyulei
0cc62f860c Add wakelock action in testing app
This cl adds action to hold the wakelock for specific time. With
this action we could test whether wakelock detector is effective.

Bug: 2731722
Test: make -j40 AnomalyTester
Change-Id: I1d44c12363f126ea9b8fc44f4c135e46b898186c
2017-08-24 16:15:44 -07:00
jackqdyulei
9d78df0d30 Add bt anomaly action in testing app
This cl adds the action to start bluttooth unoptimized scanning.
With this action we could test whether bt anomaly detector is
effective.

Bug: 62602318
Test: make -j40 AnomalyTester
Change-Id: I7f41dbb07384fbf3c5a81e460a3629306bc33f59
2017-08-24 16:15:24 -07:00
jackqdyulei
693fe62fe0 Add UI components for bluetooth anomaly
Bug: 62602318
Test: make -j40 AnomalyTester
Change-Id: I4584e6ada784d8d87558a5b30cf55e2de33d443a
2017-08-23 17:37:18 -07:00
jackqdyulei
7e97d2d9a5 Set up anomaly test app in settings
This cl set up the basic android framework for anomly test app.
Anomaly test app has the similar architecture compared with
settings api tester.

1. Add Android.mk and AndroidManifest.xml
2. Add blank AnomalyActivity
3. Add related resource files.

Bug: 62602318
Test: make -j40 AnomalyTester
Change-Id: I1d59517c9c2d8d0b8e219e3a67dfae73ca5a968e
2017-08-23 17:35:26 -07:00