580 Commits

Author SHA1 Message Date
Jeff Sharkey
b758d37338 Merge "Grant Shell ability to clear cached app data." into oc-dev am: 1f58ad1a2f
am: 003572c3c8

Change-Id: Ifcb2d020b44fd69c08e411e5ace3d054887565eb
2017-04-11 23:30:12 +00:00
Jeff Sharkey
003572c3c8 Merge "Grant Shell ability to clear cached app data." into oc-dev
am: 1f58ad1a2f

Change-Id: Ieb4f37b861b9fd5a49d30d607de5589a355aa67d
2017-04-11 23:21:20 +00:00
Jeff Sharkey
a4daf89f0f Grant Shell ability to clear cached app data.
It already has CLEAR_APP_USER_DATA to clear everything inside app
storage, and clearing cached data is a subset of that.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 36731175
Change-Id: Iefc5be6c80e2562a95424fd6fe413bdb018201a9
2017-04-11 13:03:54 -06:00
Bill Yi
0ce53e517b Import translations. DO NOT MERGE
Change-Id: I9a94d8ec49ccccaa96264255fb25880194d8b1d1
Auto-generated-cl: translation import
2017-04-07 18:13:06 -07:00
Bill Yi
a26fc4989b Import translations. DO NOT MERGE
Change-Id: I607c98eb9f7d6c2b0df215be63e3f4431d911d5f
Auto-generated-cl: translation import
2017-04-07 18:09:24 -07:00
TreeHugger Robot
9b4a020d35 Merge "Change test type from InstrumentationTest to AndroidJUnitTest" 2017-04-01 01:22:46 +00:00
Winson Chung
c3bb1cecd0 Merge "Removing unnecessary permission." into oc-dev am: 26437c0f22
am: d889ca83c8

Change-Id: I50dd54a704707d64607e8ba3588e23c02056cb1b
2017-04-01 00:55:34 +00:00
Winson Chung
d889ca83c8 Merge "Removing unnecessary permission." into oc-dev
am: 26437c0f22

Change-Id: I877a50a58ede582ee446160b3adbc8713a60b9ee
2017-04-01 00:50:43 +00:00
Winson Chung
26437c0f22 Merge "Removing unnecessary permission." into oc-dev 2017-04-01 00:42:54 +00:00
Karthik Ravi Shankar
d7e1195435 Merge changes from topic 'launch-2d-activities-vr' into oc-dev am: f04d039584
am: d020369b77

Change-Id: I42e7ebe0f930457391caced6ed2e14c668aab41a
2017-04-01 00:12:12 +00:00
Karthik Ravi Shankar
d020369b77 Merge changes from topic 'launch-2d-activities-vr' into oc-dev
am: f04d039584

Change-Id: I820ec3a9c1379bf9bcc688e36bcfeb00ac753a22
2017-04-01 00:01:31 +00:00
TreeHugger Robot
f04d039584 Merge changes from topic 'launch-2d-activities-vr' into oc-dev
* changes:
  Allow shell uid to access Vr APIs
  Add vr persistent mode enable/disable
  Launch 2D activities in VR mode
2017-03-31 23:48:22 +00:00
Dan Shi
1fee398b88 Change test type from InstrumentationTest to AndroidJUnitTest
Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test

Change-Id: Ic3c4c7a9d29ef9d32a407f31cfc93c5e43650297
2017-03-31 16:02:33 -07:00
Winson Chung
e3ce20865c Removing unnecessary permission.
Bug: 36507456
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testFinishPipActivityWithTaskOverlay
Change-Id: I351b7afd648ceb0a200c01fa318c9a56dbe64a96
2017-03-31 14:03:39 -07:00
Karthik Ravi Shankar
ebc1b48922 Allow shell uid to access Vr APIs
Some of the Vr APIs in VrManagerService need to be accessed via shell to
be used for testing and for easy access. Add
android.permission.RESTRICTED_VR_ACCESS to shell uid.

Bug: 36071574
Test: adb shell vr set-persistent-vr-mode-enabled true
      adb shell dumpsys vrmanager
      >> Persistent VR mode is currently: enabled
      adb shell vr set-persistent-vr-mode-enabled false
      adb shell dumpsys vrmanager
      >> Persistent VR mode is currently: disabled

Change-Id: I486fa19f93d5c6999aa479fdf7e5f2f48f765240
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
2017-03-31 08:37:13 -07:00
Bill Yi
a06a809423 Import translations. DO NOT MERGE
Change-Id: I0464cc4b75e0258a5928867ab11e9c47a2b69319
Auto-generated-cl: translation import
2017-03-31 00:57:17 -07:00
Bill Yi
d40296804f Import translations. DO NOT MERGE
Change-Id: Ibfaa2fff382d377c4255c0407f552940dbf541df
Auto-generated-cl: translation import
2017-03-31 00:54:01 -07:00
Winson Chung
6954fc9a7e Fix issue with task overlay activities not finishing.
- The task overlay activity should only exist when there are activities
  present in the task.  When the last such activity is finished, we should
  remove the whole task entirely including the task overlay.
- Exposing the task overlay apis to CTS

Bug: 36507456
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testFinishPipActivityWithTaskOverlay
Change-Id: I1dabe7782fb6769a90d832664e8052be158041e1
2017-03-27 13:34:53 -07:00
Dmitri Plotnikov
dbf544f271 Merge "Adding TV-specific strings" 2017-03-24 15:59:00 +00:00
Dmitri Plotnikov
7ded2670fc Adding TV-specific strings
Bug: 36175844
Test: generate a bugreport and check the notification description
Change-Id: I0030d51e566cc2d68b4c87a9e7d7cbb0d5a21ac1
2017-03-23 16:33:55 -07:00
TreeHugger Robot
20fd49d8c7 Merge "Import translations. DO NOT MERGE" 2017-03-23 15:47:40 +00:00
Naveen Kalla
ca3d5434e8 Add API to request Bug Report with a certain title and description
ActivityManagerService will send the details to dumpstate and
BugreportProgressService will get the details from dumpstate and use
that for the notification.

Bug: 33561517
Test: Modify TelephonyMonitor to use this API and ensure that the
      notification uses that the title and description sent as arguments
      to the API. File a bug using betterBug and ensure that the
      information gets populated automatically.

Change-Id: I455f1df2278e5d569dd19c74245a0704dcf5a321
2017-03-23 12:06:04 +00:00
Bill Yi
ffdad377ee Import translations. DO NOT MERGE
Change-Id: I8451447e8a1f2409de44f4f7e26f83562e9a83ab
Auto-generated-cl: translation import
2017-03-23 00:56:16 -07:00
Chris Tate
b1669bf22b Merge "Give shell the CHANGE_DEVICE_IDLE_TEMP_WHITELIST permission" 2017-03-22 18:07:49 +00:00
Dan Shi
874a0916fc Merge "Add test configs to apct tests under frameworks/base" 2017-03-22 17:55:58 +00:00
Christopher Tate
ec3a9f3346 Give shell the CHANGE_DEVICE_IDLE_TEMP_WHITELIST permission
Shell needs to have this permission in order for the deviceidle
tempwhitelist shell command to exist.

Bug 34715096
Test: cts-tradefed run cts -m CtsAppTestCases \
  -t android.app.cts.ActivityManagerTest#testBackgroundCheckService

Change-Id: Ic1fdd87b6020649705ba0c9349dd00dd096037f3
2017-03-21 17:52:42 -07:00
Dan Shi
7f2afd2dff Add test configs to apct tests under frameworks/base
TouchLatency is needed by test TouchLatencyJankTestWear
UiBench is needed by test UiBenchJankTests

Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test
make -j32 TouchLatency TouchLatencyJankTestWear  && \
tradefed.sh run template/local --template:map test=TouchLatencyJankTestWear \
      --test-tag testname --log-level-display VERBOSE
make -j32 UiBenchJankTests UiBench  && \
tradefed.sh run template/local --template:map test=UiBenchJankTests \
      --test-tag testname --log-level-display VERBOSE

Change-Id: I63f23e3a21ad1343607953958fb7bb0a5fb8c343
2017-03-21 00:05:14 -07:00
Bill Yi
0a595f5e0c Import translations. DO NOT MERGE
Change-Id: I570e874a9059d3ecd42dc668e3c2a051e5e369b2
Auto-generated-cl: translation import
2017-03-18 01:40:55 -07:00
Simran Basi
473a16e492 frameworks/base: Add APCT tests to the device-tests suite.
This CL adds the APCT tests within this project to
a similar suite as CTS known as device-tests.

The current method of running APCT tests in the infrastructure
is unaffected.

Bug: 35882476
Test: `make dist device-tests -j` and local builds of
      continuous_instrumentation_tests & continuous_native_tests

Change-Id: Ifa382fe691842c1cd76897775b9e2a1653449eb5
2017-03-15 14:46:27 -07:00
Dmitri Plotnikov
ce42134828 Enabling bugreport notifications on TV
Bug: 36175844
Test: by generating a bugreport (long-press DPAD_CENTER + BACK)
Test: verified that BugreportProgressServiceTest still passes
Change-Id: If5bf53512c60a359838aa76dc61b90d4e67a45df
2017-03-14 08:19:13 -07:00
Alex Klyubin
1991f57230 Restrict access from apps to bluetooth_address setting
BluetoothManagerService for some reason leaks the Android's Bluetooth
MAC address via Settings.Secure which is normally readable by all
apps. This lets apps bypass the restriction on access to Bluetooth MAC
address from apps.

This commit fixes the issue by restricting access to bluetooth_address
secure setting (Settings.Secure). Only packages which hold the
android.permission.LOCAL_MAC_ADDRESS permission retain access.

This commit accordingly grants LOCAL_MAC_ADDRESS permission to the
system Shell app because a number of scripts (including Android CTS)
use "adb shell settings get secure bluetooth_address" as a convenient
way to query the device's Bluetooth MAC address over ADB. This is
acceptable because the user of the device can see the Bluetooth MAC
address and thus it's fine for shell to be able to see the address as
well.

Test: See CTS test added in the cts project in this topic.
Test: "adb shell settings get secure bluetooth_address" returns the
      Bluetooth MAC address of the Android.
Test: "adb shell settings list secure | grep bluetooth_address"
      returns the Bluetooth MAC address of the Android.
Test: Bluetooth works (toggling off/on, pairing, file transfer)
Bug: 33701414

Change-Id: I17b110b96eb3794b25c1661e93d29a7a003e3c9a
2017-03-03 14:25:14 -08:00
Jorim Jaggi
f631ef769a Fix sharing bugreports from lockscreen
When launching ChooserActivity from lockscreen, we will start it
in stopped state because lockscreen is still showing, meaning that
the activity goes through start -> resume -> pause -> stop
immediately after it was launched, and will be later resumed once
Keyguard actually goes away.

However, ResolverActivity finished itself in onStop. We add a
private extra to change this behavior for sharing bugreports.

Test: Take bugreport, double tap on it on lockscreen
Test: com.android.shell.BugreportReceiverTest$1
Bug: 33009364
Change-Id: I973b2c71587950499b7c88b16af9cf1387795e17
2017-02-24 17:37:08 +00:00
Mårten Kongstad
2e0d0f3111 OMS: integrate OverlayManagerService into framework
Hand over ownership of overlays to OverlayManagerService.

Changes to a package's overlays are propagated using the activity life
cycle. Affected activities will be recreated as needed. This provides a
well-defined point to modify an application's assets while the
application is paused.

Consolidate how overlays targeting the system and overlays targeting
regular applications are handled. Previously, system overlays were
handled as a special case. Now, everything is handled identically. As a
side effect, the call to idmap --scan during Zygote boot has become
obsolete and is removed.

Information on what overlays to use is recorded in
ApplicationInfo.resourceDirs. The PackageManagerService is responsible
for the creation of ApplicationInfo objects. The OverlayManagerService
is responsible for informing the PackageManagerService in advance about
what resourceDirs to use.

When launching an application, the ApplicationInfo is already populated
with up-to-date information about overlays.

When enabling or disabling an overlay for a running application, the
OverlayManagerService first notifies the PackageManagerService about the
updated resourceDirs. It then tells the ActivityManagerService to push
the new ApplicationInfo object to the application's ActivityThread.
Finally the application requests its ResourcesManager to create new
ResourcesImpl objects based on the updated paths.

Change-Id: Ib8afa05ccab4e2db558f89ce4423983c086bb61a
Co-authored-by: Martin Wallgren <martin.wallgren@sonymobile.com>
Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sonymobile.com>
Bug: 31052947
Test: run tests from 'OMS: tests for OverlayManagerService'
2017-02-23 14:01:38 -08:00
Guang Zhu
9545980692 Revert "OMS: integrate OverlayManagerService into framework"
Bug: 31052947
Bug: 35697944

This reverts commit 21a3d1ad686dee97b9cf0ed80389ee2ab0d48013.

Change-Id: I2d86931020301524c26cf8c8e80d557c97fdd6c3
2017-02-23 07:35:39 +00:00
Mårten Kongstad
21a3d1ad68 OMS: integrate OverlayManagerService into framework
Hand over ownership of overlays to OverlayManagerService.

Changes to a package's overlays are propagated using the activity life
cycle. Affected activities will be recreated as needed. This provides a
well-defined point to modify an application's assets while the
application is paused.

Consolidate how overlays targeting the system and overlays targeting
regular applications are handled. Previously, system overlays were
handled as a special case. Now, everything is handled identically. As a
side effect, the call to idmap --scan during Zygote boot has become
obsolete and is removed.

Information on what overlays to use is recorded in
ApplicationInfo.resourceDirs. The PackageManagerService is responsible
for the creation of ApplicationInfo objects. The OverlayManagerService
is responsible for informing the PackageManagerService in advance about
what resourceDirs to use.

When launching an application, the ApplicationInfo is already populated
with up-to-date information about overlays.

When enabling or disabling an overlay for a running application, the
OverlayManagerService first notifies the PackageManagerService about the
updated resourceDirs. It then tells the ActivityManagerService to push
the new ApplicationInfo object to the application's ActivityThread.
Finally the application requests its ResourcesManager to create new
ResourcesImpl objects based on the updated paths.

Co-authored-by: Martin Wallgren <martin.wallgren@sonymobile.com>
Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sonymobile.com>
Bug: 31052947
Test: run tests from 'OMS: tests for OverlayManagerService'
Change-Id: Idc96dae6fc075d5373aa055bbf50e919136d7353
2017-02-21 14:29:43 -08:00
Jerry Zhang
9c78253b75 Merge changes from topic 'svcusb' am: 5e2a2ee39e am: 6f44072d03 am: 35f8d6cfd0
am: fba74d6c61

Change-Id: I190467cba81aca56f32a0a6ff6d8e798e1e7ac30
2017-02-17 04:41:32 +00:00
Jerry Zhang
fba74d6c61 Merge changes from topic 'svcusb' am: 5e2a2ee39e am: 6f44072d03
am: 35f8d6cfd0

Change-Id: I10c0be37b583f1670cb98e926aefb9dc8b986843
2017-02-17 02:24:44 +00:00
Jerry Zhang
35f8d6cfd0 Merge changes from topic 'svcusb' am: 5e2a2ee39e
am: 6f44072d03

Change-Id: Ic30bca41e088c2d077dc5aa09e373a02acb60be6
2017-02-17 02:16:11 +00:00
Philip P. Moltmann
30a2d638c0 Allow the shell to set USB functions.
Bug: 25596495
Test: Issed a shell command and saw it handled correctly
Change-Id: I4472464a1c7ed100cb257dbad83d1d8cfef88fc6
2017-02-16 13:14:50 -08:00
Felipe Leme
92aaaa21ee Moved bugreport intents to the com.android.internal namespace.
Change-Id: I5ad53668b9393188cee4d8b0382f9c303ff95777
Fixes: 35275802
Test: manual verification
2017-02-15 16:08:53 -08:00
TreeHugger Robot
ccb258d001 Merge "Added more logging on BugreportProgressService." 2017-02-14 01:01:31 +00:00
TreeHugger Robot
9e193f03e8 Merge "Dismiss keyguard before displaying bugrepot details dialog." 2017-02-11 08:28:07 +00:00
Felipe Leme
ec60e5f40c Added more logging on BugreportProgressService.
BUG: 35010191
BUG: 35077822

Test: manual verification
Test: BugreportReceiverTest passes
Change-Id: Iaa37f633c6415127a3efa07c166f5a771a13ff5a
2017-02-10 17:41:18 -08:00
Felipe Leme
17d9e9c36d Dismiss keyguard before displaying bugrepot details dialog.
Fixes: 27494228
Test: manual verification
Test: BugreportReceiverTest passes

Change-Id: I7755fc2d3d4f1f9b55301c65f7a58c9374e93664
2017-02-10 16:20:02 -08:00
Felipe Leme
8775eaac44 Set package name on bugreport intents.
BUG: 35257764
Test: BugreportReceiverTest passes
Change-Id: Ia6ff03b2a12ab9987f5b36fa1da88e9c77af18a2
2017-02-10 13:06:58 -08:00
Paul Duffin
43267b4b9e Merge "Prepare for removal of legacy-test from default targets" am: c74ccf1588 am: ab62fd67d8
am: 56a2ae1056

Change-Id: I0ede6895eb25f72a74af3ac4431a21960500bec5
2017-01-19 11:49:28 +00:00
Paul Duffin
56a2ae1056 Merge "Prepare for removal of legacy-test from default targets" am: c74ccf1588
am: ab62fd67d8

Change-Id: I923de1762a15fca7dc255f9dfe0ecce6f54d333c
2017-01-19 11:44:56 +00:00
Paul Duffin
ccb0445027 Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

(cherry picked from 6387604f9e672ece85e07c4bcbd7be396867f06f)

Bug: 30188076
Test: make checkbuild
Merged-In: I13e88297731253420e4e5f5291d503f13a39a156
Change-Id: I58446eb8c45d8ac2bcdbc9fa40d1321e811bdd4b
2017-01-19 09:43:05 +00:00
Tamas Berghammer
24d8553316 DO NOT MERGE: Revert "Update package names to work with the proto3 compiler"
This reverts commit cbd3f0c59a75e0b46dbb0635e81f82b8b9617791.

Change-Id: I6e8d193fa22e0e7e30b214c13ae0480d3c9b0dc6
2017-01-18 19:33:22 +00:00
Paul Duffin
8aeb59ebcd Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

Bug: 30188076
Test: make checkbuild
Change-Id: I13e88297731253420e4e5f5291d503f13a39a156
2017-01-18 16:39:34 +00:00