Code example for ComponentName

Methods: flattenToShortString

0
 
    private SearchableInfo getSearchable(ComponentName componentName) {
        SearchableInfo searchable = mSearchManager.getSearchableInfo(componentName, false);
        if (searchable == null || searchable.getSuggestAuthority() == null) {
            throw new RuntimeException("Component is not searchable: "
                    + componentName.flattenToShortString());
        } 
        return searchable;
    } 
 
    /** 
     * Keeps track of timings in nanoseconds. 
     */ 
    private static class ElapsedTime { 
        private long mTotal = 0;
        private int mCount = 0;
        public synchronized void addTime(long time) {
            mTotal += time;
            mCount++;
        } 
        public synchronized long getTotal() {