summaryrefslogtreecommitdiff
path: root/logging.sh
diff options
context:
space:
mode:
author Jeff Sharkey <jsharkey@android.com> 2019-12-07 11:52:32 -0700
committer Jeff Sharkey <jsharkey@android.com> 2019-12-07 13:39:30 -0700
commitacc3b58f100066afe164588ab31b0ef12f8074d8 (patch)
tree256763a24f5bf9aab05b15ff920281e4d1697767 /logging.sh
parent56c34e8664898bf02ff357e5bea529021c22de21 (diff)
Expand testing of Mainline data migration.
Add tests for audio, video, images, pending, trashed, favorites, and ownership, to verify that they're all migrated as we expect. Since development iteration with APEX can be tricky and slow, add a new "deploy.sh" shell script to avoid the need for a reboot. Expand logging shell script to catch all possible package names. Fix transaction issue with migration logic; we're already in a transaction from SQLiteOpenHelper, and we can't nest transactions, so move to using SAVEPOINT and ROLLBACK instead. Fix bugs in both migration and scanning to ensure that we include all files, including those which are pending or trashed. Fix obscure bug in ID_NOT_PARENT_CLAUSE which would call all media deletions to fail when there was a "NULL" parent anywhere in the database. Bug: 144247087 Test: atest --test-mapping packages/providers/MediaProvider Change-Id: If4e0ec70ecf333d444e2195fe3c005aa2c9c5feb
Diffstat (limited to 'logging.sh')
-rwxr-xr-xlogging.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/logging.sh b/logging.sh
index 0f5a54459..cf14af564 100755
--- a/logging.sh
+++ b/logging.sh
@@ -1,7 +1,7 @@
#!/bin/bash
level=$1
-uid=$(adb shell cat /data/system/packages.list |grep "com.android.providers.media " |cut -b 29-33)
+uids=$(adb shell cat /data/system/packages.list |grep -Po "providers.media[a-z\.]* \K\d+")
if [ $level == "on" ] || [ $level == "extreme" ]
then
@@ -14,12 +14,18 @@ fi
if [ $level == "extreme" ]
then
- adb shell setprop db.log.slow_query_threshold.$uid 0
+ for uid in $uids;
+ do adb shell setprop db.log.slow_query_threshold.$uid 0;
+ done
adb shell setprop db.log.bindargs 1
else
- adb shell setprop db.log.slow_query_threshold.$uid 10000
+ for uid in $uids;
+ do adb shell setprop db.log.slow_query_threshold.$uid 10000;
+ done
adb shell setprop db.log.bindargs 0
fi
# Kill process to kick new settings into place
adb shell am force-stop com.android.providers.media
+adb shell am force-stop com.android.providers.media.module
+adb shell am force-stop com.google.android.providers.media.module