Loading Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ framework_docs_LOCAL_DROIDDOC_OPTIONS := \ -since $(SRC_API_DIR)/25.txt 25 \ -since $(SRC_API_DIR)/26.txt 26 \ -since $(SRC_API_DIR)/27.txt 27 \ -since ./frameworks/base/api/current.txt P \ -since $(SRC_API_DIR)/28.txt 28 \ -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \ -overview $(LOCAL_PATH)/core/java/overview.html \ Loading api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,10 @@ package android.app.backup { package android.app.usage { public class NetworkStatsManager { method public void setPollForce(boolean); } public class StorageStatsManager { method public boolean isQuotaSupported(java.util.UUID); method public boolean isReservedSupported(java.util.UUID); Loading cmds/sm/src/com/android/commands/sm/Sm.java +16 −4 Original line number Diff line number Diff line Loading @@ -147,9 +147,21 @@ public final class Sm { } public void runSetForceAdoptable() throws RemoteException { final boolean forceAdoptable = Boolean.parseBoolean(nextArg()); mSm.setDebugFlags(forceAdoptable ? StorageManager.DEBUG_FORCE_ADOPTABLE : 0, StorageManager.DEBUG_FORCE_ADOPTABLE); final int mask = StorageManager.DEBUG_ADOPTABLE_FORCE_ON | StorageManager.DEBUG_ADOPTABLE_FORCE_OFF; switch (nextArg()) { case "on": case "true": mSm.setDebugFlags(StorageManager.DEBUG_ADOPTABLE_FORCE_ON, mask); break; case "off": mSm.setDebugFlags(StorageManager.DEBUG_ADOPTABLE_FORCE_OFF, mask); break; case "default": case "false": mSm.setDebugFlags(0, mask); break; } } public void runSetSdcardfs() throws RemoteException { Loading Loading @@ -289,7 +301,7 @@ public final class Sm { System.err.println(" sm list-volumes [public|private|emulated|all]"); System.err.println(" sm has-adoptable"); System.err.println(" sm get-primary-storage-uuid"); System.err.println(" sm set-force-adoptable [true|false]"); System.err.println(" sm set-force-adoptable [on|off|default]"); System.err.println(" sm set-virtual-disk [true|false]"); System.err.println(""); System.err.println(" sm partition DISK [public|private|mixed] [ratio]"); Loading cmds/statsd/Android.mk +6 −2 Original line number Diff line number Diff line Loading @@ -66,7 +66,8 @@ statsd_common_src := \ src/subscriber/IncidentdReporter.cpp \ src/subscriber/SubscriberReporter.cpp \ src/HashableDimensionKey.cpp \ src/guardrail/StatsdStats.cpp src/guardrail/StatsdStats.cpp \ src/socket/StatsSocketListener.cpp statsd_common_c_includes := \ $(LOCAL_PATH)/src \ Loading Loading @@ -96,7 +97,10 @@ statsd_common_shared_libraries := \ android.hardware.health@2.0 \ android.hardware.power@1.0 \ android.hardware.power@1.1 \ android.hardware.thermal@1.0 android.hardware.thermal@1.0 \ libpackagelistparser \ libsysutils \ libcutils # ========= # statsd Loading cmds/statsd/src/main.cpp +24 −12 Original line number Diff line number Diff line Loading @@ -14,10 +14,12 @@ * limitations under the License. */ #define DEBUG false // STOPSHIP if true #include "Log.h" #include "StatsService.h" #include "logd/LogReader.h" #include "socket/StatsSocketListener.h" #include <binder/IInterface.h> #include <binder/IPCThreadState.h> Loading @@ -35,7 +37,9 @@ using namespace android; using namespace android::os::statsd; // ================================================================================ const bool kUseLogd = false; const bool kUseStatsdSocket = true; /** * Thread function data. */ Loading @@ -48,12 +52,8 @@ struct log_reader_thread_data { */ static void* log_reader_thread_func(void* cookie) { log_reader_thread_data* data = static_cast<log_reader_thread_data*>(cookie); sp<LogReader> reader = new LogReader(data->service); // Tell StatsService that we're ready to go. data->service->Startup(); // Run the read loop. Never returns. reader->Run(); Loading Loading @@ -96,10 +96,7 @@ static status_t start_log_reader_thread(const sp<StatsService>& service) { return NO_ERROR; } // ================================================================================ int main(int /*argc*/, char** /*argv*/) { status_t err; // Set up the looper sp<Looper> looper(Looper::prepare(0 /* opts */)); Loading @@ -118,11 +115,26 @@ int main(int /*argc*/, char** /*argv*/) { } service->sayHiToStatsCompanion(); service->Startup(); sp<StatsSocketListener> socketListener = new StatsSocketListener(service); if (kUseLogd) { ALOGI("using logd"); // Start the log reader thread err = start_log_reader_thread(service); status_t err = start_log_reader_thread(service); if (err != NO_ERROR) { return 1; } } if (kUseStatsdSocket) { ALOGI("using statsd socket"); // Backlog and /proc/sys/net/unix/max_dgram_qlen set to large value if (socketListener->startListener(600)) { exit(1); } } // Loop forever -- the reports run on this thread in a handler, and the // binder calls remain responsive in their pool of one thread. Loading Loading
Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ framework_docs_LOCAL_DROIDDOC_OPTIONS := \ -since $(SRC_API_DIR)/25.txt 25 \ -since $(SRC_API_DIR)/26.txt 26 \ -since $(SRC_API_DIR)/27.txt 27 \ -since ./frameworks/base/api/current.txt P \ -since $(SRC_API_DIR)/28.txt 28 \ -werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 \ -overview $(LOCAL_PATH)/core/java/overview.html \ Loading
api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,10 @@ package android.app.backup { package android.app.usage { public class NetworkStatsManager { method public void setPollForce(boolean); } public class StorageStatsManager { method public boolean isQuotaSupported(java.util.UUID); method public boolean isReservedSupported(java.util.UUID); Loading
cmds/sm/src/com/android/commands/sm/Sm.java +16 −4 Original line number Diff line number Diff line Loading @@ -147,9 +147,21 @@ public final class Sm { } public void runSetForceAdoptable() throws RemoteException { final boolean forceAdoptable = Boolean.parseBoolean(nextArg()); mSm.setDebugFlags(forceAdoptable ? StorageManager.DEBUG_FORCE_ADOPTABLE : 0, StorageManager.DEBUG_FORCE_ADOPTABLE); final int mask = StorageManager.DEBUG_ADOPTABLE_FORCE_ON | StorageManager.DEBUG_ADOPTABLE_FORCE_OFF; switch (nextArg()) { case "on": case "true": mSm.setDebugFlags(StorageManager.DEBUG_ADOPTABLE_FORCE_ON, mask); break; case "off": mSm.setDebugFlags(StorageManager.DEBUG_ADOPTABLE_FORCE_OFF, mask); break; case "default": case "false": mSm.setDebugFlags(0, mask); break; } } public void runSetSdcardfs() throws RemoteException { Loading Loading @@ -289,7 +301,7 @@ public final class Sm { System.err.println(" sm list-volumes [public|private|emulated|all]"); System.err.println(" sm has-adoptable"); System.err.println(" sm get-primary-storage-uuid"); System.err.println(" sm set-force-adoptable [true|false]"); System.err.println(" sm set-force-adoptable [on|off|default]"); System.err.println(" sm set-virtual-disk [true|false]"); System.err.println(""); System.err.println(" sm partition DISK [public|private|mixed] [ratio]"); Loading
cmds/statsd/Android.mk +6 −2 Original line number Diff line number Diff line Loading @@ -66,7 +66,8 @@ statsd_common_src := \ src/subscriber/IncidentdReporter.cpp \ src/subscriber/SubscriberReporter.cpp \ src/HashableDimensionKey.cpp \ src/guardrail/StatsdStats.cpp src/guardrail/StatsdStats.cpp \ src/socket/StatsSocketListener.cpp statsd_common_c_includes := \ $(LOCAL_PATH)/src \ Loading Loading @@ -96,7 +97,10 @@ statsd_common_shared_libraries := \ android.hardware.health@2.0 \ android.hardware.power@1.0 \ android.hardware.power@1.1 \ android.hardware.thermal@1.0 android.hardware.thermal@1.0 \ libpackagelistparser \ libsysutils \ libcutils # ========= # statsd Loading
cmds/statsd/src/main.cpp +24 −12 Original line number Diff line number Diff line Loading @@ -14,10 +14,12 @@ * limitations under the License. */ #define DEBUG false // STOPSHIP if true #include "Log.h" #include "StatsService.h" #include "logd/LogReader.h" #include "socket/StatsSocketListener.h" #include <binder/IInterface.h> #include <binder/IPCThreadState.h> Loading @@ -35,7 +37,9 @@ using namespace android; using namespace android::os::statsd; // ================================================================================ const bool kUseLogd = false; const bool kUseStatsdSocket = true; /** * Thread function data. */ Loading @@ -48,12 +52,8 @@ struct log_reader_thread_data { */ static void* log_reader_thread_func(void* cookie) { log_reader_thread_data* data = static_cast<log_reader_thread_data*>(cookie); sp<LogReader> reader = new LogReader(data->service); // Tell StatsService that we're ready to go. data->service->Startup(); // Run the read loop. Never returns. reader->Run(); Loading Loading @@ -96,10 +96,7 @@ static status_t start_log_reader_thread(const sp<StatsService>& service) { return NO_ERROR; } // ================================================================================ int main(int /*argc*/, char** /*argv*/) { status_t err; // Set up the looper sp<Looper> looper(Looper::prepare(0 /* opts */)); Loading @@ -118,11 +115,26 @@ int main(int /*argc*/, char** /*argv*/) { } service->sayHiToStatsCompanion(); service->Startup(); sp<StatsSocketListener> socketListener = new StatsSocketListener(service); if (kUseLogd) { ALOGI("using logd"); // Start the log reader thread err = start_log_reader_thread(service); status_t err = start_log_reader_thread(service); if (err != NO_ERROR) { return 1; } } if (kUseStatsdSocket) { ALOGI("using statsd socket"); // Backlog and /proc/sys/net/unix/max_dgram_qlen set to large value if (socketListener->startListener(600)) { exit(1); } } // Loop forever -- the reports run on this thread in a handler, and the // binder calls remain responsive in their pool of one thread. Loading